Context
A performance/architecture review of comparable Tauri-based agentic development environments (against the official Tauri v2 and xterm.js docs) surfaced a set of concrete improvements for Codemux's stack (Tauri + Rust + React/TS). This is the tracking issue.
Already in good shape (validated, no action): Bun-based agent sidecar runtime, per-workspace port + CODEMUX_* env isolation, desktop setup-script hook, PTY output already streamed over a Tauri Channel, and chat messages already React.memo'd with stable keys + tail-isolated streaming.
The items below are the real gaps. Each linked issue is self-contained (file:line evidence, steps, acceptance criteria, verify commands).
Recommended sequence
Start with the terminal + main-thread wins — highest leverage, lowest risk, and several reuse code already in the tree.
Tier 1 — quick / high-leverage
Tier 2 — high-leverage, medium effort
Tier 3 — lower urgency / larger
Optional / feature
Explicitly out of scope (reviewed and rejected)
- Migrating React Router → TanStack Router for perf — the claimed gain could not be substantiated.
- Idle-agent shutdown +
--resume <uuid> lifecycle changes — unsubstantiated; our Bun sidecar model already differs.
- Switching the agent runtime to Bun — already done.
Context
A performance/architecture review of comparable Tauri-based agentic development environments (against the official Tauri v2 and xterm.js docs) surfaced a set of concrete improvements for Codemux's stack (Tauri + Rust + React/TS). This is the tracking issue.
Already in good shape (validated, no action): Bun-based agent sidecar runtime, per-workspace port +
CODEMUX_*env isolation, desktop setup-script hook, PTY output already streamed over a TauriChannel, and chat messages alreadyReact.memo'd with stable keys + tail-isolated streaming.The items below are the real gaps. Each linked issue is self-contained (file:line evidence, steps, acceptance criteria, verify commands).
Recommended sequence
Start with the terminal + main-thread wins — highest leverage, lowest risk, and several reuse code already in the tree.
Tier 1 — quick / high-leverage
[perf][terminal]Enable the xterm.js WebGL renderer (dep already installed, just not loaded). Small.[perf][terminal]PTY producer back-pressure on the live path (commands exist but are daemon-only no-ops; in-process read loop needs the paused flag). Medium.Tier 2 — high-leverage, medium effort
[perf]Move 6 blockingworkspace.rscommands off the main thread (async helperpopulate_git_info_asyncalready exists). Medium, low risk.[perf][agent-chat]Stream chat events over a Tauri Channel instead of the global event bus. Medium–large.[git]Fetch origin before creating a new workspace branch (it targetsorigin/<base>but never fetches). Low–medium.Tier 3 — lower urgency / larger
[perf][chat]Virtualize the agent-chat message list (memo already mitigates per-token cost; this addresses the 5k-message ceiling). Large.[remote]Headless daemon worktree creation: setup scripts + fetch-before-branch parity. Medium (shares code with [git] Fetch origin before creating a new workspace branch so it starts from the latest remote #76).[perf]Move blockingfiles.rscommands off the main thread. Medium (same fix class as [perf] Move blocking workspace.rs commands off the GTK main thread (async + spawn_blocking) #74).Optional / feature
[feature]Optional background rollback checkpoint at agent-run start (must be async/off the first-token path). Large.Explicitly out of scope (reviewed and rejected)
--resume <uuid>lifecycle changes — unsubstantiated; our Bun sidecar model already differs.