Desktop app track: S25, M46–M48 (native window, bundled daemon, native transport) #130

Open
opened 2026-10-04 02:16:27 +00:00 by jhgaylor · 0 comments
Owner

A desktop app for macOS and Linux: the web UI in a native window, and the app installs, supervises and upgrades illogicald. Control stays the SaaS layer, and the browser and phone clients stay as they are. The goal is a local experience much better than "curl a script, then open 127.0.0.1:7681 in a browser tab".

Decisions (Jake, 2026-10-03)

Question Decision Why
Where the daemon runs A separate service. The app bundles illogicald and illogical, registers the service and upgrades it in place. Sessions outlive the window. If the app process owned the PTYs, quitting it would end every pane.
Shell Tauri 2, decided by S25. Electron is the fallback. Rust fits the workspace and can link crates/proto. The risk is WebKitGTK on Linux.
Platforms macOS and Linux together. These are both of the daemon's platforms. Windows has no daemon (see Later).
Apple signing Unsigned for now (ad-hoc signed; right-click → Open past Gatekeeper). Notarization comes later and needs a Developer ID.

What the app gets that the PWA can't

  • Every key. The browser keeps Cmd/Ctrl-W, T, N, Q and Ctrl-Tab for itself, and Keyboard Lock only works in fullscreen.
  • One install, no version skew. The UI and the local daemon always ship together. An app update upgrades the daemon in place through the FD store or the holder shims, so panes survive it.
  • Reaching machines natively (M48). Tailnet and LAN dialed from Rust, so there's no Local Network Access prompt and no CORS or mixed-content problem. Device keys live in the Keychain or Secret Service instead of IndexedDB, which also sidesteps #94's class of browser key-storage bugs.
  • OS presence. The app adds:
    • a tray or menu bar icon with the swarm rail's "needs you" count, and a dock badge;
    • native notifications without web push;
    • a global hotkey;
    • an illogical:// URL scheme;
    • "Open in illogical" from Finder or Nautilus;
    • dropping files in to insert their paths;
    • a clipboard with no permission prompts;
    • tearing tabs out into their own windows.

S25: desktop shell spike (1–2 days)

Build a Tauri 2 shell that loads the current web client from the local daemon, then run it on geek (WebKitGTK) and jake-mini (WKWebView).

Measure:

  • xterm WebGL on WebKitGTK: frame rate and input-to-paint latency under a flood (yes, cat of a large log) and in vim and htop. Compare with Chrome on the same machine.
  • Every chord reaches the page: Ctrl/Cmd-W, T, N, Q, Tab, Ctrl-Shift-*, F-keys and Alt as Meta.
  • IME (Japanese, Korean), clipboard both ways, OSC 52.
  • Native notifications from the Rust side, and whether the service worker or push code needs a native path.
  • Multiple windows on one daemon, and titlebar tabs (the replacement for window-controls-overlay).
  • Bundle size and cold start time.

Go or no-go: WebKitGTK must be usable for daily work on geek (no visible input lag, no rendering bugs in the S1 fixtures). If it isn't, run the same checks in Electron and choose Electron. Write the findings to spikes/s25-desktop/README.md.

M46: the app as window, installer and supervisor

  • Crate. A new crates/desktop (Tauri) with its own CARGO_TARGET_DIR in CI.
  • Bundle. illogicald and illogical ship inside the app.
  • First run installs the service:
    • macOS: a LaunchAgent registered through SMAppService, so it shows under Login Items. It replaces illogicald install's plist when the app manages it.
    • Linux: the existing systemd user unit, with linger offered.
  • The CLI on PATH. Offer to link illogical into ~/.local/bin (or /usr/local/bin on macOS).
  • Upgrades. An app update upgrades the daemon through the existing in-place path, then reloads the window. Panes keep running: check this on both platforms.
  • Who owns the daemon. If a curl or Homebrew install already runs illogicald, the app detects it and either adopts it or asks once. It never runs two daemons.
  • The window loads the UI from the local daemon, so the UI and daemon versions match. Loopback auth stays as it is today.
  • Native polish:
    • all keys reach the page;
    • tabs in the titlebar;
    • multiple windows, with "move tab to new window";
    • the tray with the needs-you count, and a dock badge;
    • native notifications that open the right pane when clicked;
    • a global hotkey (off by default);
    • the illogical:// scheme: illogical://pane/%3, illogical://open?cwd=…;
    • dropping files in to insert their paths.
  • Packaging:
    • macOS: an ad-hoc signed .dmg for Apple silicon, built on jake-mini;
    • Linux: .deb, .rpm and AppImage for x86_64 and arm64. No Flatpak: its sandbox fights a multiplexer that has to start programs on the host.
  • Updates. The Tauri updater with a signed manifest on the release page. install.sh and Homebrew stay for headless machines.
  • Done when:
    • a fresh Mac and a fresh Ubuntu VM go from the downloaded app to a working pane without a terminal;
    • an app update keeps a running vim and a running build;
    • Cmd-W closes a pane and not the window;
    • a phone on the same daemon sees the same layout.

M47: OS integration

  • "Open in illogical" from Finder (a Services menu item or a Finder Sync extension) and Nautilus (a script or extension).
  • The app can be the default terminal handler where the OS allows it: x-scheme-handler/terminal and .command files.
  • Spotlight and app-launcher actions: a new tab in a directory, and jumping to a pane by name.
  • Done when right-clicking a folder in Finder or Nautilus opens a tab there in the running app.

M48: native transport

  • One owner for every connection. The app's Rust side holds all host connections: the local Unix socket, tailnet direct, and control's relay. Control's E2E crypto moves out of browser JS into Rust, shared with the daemon's.
  • The webview talks to it over Tauri IPC (a custom protocol carrying the same frames), so client.ts, hosts.ts and fleet.ts gain a transport and don't fork.
  • Device identity. The app is a device in control's model. Its key lives in the Keychain or Secret Service. Sign-in runs in the system browser (passkeys and GitHub as today) and returns through illogical://, and device approval is unchanged.
  • Done when:
    • the app reaches a tailnet machine and a relayed machine with no Local Network Access prompt;
    • its device key survives restarts and OS updates;
    • removing the device in control cuts it off at once.

Later (gated)

  • Notarized builds once there's a Developer ID. Notarization runs on jake-mini.
  • A native libghostty renderer in place of xterm.js. This ties to M8 and comes only if S25 or M46 show the webview renderer is the bottleneck.
  • A client-only Windows app that reaches machines through control. It's the same app without the bundled daemon.

Out of scope

  • The daemon running inside the app process.
  • Flatpak and Snap.
  • Dropping the browser or PWA client: the phone and other machines still use it.
A desktop app for macOS and Linux: the web UI in a native window, and the app installs, supervises and upgrades `illogicald`. Control stays the SaaS layer, and the browser and phone clients stay as they are. The goal is a local experience much better than "curl a script, then open `127.0.0.1:7681` in a browser tab". ## Decisions (Jake, 2026-10-03) | Question | Decision | Why | |---|---|---| | Where the daemon runs | **A separate service.** The app bundles `illogicald` and `illogical`, registers the service and upgrades it in place. | Sessions outlive the window. If the app process owned the PTYs, quitting it would end every pane. | | Shell | **Tauri 2, decided by S25.** Electron is the fallback. | Rust fits the workspace and can link `crates/proto`. The risk is WebKitGTK on Linux. | | Platforms | **macOS and Linux together.** | These are both of the daemon's platforms. Windows has no daemon (see Later). | | Apple signing | **Unsigned for now** (ad-hoc signed; right-click → Open past Gatekeeper). | Notarization comes later and needs a Developer ID. | ## What the app gets that the PWA can't - **Every key.** The browser keeps Cmd/Ctrl-W, T, N, Q and Ctrl-Tab for itself, and Keyboard Lock only works in fullscreen. - **One install, no version skew.** The UI and the local daemon always ship together. An app update upgrades the daemon in place through the FD store or the holder shims, so panes survive it. - **Reaching machines natively** (M48). Tailnet and LAN dialed from Rust, so there's no Local Network Access prompt and no CORS or mixed-content problem. Device keys live in the Keychain or Secret Service instead of IndexedDB, which also sidesteps #94's class of browser key-storage bugs. - **OS presence.** The app adds: - a tray or menu bar icon with the swarm rail's "needs you" count, and a dock badge; - native notifications without web push; - a global hotkey; - an `illogical://` URL scheme; - "Open in illogical" from Finder or Nautilus; - dropping files in to insert their paths; - a clipboard with no permission prompts; - tearing tabs out into their own windows. ## S25: desktop shell spike (1–2 days) Build a Tauri 2 shell that loads the current web client from the local daemon, then run it on geek (WebKitGTK) and jake-mini (WKWebView). **Measure:** - xterm WebGL on WebKitGTK: frame rate and input-to-paint latency under a flood (`yes`, `cat` of a large log) and in vim and htop. Compare with Chrome on the same machine. - Every chord reaches the page: Ctrl/Cmd-W, T, N, Q, Tab, Ctrl-Shift-*, F-keys and Alt as Meta. - IME (Japanese, Korean), clipboard both ways, OSC 52. - Native notifications from the Rust side, and whether the service worker or push code needs a native path. - Multiple windows on one daemon, and titlebar tabs (the replacement for `window-controls-overlay`). - Bundle size and cold start time. **Go or no-go:** WebKitGTK must be usable for daily work on geek (no visible input lag, no rendering bugs in the S1 fixtures). If it isn't, run the same checks in Electron and choose Electron. Write the findings to `spikes/s25-desktop/README.md`. ## M46: the app as window, installer and supervisor - **Crate.** A new `crates/desktop` (Tauri) with its own `CARGO_TARGET_DIR` in CI. - **Bundle.** `illogicald` and `illogical` ship inside the app. - **First run** installs the service: - macOS: a LaunchAgent registered through SMAppService, so it shows under Login Items. It replaces `illogicald install`'s plist when the app manages it. - Linux: the existing systemd user unit, with linger offered. - **The CLI on PATH.** Offer to link `illogical` into `~/.local/bin` (or `/usr/local/bin` on macOS). - **Upgrades.** An app update upgrades the daemon through the existing in-place path, then reloads the window. Panes keep running: check this on both platforms. - **Who owns the daemon.** If a curl or Homebrew install already runs `illogicald`, the app detects it and either adopts it or asks once. It never runs two daemons. - **The window** loads the UI from the local daemon, so the UI and daemon versions match. Loopback auth stays as it is today. - **Native polish:** - all keys reach the page; - tabs in the titlebar; - multiple windows, with "move tab to new window"; - the tray with the needs-you count, and a dock badge; - native notifications that open the right pane when clicked; - a global hotkey (off by default); - the `illogical://` scheme: `illogical://pane/%3`, `illogical://open?cwd=…`; - dropping files in to insert their paths. - **Packaging:** - macOS: an ad-hoc signed `.dmg` for Apple silicon, built on jake-mini; - Linux: `.deb`, `.rpm` and AppImage for x86_64 and arm64. No Flatpak: its sandbox fights a multiplexer that has to start programs on the host. - **Updates.** The Tauri updater with a signed manifest on the release page. `install.sh` and Homebrew stay for headless machines. - **Done when:** - a fresh Mac and a fresh Ubuntu VM go from the downloaded app to a working pane without a terminal; - an app update keeps a running `vim` and a running build; - Cmd-W closes a pane and not the window; - a phone on the same daemon sees the same layout. ## M47: OS integration - "Open in illogical" from Finder (a Services menu item or a Finder Sync extension) and Nautilus (a script or extension). - The app can be the default terminal handler where the OS allows it: `x-scheme-handler/terminal` and `.command` files. - Spotlight and app-launcher actions: a new tab in a directory, and jumping to a pane by name. - **Done when** right-clicking a folder in Finder or Nautilus opens a tab there in the running app. ## M48: native transport - **One owner for every connection.** The app's Rust side holds all host connections: the local Unix socket, tailnet direct, and control's relay. Control's E2E crypto moves out of browser JS into Rust, shared with the daemon's. - **The webview** talks to it over Tauri IPC (a custom protocol carrying the same frames), so `client.ts`, `hosts.ts` and `fleet.ts` gain a transport and don't fork. - **Device identity.** The app is a device in control's model. Its key lives in the Keychain or Secret Service. Sign-in runs in the system browser (passkeys and GitHub as today) and returns through `illogical://`, and device approval is unchanged. - **Done when:** - the app reaches a tailnet machine and a relayed machine with no Local Network Access prompt; - its device key survives restarts and OS updates; - removing the device in control cuts it off at once. ## Later (gated) - **Notarized builds** once there's a Developer ID. Notarization runs on jake-mini. - **A native libghostty renderer** in place of xterm.js. This ties to M8 and comes only if S25 or M46 show the webview renderer is the bottleneck. - **A client-only Windows app** that reaches machines through control. It's the same app without the bundled daemon. ## Out of scope - The daemon running inside the app process. - Flatpak and Snap. - Dropping the browser or PWA client: the phone and other machines still use it.
Commenting is not possible because the repository is archived.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jhgaylor/illogical#130
No description provided.