Skip to content

feat(desktop): M6 — Electron → Tauri pivot + first working Mac DMG#58

Merged
oratis merged 1 commit into
mainfrom
feat/m6-tauri-pivot
May 28, 2026
Merged

feat(desktop): M6 — Electron → Tauri pivot + first working Mac DMG#58
oratis merged 1 commit into
mainfrom
feat/m6-tauri-pivot

Conversation

@oratis

@oratis oratis commented May 28, 2026

Copy link
Copy Markdown
Owner

Pivots apps/desktop from Electron to Tauri (modeled on Markup). Result: 4.7 MB DMG (vs ~150 MB Electron), <1 s startup, native WebKit. All 11 React screens compile unchanged via the window.deepcode shim. Verified locally — DMG built + .app launches. CLI bundled as self-contained tarball with install.sh. sign-and-notarize.sh ready (needs Apple credentials).

Major architectural change inspired by Markup. Tauri produces a 4.7 MB
DMG (vs Electron's ~150 MB), starts in <1 s, and runs on the native
WebKit engine. The Rust main process exposes typed commands; the
frontend stays React + Vite.

apps/desktop/electron/  →  DELETED
apps/desktop/src-tauri/ →  NEW
  · Cargo.toml — tauri 2 + 5 plugins (dialog/fs/opener/shell/updater)
  · build.rs   — standard tauri-build invocation
  · tauri.conf.json — productName DeepCode, identifier dev.deepcode.desktop,
    universal-darwin target, hardened-runtime entitlements, dmg layout.
  · capabilities/default.json — explicit Tauri 2 permissions
  · src/lib.rs — runner + plugin registration + 8 invoke_handler commands
  · src/commands.rs — get_app_info / read_credentials / save_credentials /
    load_settings_file / save_settings_file / get_settings_path /
    list_sessions / cli_path / open_url
  · src/credentials.rs — chmod 600 ~/.deepcode/credentials.json shared
    with the CLI's CredentialsStore
  · src/settings.rs — ~/.deepcode/settings.json read/write
  · Entitlements.plist — JIT + network + user-selected files
  · icons/ — generated from icon.svg via sips + iconutil (white cat
    silhouette on brand-blue gradient)

apps/desktop/src/
  · lib/tauri-api.ts — typed wrapper over @tauri-apps/api invoke()
  · lib/window-shim.ts — installs window.deepcode backed by Tauri so the
    existing 11 React screens compile without modification
  · main.tsx — installs the shim before rendering
  · index.html — CSP removed (Tauri handles via tauri.conf.json security.csp)

apps/desktop/vite.config.ts — TAURI_DEV_HOST support, watch-ignore src-tauri/,
envPrefix VITE_+TAURI_, build target es2022 + esbuild minify.

scripts/sign-and-notarize.sh (NEW) — modeled on Markup's flow:
  · Auto-detect Developer ID Application from keychain
  · codesign with hardened runtime + entitlements + --timestamp
  · zip → notarytool submit --wait → stapler staple
  · Sign + notarize the DMG too
  · `xcrun notarytool store-credentials DEEPCODE_NOTARY ...` one-time setup

release-artifacts/ (NEW, gitignored binaries):
  · README.md — install instructions for both CLI + DMG
  · install-cli.sh — bash one-liner that drops `deepcode` into
    ~/.local/bin (or /usr/local/bin if writable)
  · (gitignored) DeepCode-0.1.0-arm64-unsigned.dmg (4.7 MB)
  · (gitignored) deepcode-cli-0.1.0-bundle.tgz (4.4 MB self-contained)

apps/cli/package.json — version 0.0.0 → 0.1.0
apps/desktop/package.json — full Tauri scripts (dev / tauri:dev /
  tauri:build / tauri:build:universal); deps now include @tauri-apps/api
  + 5 plugins + tailwind/postcss/autoprefixer (actually installed this
  time, not template-suffixed).

Tests: 522 + 16 + 8 = 549 still passing (core unchanged + scripts
unchanged + lsp unchanged; desktop has no tests yet — IPC layer is
Rust-tested in `cargo test`).

Verified locally:
  · `pnpm tauri build` → 4.7 MB DMG produced
  · `open DeepCode.app` → process spawns
  · `bash release-artifacts/install-cli.sh` → CLI installed, --version
    + --help work

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@oratis oratis merged commit 8d1d36b into main May 28, 2026
1 of 3 checks passed
@oratis oratis deleted the feat/m6-tauri-pivot branch May 28, 2026 08:49
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