Skip to content

feat(desktop): introduce Tauri client with multi-tab concurrent runtimes#689

Merged
esengine merged 1 commit into
mainfrom
feat/desktop-client
May 12, 2026
Merged

feat(desktop): introduce Tauri client with multi-tab concurrent runtimes#689
esengine merged 1 commit into
mainfrom
feat/desktop-client

Conversation

@esengine

Copy link
Copy Markdown
Owner

Summary

  • New desktop/ Tauri shell that drives a reasonix desktop JSON-RPC subcommand over stdio. Each tab owns an independent CacheFirstLoop, workspace, session, and file/symbol index — two projects can stream in parallel without blocking each other or crossing approvals.
  • Extracts buildCodeToolset into src/code/setup.ts so the desktop and the code command share an identical tool surface. Wires web_search / web_fetch and run_skill (with subagent runner) on the way through — both were exported but never registered.
  • pauseGate confirm / choice / plan routing uses AsyncLocalStorage to attribute requests to the tab whose async chain is currently running, so concurrent shell prompts can't land in the wrong tab.
  • CacheFirstLoop._turn advances past loaded assistant messages on resume — the frontend's turn-keyed message map would otherwise treat a fresh response as a duplicate of an historical turn and route deltas into the old bubble.
  • Release workflow builds Tauri bundles for linux-x64, macos-arm64, macos-x64, windows-x64 on tag push. Signing keys flow through env (Apple notary, Windows Authenticode, Tauri updater); details in desktop/SIGNING.md.

What's in the desktop client

  • Multi-tab: Ctrl+T new, Ctrl+W close, Ctrl+Tab / Ctrl+Shift+Tab switch. Inactive tabs stay mounted (display: none) so they keep receiving streaming events.
  • Workspace switcher: clickable pill in the Header opens a dropdown with current + recent (cap 8, persisted) + Pick-another-folder via Tauri dialog plugin.
  • Sessions: backend mints desktop-<timestamp>-<tabIdx> per tab, writes meta.workspace for filtering. Click in sidebar to resume — runtime rebuilds with the picked session, meta.totalCostUsd / cacheHitTokens carryover seeded into the frontend's usage.
  • @-mentions: file picker with preview (head 12 lines), @dir/ directory browse, @symbol exported-name search, recently-used promotion.
  • Settings panel: API key (editable), workspace, preset (auto/flash/pro), reasoning effort, edit mode, budget cap, base URL, theme (dark/light), currency (CNY/USD), editor command.
  • Editor open: clicking a file pill / path link invokes a custom open_in_editor Tauri command that spawns the configured editor (code, cursor, windsurf, ...) through cmd /c on Windows so .cmd shims resolve. Falls back to OS default when no editor is set. Line jump via -g path:line when the editor supports it.
  • Streaming polish: rAF-batched per-tab delta dispatch, blinking caret block on the last live segment, ThinkingBar with integrated Stop button, Esc as global abort.

Test plan

  • npm run verify clean
  • cd desktop && npm run tauri dev boots, shows the whale empty state
  • Single turn streams to completion; tool calls render with file pills
  • @ opens picker, preview pane renders head of selected file
  • @src/ lists files + folders in src; picking a folder re-queries
  • Click sidebar session → history renders, send a new message → fresh assistant bubble streams (not appended to historical one)
  • Ctrl+T opens second tab, point at a different workspace; turn A and turn B stream concurrently; shell-approval modals land in the originating tab
  • Pick VS Code editor in Settings, click src/foo.ts:42 in agent output → opens in VS Code at line 42
  • Tag-push triggers .github/workflows/release.yml (or workflow_dispatch with a tag) and produces installers per platform

Native shell that drives a new `reasonix desktop` JSON-RPC subcommand
over stdio. Each tab owns an independent CacheFirstLoop, workspace,
session, and file/symbol index so two projects can stream in parallel
without crossing context.

Extracts buildCodeToolset into src/code/setup.ts so the desktop and
the `code` command share an identical tool surface. While extracting,
wires up web (web_search / web_fetch) and skill (run_skill +
subagent runner) tools — they were exported but never registered.

pauseGate confirm / choice / plan requests route via AsyncLocalStorage
so concurrent turns can't cross approvals. CacheFirstLoop._turn now
advances past loaded assistant messages on resume — the frontend's
turn-keyed message map would otherwise treat a fresh streaming
response as a duplicate of an historical message.

Release workflow builds Tauri bundles for linux-x64, macos-arm64,
macos-x64, windows-x64 on tag push and uploads to GitHub Releases.
Signing keys flow through env (Apple notary, Windows Authenticode,
Tauri updater); see desktop/SIGNING.md.
@esengine esengine merged commit 63472b6 into main May 12, 2026
3 checks passed
@esengine esengine deleted the feat/desktop-client branch May 12, 2026 07:14
esengine added a commit that referenced this pull request May 12, 2026
…il, CardStream fix (#705)

npm-only release. The Tauri desktop source is in the repo and the CLI
subcommand works, but installer bundles for macOS / Windows / Linux
don't ship this round (separate release once signing's settled).

Highlights:
- Tauri desktop client with multi-tab concurrent runtimes (#689)
  plus a near-full polish pass: wallet balance, version chip, active-
  plan rail, abortable pause-gates, edit-gate pill, en + zh-CN i18n,
  shared pause-policy module dedup'd with the CLI TUI (#701)
- checkpoint API + git-changes panel in the embedded dashboard (#682)
- outside-sandbox file access approval modal (#696)
- MCP loading pill + readiness gate on tool dispatch (#687)
- escalate-after flag for flash → pro threshold (#699)

Fixes:
- CardStream Maximum-update-depth crash, quantize window so boundary
  cards stop oscillating (#700, #702)
- `reasonix code` bridges config key to env + lazy subagent client so
  fresh installs can reach the setup wizard (#703)
- pinned-mode scroll shrinks coalesced (#666), generic CSI key decode
  (#692), shell-confirm preview clamp (#691), frontmatter BOM/folded
  lines (#690), MCP error classification (#688), and more
ChasLui pushed a commit to ChasLui/DeepSeek-Reasonix that referenced this pull request May 23, 2026
…mes (esengine#689)

Native shell that drives a new `reasonix desktop` JSON-RPC subcommand
over stdio. Each tab owns an independent CacheFirstLoop, workspace,
session, and file/symbol index so two projects can stream in parallel
without crossing context.

Extracts buildCodeToolset into src/code/setup.ts so the desktop and
the `code` command share an identical tool surface. While extracting,
wires up web (web_search / web_fetch) and skill (run_skill +
subagent runner) tools — they were exported but never registered.

pauseGate confirm / choice / plan requests route via AsyncLocalStorage
so concurrent turns can't cross approvals. CacheFirstLoop._turn now
advances past loaded assistant messages on resume — the frontend's
turn-keyed message map would otherwise treat a fresh streaming
response as a duplicate of an historical message.

Release workflow builds Tauri bundles for linux-x64, macos-arm64,
macos-x64, windows-x64 on tag push and uploads to GitHub Releases.
Signing keys flow through env (Apple notary, Windows Authenticode,
Tauri updater); see desktop/SIGNING.md.
ChasLui pushed a commit to ChasLui/DeepSeek-Reasonix that referenced this pull request May 23, 2026
…il, CardStream fix (esengine#705)

npm-only release. The Tauri desktop source is in the repo and the CLI
subcommand works, but installer bundles for macOS / Windows / Linux
don't ship this round (separate release once signing's settled).

Highlights:
- Tauri desktop client with multi-tab concurrent runtimes (esengine#689)
  plus a near-full polish pass: wallet balance, version chip, active-
  plan rail, abortable pause-gates, edit-gate pill, en + zh-CN i18n,
  shared pause-policy module dedup'd with the CLI TUI (esengine#701)
- checkpoint API + git-changes panel in the embedded dashboard (esengine#682)
- outside-sandbox file access approval modal (esengine#696)
- MCP loading pill + readiness gate on tool dispatch (esengine#687)
- escalate-after flag for flash → pro threshold (esengine#699)

Fixes:
- CardStream Maximum-update-depth crash, quantize window so boundary
  cards stop oscillating (esengine#700, esengine#702)
- `reasonix code` bridges config key to env + lazy subagent client so
  fresh installs can reach the setup wizard (esengine#703)
- pinned-mode scroll shrinks coalesced (esengine#666), generic CSI key decode
  (esengine#692), shell-confirm preview clamp (esengine#691), frontmatter BOM/folded
  lines (esengine#690), MCP error classification (esengine#688), and more
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.

1 participant