Skip to content

feat(desktop): tauri 2 POC wrapping canonry serve + SPA#349

Draft
arberx wants to merge 1 commit intomainfrom
arberx/brew-formula
Draft

feat(desktop): tauri 2 POC wrapping canonry serve + SPA#349
arberx wants to merge 1 commit intomainfrom
arberx/brew-formula

Conversation

@arberx
Copy link
Copy Markdown
Member

@arberx arberx commented Apr 25, 2026

Summary

Tauri 2 desktop wrapper POC. Picks a free port, spawns canonry serve as a sidecar, polls for readiness, opens a webview onto the dashboard. End-to-end validated on macOS.

Status: draft. Paused while we re-evaluate whether desktop is the right primary surface for our target user (agency owner with future cloud-sync needs). The Tauri shell may end up as one of multiple distribution channels — or get re-prioritized behind cloud auth + a hosted dashboard. This branch saves the work for whichever direction we go.

What's in

  • apps/desktop/ — Tauri 2 shell (Rust), capabilities, placeholder icon, AGENTS/CLAUDE/README.
  • Auto-detects packages/canonry/dist/cli.js in dev; falls back to CANONRY_BIN env or canonry on PATH otherwise.
  • 21 unit tests (cargo) covering env resolution, command construction, port binding, sidecar error paths, workspace path arithmetic.
  • Workspace map updated in root AGENTS.md.
  • Version bump 2.4.6 → 2.4.7.

Deliberately not in (see apps/desktop/AGENTS.md)

Bundled canonry sidecar binary, real icon, code signing/notarization, install-time CLI symlink to /usr/local/bin/canonry, single-instance enforcement, auto-update plugin.

Test plan

  • pnpm --filter @ainyc/canonry-desktop test — 21 cargo tests pass.
  • pnpm --filter @ainyc/canonry build && pnpm --filter @ainyc/canonry-desktop dev opens a native window onto the dashboard.

🤖 Generated with Claude Code

Scaffolds apps/desktop/ — a Tauri 2 shell that picks a free port,
spawns canonry serve as a sidecar, polls for readiness, and opens a
webview onto the dashboard. Auto-detects packages/canonry/dist/cli.js
in dev; falls back to CANONRY_BIN env or PATH.

21 unit tests cover the pure helpers (env resolution, command
construction, port binding, sidecar error paths, workspace path
arithmetic). Tauri runtime hooks not unit-tested.

Distribution work (sidecar binary bundling, real icon, code signing,
notarization, install-time CLI symlink, single-instance enforcement,
auto-update) deliberately deferred — see apps/desktop/AGENTS.md.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant