Desktop app
An Electron app in desktop/ that is one more client of the daemon. Everything that does agent work stays in the daemon.
The current Windows package is 0.5.2; Linux/macOS packages remain at 0.4.0. For installation and ordinary use, start with the user manual or installation guide.
Run it
cd desktop && npm install # downloads Electron 42.3.3
bun run build.ts # writes desktop/dist
npx electron . # starts the app; it starts and supervises the daemon
Environment: RIGWELL_HOME (data folder), RIGWELL_DAEMON_CMD (JSON array that starts the CLI, default ["bun", "<repo>/src/cli/main.ts"]),
--route=/path (first route). On Linux as root add --no-sandbox; headless needs an X server (Xvfb).
Parts
| Part | Where |
|---|---|
| Main process: windows, menu, deep links, IPC, notifications, sounds | desktop/main/main.ts |
| Daemon supervisor (restart on crash) | desktop/main/supervisor.ts |
| Connection broker and attention tracking | desktop/main/broker.ts, src/sidepane/attention.ts |
| Browser pane CDP proxy | desktop/main/cdp-proxy.ts |
| Appearance before paint, alerts, settings, security helpers | desktop/main/{appearance,alerts,settings,security}.ts |
Preload bridge (window.rigwell) | desktop/preload/preload.ts |
| Renderer (React) | desktop/renderer/ |
| Daemon side pane services | src/sidepane/{files,pty,browser,sidechat,index}.ts |
Daemon methods added (prefix rigwell.)
daemon.list_sessions, daemon.list_files, daemon.search_files, daemon.get_workspace_file_content, daemon.write_workspace_file_content
(stale write: error -32006), daemon.create_terminal, daemon.write_terminal_data, daemon.resize_terminal, daemon.close_terminal,
daemon.list_terminals (adopts and returns scrollback in state.serialized), daemon.browser_attach, daemon.browser_detach,
daemon.browser_status, daemon.side_chat_ask, daemon.side_chat_list, daemon.side_chat_cancel.
Notifications inside session_notification: daemon.terminal_data, daemon.terminal_exit, daemon.side_chat_entry.
Agent tool: Browser.
Pages added in the gap wave
Routes: #/missions, #/missions/<sessionId>, #/automations, #/automations/<id>, and settings pages session-defaults, missions,
custom-models, worktrees, connectors, session-management, usage. The sidebar lists Mission Control and Automations, shows pinned
sessions first and hides archived ones, and has an Add folder button that runs the trust prompt. The session header menu has Pin, Rename and
Archive (rigwell.pin_session, rename_session, archive_session; list_sessions falls back to daemon.list_sessions on older daemons).
The composer has a searchable model picker, a Normal / Spec / Mission mode menu, and Connectors and Skills dialogs. Home has a Worktree toggle
(defaults to the runInWorktree setting). The browser pane can reopen closed tabs, move tabs, step to the next or previous tab and take a screenshot.
Main process helpers: desktop/main/user-settings.ts (masked settings file, trusted folders, setup profiles) and desktop/main/skills.ts.
Pull requests
Settings > Worktrees has Create PR and Refresh PR controls for each managed worktree. Enter the title, body, optional base and draft state, then review the branch push and PR content in the permission panel. Cancel leaves the remote untouched. The daemon checks that the checkout and origin have not changed while approval was open, pushes to origin, and creates the PR. It never merges.
GitHub uses a signed-in gh, GitLab a signed-in glab. Without the corresponding CLI, the daemon uses
the provider API and the github or gitlab token in Rigwell's credential store. Public GitHub and
GitLab origins are supported. A failed provider operation after the push explicitly reports that the
branch was pushed so the user can check status before retrying.
The TUI command /pr shows status and checks; /pr create "Title" "Body" [base] [--draft] starts the
same approval flow. Protocol methods are rigwell.create_pr {worktreePath, title?, body?, base?, draft?}
and rigwell.get_pr_status {worktreePath}. Creation returns {url, number}; status returns
{state: "none" | "open" | "merged" | "closed", url?, number?, checks: [{name, state}]}.
Headless connections without an approver refuse creation. Automatic cleanup retains branches with an
open PR, and retains worktrees when provider status cannot be checked. Merged and closed PRs do not
prevent cleanup when the other safety checks pass.
Packaging, fuses and updates
cd desktop && npm install
bun run package:linux # AppImage + deb in desktop/release (also release/linux-unpacked)
bun run package:mac # dmg + zip (config only; must run on macOS)
bun run package:win # NSIS (config only; run on Windows or with wine; set RIGWELL_BUN_BIN to a Windows bun.exe)
bun run desktop is the same as package for the host platform. The packaged app carries the bun runtime and the daemon sources in
resources/, and starts its daemon from them. Fuses are flipped in packaging/fuses.cjs (decision 285).
Update feed: set updateFeedUrl in Settings > General, or RIGWELL_UPDATE_URL. The URL is a folder holding latest-linux.yml,
latest-mac.yml and latest.yml as electron-builder writes them (or one .yml/.yaml/.json file):
version: 1.4.0
releaseDate: '2026-11-01T00:00:00.000Z'
releaseNotes: Faster startup
files:
- url: rigwell-1.4.0-x86_64.AppImage # relative to the feed, or absolute
sha512: ...
size: 178823051
Help > Check for Updates compares version with the app version.
Renderer stack
React 19, xterm.js, tiptap (composer), shiki (code), KaTeX (math) and mermaid (diagrams). Markdown: $x$ and $$...$$ are math, a
## Tests
`bun test test/desktop`. The Electron and Chromium tests skip (printing the cause) when Electron, Playwright, Chromium or Xvfb is missing. `packaging.test.ts` needs a built Linux package (`RIGWELL_BUILD_PACKAGE=1` builds one).
## Wave 4 features (owner approved)
| Feature | Where | Notes |
|---|---|---|
| Voice dictation | composer microphone button, Ctrl+Shift+D, Settings > Voice dictation | offline first, see below |
| API keys, environments, accounts | Settings > API keys, Environments, Accounts | secrets are write-only; sign-in uses `auth_*` |
| Tray icon | Settings > General > Tray icon | Show/Hide, active sessions, attention, Quit |
| Chrome cookie import | Browser tab > Import cookies | explicit, per site, never logged |
| Automation templates, overview, guided setup | Automations page | uses `docs/automations.md` methods |
| Spec handoff | Spec prompt | "Hand off to a new session" options with context savings |
| `[managed by org]` labels | settings headings | org file from `RIGWELL_ORG_MANAGED_SETTINGS_LOCAL_PATH` |
### Voice dictation
By default nothing is configured, and the microphone button explains how to enable it. Recording happens in the window; the audio goes only to the backend you choose.
- Local command: install whisper.cpp (`whisper-cli`) and a ggml model, then Settings > Voice dictation > Local command, and set the model path. Or give a full command line with `{file}` for the recording: `whisper-cli -m /models/ggml-base.en.bin -f {file} -nt -np`. The Python `whisper` CLI works too (`whisper {file} --model base`).
- Remote endpoint: an OpenAI-compatible `.../audio/transcriptions` URL. The recording is sent to that server. The API key is read from the environment variable you name; it is not stored in a file.
### Signed Linux updates (spec 14.5)
Linux updates are installed only if their Ed25519 signature verifies against the embedded release public key. Settings or the environment can select a different release key. The private signing key never ships in the app. An explicitly empty saved key refuses updates.
bun desktop/packaging/sign-update.ts keygen ~/rigwell-keys # writes update-private.pem, prints the public key
bun desktop/packaging/sign-update.ts sign ~/rigwell-keys/update-private.pem rigwell-1.4.0-x86_64.AppImage # writes
Put the printed public key in Settings > General > Update public key (or set `RIGWELL_UPDATE_PUBLIC_KEY`), publish the `.sig` next to the artifact (or add `signature: <base64>` to its entry under `files:` in `latest-linux.yml`), and keep the private key off the feed host. A bad signature, a changed file, a missing signature or a wrong `sha512` / `size` refuses the update and leaves nothing on disk.
### Chrome cookie import
Browser tab > Import cookies. Pick a Chrome or Chromium profile, press Show sites (only host names and counts are read), tick the sites and Import. Only those sites' cookies are copied into the browser pane. On macOS the system may ask for access to "Chrome Safe Storage"; on Linux the key comes from libsecret (`secret-tool`) or Chrome's fixed fallback. Windows is not supported. `RIGWELL_CHROME_USER_DATA_DIR` selects another Chrome folder.
### Icons and the tray
`desktop/assets/icon.svg` is the source. `cd desktop && bun run packaging/build-icons.ts` regenerates `assets/icons/*.png`, `icon.ico`, `icon.icns` and `assets/tray/*.png` (needs the Playwright Chromium). The generated files are committed.
### Tests for these features
`bun test test/desktop/electron-wave4.test.ts` drives the real app: dictation with a fake speech-to-text program, secrets, OAuth against `test/fakes/fake-oauth.ts`, org labels, templates, overview and guided setup, tray (through the `RIGWELL_TEST_HOOKS=1` hook), spec handoff and cookie import with a synthetic database. Unit tests: `chrome-cookies`, `update-verify`, `dictation`, `tray`, `wave4-lib` in `test/desktop`, `test/tui/login.test.ts`.
### Branch and PR review
See [Review](review.md) for branch/PR loading, semantic changes, line comments, confirmed posting and `/review` in the TUI.