Land the opt-in GPUI desktop shell and shell-neutral crates in one change

Closed
DE
2mo ago
+151348-8306

Summary

Problem: The Tauri → GPUI migration (ANLG-320) was spread across a twelve-PR stack (#7356, #7358, #7359, #7536–#7545) that had drifted from main, carried a stale Cargo.lock, and had to be reviewed and landed strictly in order. Each PR only made sense with the others applied, and their catalogs/lockfiles conflicted with recent main work (calendar, billing, transcript deletion).

Fix: One branch rebuilt on current main that lands the whole migration as a coherent, opt-in change. Tauri stays the default shell and rollback path; nothing here changes the SQLite schema or the ProseMirror document format.

  • apps/desktop-gpui: the native GPUI shell (main window, note view + ProseMirror editor, transcript, recording, settings, onboarding, tray, deep links, single-instance forwarding). Launched via Settings → General → Try the new Anarlog (beta); the Tauri launcher execs anarlog-gpui from next to its own binary (apps/desktop/src-tauri/src/shell.rs), ANARLOG_SHELL=tauri|gpui overrides for one run.
  • Shell-neutral crates extracted from the Tauri plugins so both shells share one implementation: crash-reporting (consent, Sentry init, redaction), desktop-auth (account parsing/persistence/secret store), desktop-db-runtime (DB open + CloudSync runtime/config, moved out of plugins/db), desktop-updater (update policy + backend/event abstraction; GPUI backend checks/downloads but does not install/relaunch yet), desktop-bench (process-tree benchmark harness), plus deeplink-core / tray-core sharing routes, icons, and agenda logic.
  • GPUI CloudSync activation: account binding, E2EE recovery key, device enrollment, connected-library transport selection, gated by the same runtime tests that gate the Tauri plugin.
  • Contract tests between the two shells (deeplinks, tray, search) and ProseMirror round-trip fixtures generated from the web editor (packages/editor/src/note/roundtrip-fixtures.gen.test.ts) consumed by apps/desktop-gpui/src/editor/pm/roundtrip.rs, with UTF-16 position semantics so selections match the web editor.
  • gix author API fix (#7540) needed by the bench harness.
  • CI: gpui_linux_ci job (clippy -D warnings + tests), desktop-bench checks on Linux, macOS cargo check -p desktop-gpui as continue-on-error until Metal shaders are validated, Linux CD ships the anarlog-gpui sidecar (macOS optional). pr-description.yml reads the event file instead of env so large PR bodies don't fail the step.
  • Phase 0 inventory of the Tauri surface in apps/desktop-gpui/docs/tauri-inventory.md.

Consolidation-only changes vs. the stack: conflicts resolved additively (startup in desktop-gpui/src/main.rs keeps crash reporting + auth + CloudSync + updater; Cargo.toml keeps all extracted crates; desktop_cd.yaml keeps Sentry and Supabase env), Cargo.lock regenerated, and the desktop i18n catalogs regenerated on current main (the stack's catalogs were extracted with a Node < 22.18 where lingui extract is a silent no-op, so they had drifted; the diff vs. main is now only the three shell-switch strings).

Not in scope / known gaps (unchanged from the stack): GPUI updater install/relaunch, update state in GPUI UI, activity deferral (no GPUI recording pipeline yet), signed macOS/Windows packaging and hardware validation, Windows single-instance forwarding, rich clipboard embeds.

Supersedes #7356, #7358, #7359, #7536, #7537, #7538, #7539, #7540, #7541, #7542, #7543, #7545.

Verification

  • pnpm install --frozen-lockfile, pnpm -F @anlg/ui build, pnpm -F @anlg/desktop typecheck, pnpm -F @anlg/desktop test, pnpm -F @anlg/editor test, pnpm exec oxlint --quiet --format=github apps/desktop/src/ (0 errors)
  • lingui extract --clean --workers 1 + lingui compile --strict --workers 1 (Node 24; stable, committed)
  • cargo clippy --locked -p desktop-gpui --all-targets --no-deps -- -D warnings, cargo test --locked -p desktop-gpui (490 passed)
  • cargo test --locked -p crash-reporting -p desktop-auth -p desktop-updater -p desktop-bench (all pass)
  • cargo test --locked -p desktop-db-runtime --lib: 66 pass; 12 tests that open the CloudSync extension hang/PoolTimedOut on this VM. cargo test -p db-core 'cloudsync::' on unchanged main code hangs identically here, so this is the sandbox (no network for the extension), not the port — relying on CI for that gate.
  • dprint check + rustfmt --check on all changed files; ci.yaml license-boundary scripts and node --test (67 pass); zizmor --offline shows no findings on the changed workflow lines.
  • Not run locally: macOS/Windows lanes, signed packaging, a real GPUI session on hardware.

Link to Devin session: https://app.devin.ai/sessions/42ab0e9111f44a4c9e79fa361842f703
Open in Devin Desktop: https://app.devin.ai/desktop/session/42ab0e9111f44a4c9e79fa361842f703?variant=devin
Requested by: @ComputelessComputer


Summary by cubic

Lands the ANLG-320 Tauri → GPUI migration as one opt-in change. Tauri stays the default and rollback path; Settings → General → Try the new Anarlog (beta) launches anarlog-gpui, with ANARLOG_SHELL available per run, without changing the SQLite schema or ProseMirror document format.

GPUI shell

  • Adds apps/desktop-gpui with the main window, notes and ProseMirror editor, transcript, recording, settings, onboarding, tray, deep links, and single-instance forwarding; the shell reads and writes Tauri's .window-state.json, and closing the main window hides to the tray.
  • Adds floating and docked chat with persistent history, streaming replies, and a local tool loop (search, move meeting contents, session corrections, memo/summary edits with diff review, context mentions, voice input, automations and webhooks scope).
  • Adds note attachments (images, file cards, paste and drop), pasted YouTube clips, image context for summaries, pre-meeting briefs, contact summary briefs, duplicate-contact merge, and transcription/summary notifications.
  • Ports ProseMirror's clipboard handling (HTML parse and serialize), WebKit-style editing behaviors (word/line movement, visual-line navigation, double/triple-click selection, context menus), and the @pierre/diffs-aligned edit review.
  • Matches more of the web UI: shared sidebar/chat layout percentages, format toolbar, tooltips, sonner toasts, badges and Insights, folder picker, contact enhance, sign-in/upgrade hand-off screens, and the excluded-apps picker.
  • Matches the capture and AI surfaces: scheduled meeting auto-start, empty-capture discard, stalled-transcription watchdog, capture-marker parity, STT live/after-recording modes, and OpenAI/Azure Responses API writes.
  • Extracts shell-neutral crash reporting, auth, database runtime, updater, benchmark, local API (webhooks, markdown export), search, voiceprint, deeplink, and tray crates for both shells.
  • Adds CloudSync runtime gating, cross-shell contract tests, and ProseMirror round-trip fixtures from the web editor.
  • Known gaps remain GPUI updater install/relaunch, signed macOS/Windows packaging, Windows single-instance forwarding, activity deferral, and some signed-in flows.

CI and release

  • Adds required Linux GPUI clippy/tests, desktop-bench checks, and a best-effort macOS GPUI check; Linux releases package the anarlog-gpui sidecar while macOS remains optional.
  • Reads large pull request descriptions from the GitHub event payload, and regenerates Cargo.lock and desktop i18n catalogs against current main.