hex/docs/plans/shared-desktop-ui.md
Dax Raad ecb228b8a0 feat(updater): one in-app updater on the Anomaly release service; drop Sparkle
Hex polls anoma.ly/release/hex/desktop/<channel>.json on every OS and decides
with the release protocol's client rules (the service's shared test vectors in
tests/fixtures/release-protocol): strictly newer unless revoked, the minimum
version before rollout, and a device-local rollout bucket that is never sent.
Direct installs (Linux and Windows with the installer's receipt, macOS a
replaceable Hex.app) download resumably, check size and SHA-256, then the OS
code signature (macOS app/update-requirement.txt: Developer ID 5NZ4Q7NXJ4,
anomaly.hex, notarized; Windows Authenticode from Anomaly's Artifact Signing
identity), and stage the update for Restart to update. macOS swaps the bundle
in with renamex_np(RENAME_SWAP) at restart or quit; a read-only location links
to the DMG. Package-managed installs show their manager's command; source and
test builds never check; DisableUpdates (macOS defaults, Windows policy key)
turns checks off.

Sparkle, its framework, Info.plist keys, appcast generation, and the ed25519
feeds are gone. release-app.sh prepare leaves Hex-<v>-macos-arm64.dmg and .zip
(root Hex.app). Macs on 2.3.1 get packaging/macos/legacy-appcast.xml: one
informational item linking to anoma.ly/hex.
2026-10-24 11:03:26 -04:00

2.6 KiB

Share The Desktop UI Across macOS, Windows, And Linux

Status: Implemented, now on Rune. macOS, Windows, and Linux open the same window (src/rune_ui.rs) and read and write the same settings.json. Each OS supplies only its host and its native pieces; the GPUI AppWindow this plan first described is deleted (see rune-ui.md).

One Window, Per-OS Hosts

src/rune_ui.rs and its pane modules render every pane. platform::Capabilities decides which panes and rows exist on an OS, so a missing capability omits a row instead of showing a disabled imitation. Each OS connects the window to its runtime through a host module:

src/rune_ui/macos_host.rs    the menu-bar runtime: permissions, Meetings,
                             Commands, updater, Dock icon, chord capture
src/rune_ui/windows_host.rs  the tray runtime: listener host, updater,
                             keyboard-state shortcut capture, Launch at login
src/rune_ui/linux_host.rs    the in-process Linux host: shortcut capture,
                             model preparation, and settings adoption
Capability macOS Windows Linux
Modes, Voice Action, History Yes Yes Yes
Commands, Meetings, permissions, Dock icon Yes No No
Listener card and Enable on launch No Yes Yes
Website mode rules Brave Any browser (UI Automation) No
Left/right modifier sides Yes No No
Terminal paste No No Yes
Launch at login Yes Yes No (the installer or Nix owns autostart)

One Settings File

AppSettings is the only settings type. Shortcuts are one HotkeyBinding: macOS keys by layout keycode, Windows and Linux keys by name, each with its own keycaps and defaults. windows-settings.json and linux-settings.json migrate once into settings.json and stay behind as *.migrated. One-time changes, such as moving English dictation to the streaming model, record their ID in migrations so they never run twice.

Shared Dictation Behavior

The Windows and Linux listeners share dictation_modes::ModeRuntime for mode selection and processing, and both record History. On Linux, the single Hex process owns the window, registers the shortcuts Settings records (X11 grabs or the Wayland shortcuts portal), prepares models, applies saved settings live, and shares History in-process (also rereading the file when a standalone CLI run wrote it).

Interface Language

Every string the shared window shows goes through desktop_i18n::tr, tr_fill, or tr_named, with Polish, Chinese, Japanese, German, and Spanish translations. A test fails if any translated string lacks a language.