Skip to content

feat: add native Linux desktop client - #20

Merged
nikuscs merged 2 commits into
nikuscs:mainfrom
JoseCoelho25:add-linux-client
Nov 6, 2026
Merged

nikuscs merged 2 commits into
nikuscs:mainfrom
JoseCoelho25:add-linux-client

Conversation

@JoseCoelho25

@JoseCoelho25 JoseCoelho25 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

🎫 Issue

None

🤔 Why

The desktop client was restricted to macOS due to direct Objective-C FFI calls (/usr/lib/libobjc.A.dylib), macOS-specific tools (dns-sd, osascript, PlistBuddy), and LaunchAgent plists. On Linux, launching a second instance failed to re-activate the background window.

📋 What changed

  • Desktop (Core & Platform): Guarded macOS Objective-C FFI and Cocoa window/notification calls behind DESKTOP.isDarwin, routing to Electrobun cross-platform notifications on Linux.
  • Desktop (Settings & Autostart): Added Zenity prompt support and standard FreeDesktop XDG .desktop autostart generation (~/.config/autostart) for Linux.
  • Desktop (IPC & Single-Instance): Added a local Unix domain socket IPC (desktop.sock) on Linux so clicking the application icon immediately wakes and focuses the background instance without crashing the JS engine with POSIX signals.
  • Desktop (Build & Packaging): Added linux build options (native WebKitGTK renderer, icon asset) and npm/turbo scripts (dev:linux, build:linux, dev:desktop:linux).
  • Web (Navigation): Exposed a "Quit Orbs" button in the sidebar device menu when running inside the desktop shell, and bound Ctrl+Q / Cmd+Q to graceful shutdown.

Left out on purpose: Windows-specific packaging and non-x64 Linux packaging (CEF).

💣 Blast radius

Review:
Affected paths:

  • apps/desktop/electrobun.config.ts
  • apps/desktop/package.json
  • apps/desktop/src/desktop.constants.ts
  • apps/desktop/src/desktop.ts
  • apps/desktop/src/desktop-network.ts
  • apps/desktop/src/desktop-notify.ts
  • apps/desktop/src/desktop-objc.ts
  • apps/desktop/src/desktop-settings.ts
  • apps/desktop/src/desktop-update.ts
  • apps/desktop/src/desktop-window.ts
  • apps/desktop/src/types/desktop.types.ts
  • apps/web/src/components/layout/layout-nav-device.tsx
  • apps/web/src/vite-env.d.ts
  • package.json
  • scripts/desktop.ts
  • turbo.json

✅ Before review

  • bun run check, bun run lint and bun run test
  • Tested on every affected platform
  • UI change: follows DESIGN.md, copy in i18n
  • Substantial change: orbs-review run in full, findings fixed

@JoseCoelho25
JoseCoelho25 requested a review from nikuscs as a code owner November 6, 2026 15:40
- Resolve the platform once as DESKTOP.platform ('macos' | 'linux') and
  branch with ts-pattern so each OS-specific path is exhaustive.
- Move single-instance, login item and launch-session setup into
  desktop-launch.ts; Linux claims a socket only after no running app answers.
- Linux autostart runs the bundled launcher with DESKTOP_LOGIN=1, the tray
  uses the bundled appIcon.png, Tailscale is found on PATH, and zenity
  failures surface as errors instead of a cancel.
- Drop the shortcut icon rewrite: Electrobun's installer already writes the
  absolute icon path and hashes the entry.
- Quit from the webview goes through Utils.quit so the local server stops
  first; Ctrl+Q and the quit bridge are Linux-only, and the app menu is set
  only on macOS.
- When the local server exits, the tray shows stopped with Retry, except for
  headless and macOS login launches that launchd restarts.
- Updates stay macOS-only; rename dev/build scripts to dev:app and build:app.
@nikuscs
nikuscs merged commit e48d36e into nikuscs:main Nov 6, 2026
4 checks passed
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.

3 participants