From 0d8dec9a1dea10db5817404611a16a4858eac6de Mon Sep 17 00:00:00 2001 From: Nishanth Date: Thu, 20 Aug 2026 13:03:52 +0530 Subject: [PATCH] desktop: make the app buildable on Linux Everything needed for a Linux build; no CI changes (builds are taken manually). - keyring: split the backend per target. macOS keeps apple-native; Linux uses sync-secret-service (GNOME Keyring / KWallet). db/device_key.rs already uses only the portable Entry API, so no code change was needed. Deliberately NOT linux-native: that stores in kernel keyutils, which is session-scoped, and a lost SQLCipher key means a lost local database. - bundle: add deb + appimage targets and the PNG icons Linux needs (the icons were already in the repo, just unreferenced). - top-bar: reserve the 92px traffic-light inset on macOS only. titleBarStyle and trafficLightPosition are macOS-only options, so on Linux the same inset was just an empty gap next to a native GTK title bar. - RELEASING.md: Linux build/verify steps, incl. the libdbus-1-dev build dep and the latest.json clobbering hazard. Verified from macOS: cargo check passes; cargo metadata --filter-platform shows keyring+dbus-secret-service resolving for linux with security-framework absent, and no dbus crates leaking into the darwin graph. tsc clean. Co-Authored-By: Claude Opus 4.8 --- .../src/components/shell/top-bar.tsx | 15 +++-- apps/desktop/RELEASING.md | 61 +++++++++++++++++++ apps/desktop/src-tauri/Cargo.lock | 25 ++++++++ apps/desktop/src-tauri/Cargo.toml | 15 ++++- apps/desktop/src-tauri/tauri.conf.json | 14 ++++- 5 files changed, 121 insertions(+), 9 deletions(-) diff --git a/apps/desktop-ui/src/components/shell/top-bar.tsx b/apps/desktop-ui/src/components/shell/top-bar.tsx index 9ff57452..c95af373 100644 --- a/apps/desktop-ui/src/components/shell/top-bar.tsx +++ b/apps/desktop-ui/src/components/shell/top-bar.tsx @@ -31,11 +31,14 @@ export function TopBar() { const user = useAppUser() // macOS traffic lights are inset into this bar (titleBarStyle: Overlay), so - // pad the left only inside the Tauri window. Mounted-guarded to avoid an SSR - // hydration mismatch (isDesktop() is false on the server). - const [isTauri, setIsTauri] = useState(false) + // reserve room for them on the left — but ONLY on macOS. titleBarStyle and + // trafficLightPosition are macOS-only options; Linux and Windows keep their + // native title bar, so the same inset there is just an empty 92px gap. + // Mounted-guarded to avoid an SSR hydration mismatch (isDesktop() is false on + // the server). + const [isMacDesktop, setIsMacDesktop] = useState(false) useEffect(() => { - setIsTauri(isDesktop()) + setIsMacDesktop(isDesktop() && /Mac/i.test(navigator.userAgent)) }, []) // macOS hides the traffic lights in fullscreen, so the left inset that @@ -72,9 +75,9 @@ export function TopBar() { data-tauri-drag-region className={cn( 'flex h-14 w-full shrink-0 items-center gap-3 border-b border-border bg-[hsl(var(--surface-2))]', - !isTauri ? 'px-4' : 'pr-6', + !isMacDesktop ? 'px-4' : 'pr-6', )} - style={isTauri ? { paddingLeft: isFullscreen ? 16 : 92 } : undefined} + style={isMacDesktop ? { paddingLeft: isFullscreen ? 16 : 92 } : undefined} > {/* Brand → dashboard. Text wordmark in Courier Prime, no logo mark. */}