Skip to content

Implement Wails desktop wrapper (per ADR 0001) #38

@ojongerius

Description

@ojongerius

Implementation tracker for ADR 0001 — adopting Wails v2 as a desktop wrapper alongside the existing CLI mode.

Goal

Ship a native desktop build (Dashboard.app / .exe / .deb) that wraps the existing internal/server HTTP server and adds a native file-picker for .db files, while preserving the current ./dashboard -db <path> CLI flow unchanged.

Scope

Must have

  • Add Wails v2 project scaffolding under a new entry point (e.g. cmd/dashboard-desktop/), reusing internal/server and internal/store
  • On launch, Wails starts the HTTP server on a loopback port and loads http://127.0.0.1:<port>/ in the webview
  • Native file-open dialog (Wails binding) for selecting a .db file — passes the path to the same read-only store.Open() flow
  • Application menu (File → Open…, Quit) on macOS; equivalents on Windows/Linux
  • Vendor Tailwind: replace the CDN <script> with a built CSS file (Tailwind CLI) embedded via //go:embed so the desktop build works offline
  • Confirm internal/store remains read-only — no new write paths introduced by the Wails layer
  • Existing CLI mode (./dashboard -db ... -port ...) continues to work unchanged
  • Smoke-test the htmx UI on all three webview engines: WebKit (macOS), WebView2 (Windows), WebKitGTK (Linux)

Build & CI

  • make desktop (or equivalent) target that invokes wails build
  • GitHub Actions matrix job building Wails targets for macOS / Windows / Linux
  • Document signing/notarization requirements in CONTRIBUTING.md (even if not automated yet)

Nice to have (follow-up issues OK)

  • Double-click a .db file to open in Dashboard (OS file association)
  • Auto-update mechanism (no first-party Wails support — evaluate community tooling)
  • Recent-files menu

Out of scope

  • Auto-update integration (tracked separately if pursued)
  • Rewriting htmx endpoints as Wails bindings — the ADR commits to keeping HTTP
  • Any change to receipt database schema or write behavior

Acceptance criteria

  1. wails dev launches a window that renders the current htmx UI identically to the browser version
  2. Opening a .db via the native dialog shows the same receipt list/detail views as ./dashboard -db <path>
  3. go test ./... still passes
  4. CLI binary from go build ./cmd/dashboard is unchanged in behavior
  5. No network requests leave the machine when the desktop app is running offline (validates Tailwind vendoring)

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendGo server or store changesenhancementNew feature or requestuiFrontend / HTML / UI changes

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions