Add an opt-in GPUI desktop shell with a Tauri fallback

Draft
DE
2mo ago
+152982-9099

Summary

Intent: Rebuild the GPUI migration from refreshed origin/main (5af2f90e7b, including #7681), then rebase onto b82d55036994b5b67a59ca9421eccdc1e2712347 and fix the rough edges found in the earlier migration. Supersedes closed #7655; tracks ANLG-320.

The native shell is opt-in. Tauri remains the default and the rollback path; both use shared Rust services for database/CloudSync, auth, deep links, search, tray, updater, local API, and voiceprints. The existing SQLite schema, session-backed documents, TipTap/ProseMirror JSON, and external transport contracts remain the compatibility boundaries. Packaging supports optional or required GPUI sidecars, with a dedicated Linux GPUI Clippy/test job on PRs.

This replacement separates skipped onboarding steps from completed ones, replaces signed-out Sync/Cloud API spinners with stable account surfaces, updates folder/template editing immediately, and searches settings by page content with case-insensitive multi-word matching.

Recording continues through listener-core. Audio deletion also removes recovery chunks and interrupted audio files; storage failures remain visible until capture stops. Native live-chunk transcript repair is still missing: GPUI explicitly refuses new captures with Never audio retention, rather than starting a capture whose recovery audio would be deleted before its post-stop transcription. Users can switch to Tauri or select a retention period. Cloud API management also points users back to Tauri.

Main’s configurable Markdown exporter and its 19 regression tests now live in local-api-core, preserving atomic writes, collision/ownership checks, filename patterns, and content options for both shells. GPUI workflow edits retain the optional export options, including backward compatibility for stored workflows without them.

GPUI billing and hosted AI now use the current authenticated account. Shared claims distinguish Pro from paid access (including Lite and active trials); malformed, expired, paused, and mismatched-account sessions cannot unlock hosted providers. Cloud STT resolves refreshed credentials, and cloud LLM connections retain an account-bound auth handle instead of a cached token. Streaming and non-streaming LLM requests resolve credentials at request time and retry a hosted 401 once after forced refresh. BYOK/local providers retain their existing paths; legacy hyprnote LLM settings normalize to anarlog.

Demo

Native Linux UI testing of 451c1b8775, with isolated XDG directories and a unique application identifier:

Signed-out GPUI flows

Skipped onboardingPersistent Never-retention guard
Muted skipped rowsActionable retention warning

Passed: independent skipped-onboarding labels/icons; note create/edit/reopen/relaunch; reactive folder rename with Enter/Escape and persistence; reactive template title/description with persistence; content-based settings search including multi-word/case/no-result/clear; stable signed-out Sync/Cloud API; persistent Never-retention refusal. One-day retention cleared the warning and permitted recording on a dummy device only.

Transcription limitation: Stopping the dummy recording displayed a transcript-save warning; automatic recovery exhausted five attempts. Logs include a live-provider HTTP 401, and no usable batch target was configured. Both the primary audio and recovery chunk survived relaunch. Source triage confirms the warning and bounded retry path mirror Tauri's capture-lifecycle.ts / live-capture-recovery.tsx; this run does not establish successful transcription or hardware capture.

Stop warning with unavailable transcription

Untested: real microphone/system-audio fidelity, provider transcription, authenticated CloudSync/Cloud API, macOS/Windows, template Escape-reversion beyond autosave, and native/Tauri interoperability (no sibling Tauri launcher was available).

Verification

Latest candidate: 1ee1a023500998997a4bf8dc80b2f36007569aa6, linearly rebased onto origin/main at b82d55036994b5b67a59ca9421eccdc1e2712347. Generated Lingui catalogs were regenerated from merged PO sources; the approved shared-export and native-platform resolutions were preserved. The final tree is identical to the validated pre-rebase checkpoint c804be6f2267b3534440baf97ce9b30ccac23d02 (git diff --exit-code passed).

Current candidate validation on Linux:

  • cargo check --locked -p desktop-gpui; cargo clippy --locked -p desktop-gpui --all-targets --no-deps -- -D warnings; cargo fmt -p desktop-gpui -- --check: PASS.
  • cargo test --locked -p desktop-gpui -p desktop-auth -p supabase-auth -p local-api-core -p desktop-db-runtime: PASS (504 GPUI, 10 desktop-auth, 49 supabase-auth, 29 local-api-core, 96 desktop-db-runtime tests). Regression coverage includes entitlements/trials, malformed/expired/mismatched claims, concurrent refresh, sign-out/account switching, cloud connection resolution, streaming/non-streaming 401 retries, BYOK behavior, and no token persistence in settings.
  • Frozen pnpm install, shared UI build, desktop typecheck, 4,672 desktop tests, 202 editor tests, Supabase typecheck and 35 tests, Oxlint (0 errors), Lingui extraction/strict compilation, and full-branch changed-file dprint check: PASS.
  • Complete repository Node suite (127 tests), both license-boundary checks (9 Python tests), and desktop/mobile release-version checks: PASS.
  • Offline zizmor completed; changed desktop workflow finding categories/counts match an origin/main baseline. Repository findings remain and authenticated audits were unavailable.

Remaining validation gaps: full-workspace cargo fmt --all -- --check reports formatting in audio-device macOS/Windows sources and plugins/fs2/src/error.rs; the focused GPUI formatter and branch dprint checks pass. A broader Rust invocation including db-core reaches the external sync_roundtrip test but fails because SQLITECLOUD_URL is unset. Hosted PostgreSQL migrations and authenticated live-provider UI flows were not exercised. The bundled CloudSync extension was restored after local tests and is unchanged in the PR. Prior macOS/Windows evidence below does not cover the new auth/cloud code.

Broader validation completed on merge commit 5b10236533589738965628ebacdbf1eeabe9d384:

  • Frozen pnpm install; shared UI build; desktop typecheck; desktop tests (478 files, 4593 tests); editor tests (202 tests); Oxlint (0 errors).
  • Lingui extraction and strict compilation; full changed-file dprint formatting/checks; merge whitespace check.
  • GPUI locked check, strict Clippy (--all-targets --no-deps -- -D warnings), and 495 tests.
  • Shared local API core and Tauri plugin locked checks and strict Clippy; core tests (29 passed) and plugin Specta binding generation test. Generated bindings, permissions, and capabilities match main’s command contract.
  • CloudSync tests (32 passed) and db-core CloudSync tests (82 passed) using the previously pinned Ubuntu 22.04 local extension rebuild. The committed extension still fails to load on this VM (GLIBC_2.38 requirement); it was restored after the checks. No native binary changes are committed.
  • Repository Node tests (127) and Python license-boundary tests (9).
  • Offline zizmor scan completed; the added GPUI job has no reported findings. Repository-wide findings remain; authenticated audits were unavailable.

Native source validation on the preceding SHA f8640c3b8fa3771d85f3e08ac0c01e7fb93c1c34:

PlatformLocked checkStrict ClippyGPUI testsSigned critical UX
LinuxPASSPASS495 PASSBLOCKED
macOSPASSPASS494 PASSBLOCKED
WindowsPASSPASS493 PASSBLOCKED

macOS report · macOS logs · Windows report · Windows logs.

Earlier revisions only: shared native-service Clippy, Tauri Linux check, and 96 desktop database-runtime tests passed before the shared-export merge. No Rust source, Cargo manifest, or lockfile changed between 627b56e571 and f8640c3b8f.

Critical UX QA: BLOCKED on macOS, Windows, and Linux. Signed staging artifact provenance for the latest SHA remains unverified. Staging dispatch returned HTTP 403; an authorized maintainer must dispatch desktop_cd.yaml from this branch with channel=staging, candidate_sha=1ee1a023500998997a4bf8dc80b2f36007569aa6, include_linux=true, and include_windows=true. macOS/Windows VMs have no audio devices; Linux currently has a dummy device only. Windows staging currently omits the GPUI sidecar and skips code signing. Source checks and the earlier Linux recording are not signed-artifact QA coverage.

CI is running for the latest candidate. Skipped platform jobs are not coverage.

Local environment caveats: Ubuntu 22.04's PipeWire 0.3.48 headers were replaced for compilation by a user-local 0.3.65 prefix. The bundled Linux CloudSync extension requires GLIBC_2.38; its loader failure reproduced on unchanged origin/main. Running the repository's pinned crates/cloudsync/scripts/rebuild-linux.sh restored local database tests and native startup. The host-specific generated binary was restored afterward and is not part of the PR. UI testing used Chrome's SwiftShader ICD because Mesa llvmpipe produced stale pixels on this VNC display. This does not validate the shipped extension on Ubuntu 22.04 or Mesa rendering. GPUI CI uses Ubuntu 24.04.


Summary by cubic

Adds an opt-in native GPUI shell alongside the Tauri desktop app. Tauri stays the default and the rollback path; both share the same Rust services and open the same SQLite database.

New Features

  • GPUI shell is selectable from General settings and relaunches the app.
  • Linux and macOS ship the GPUI sidecar; Linux CI now gates it.
  • Onboarding separates skipped steps from completed ones.
  • Signed-out Sync/Cloud API spinners are replaced with stable account surfaces.
  • Folder and template edits apply immediately.
  • Settings search matches page content with case-insensitive multi-word matching.
  • Audio deletion removes recovery chunks and interrupted audio files.

Known Limitations

  • GPUI refuses new captures with Never audio retention because native live-chunk transcript repair is missing; switch to Tauri or choose a retention period.
  • Cloud API management points users back to Tauri.

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