feat(desktop): restore primary app state#578
Conversation
Restore the primary Electron or Tauri client's window, zoom, workspace tabs, active sessions, drafts, bounded attachments, scroll positions, and panel layout across launches. Secondary processes continue to start normally without reading or writing the shared snapshot. Add versioned atomic native persistence, process ownership election, renderer capability tokens, bounded flush handshakes for shutdown and navigation, and translated settings to disable or clear restored state. Preserve future snapshot envelopes and merge partial or timed-out workspace hydration without resurrecting explicit user deletions. Correlate restore-created workspaces and harden startup cancellation and shutdown so late events cannot create ghost tabs or orphan child processes. Verify process identities before platform-specific cleanup, bound retries and shutdown, and report incomplete cleanup with a nonzero exit. Cover UI reconciliation and persistence races, Electron election and lifecycle behavior, Tauri navigation and shutdown, and server workspace process cleanup. Validated typechecks, native and focused regression suites, Electron build, and Tauri release build.
|
I want you to perform the gatekeeper checks for latest PR state check for regressions |
|
PR builds are available as GitHub Actions artifacts: https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/29092029490 Artifacts expire in 7 days.
|
Resolve bare Windows commands such as the npm-installed opencode shim through PATH and PATHEXT, then launch cmd, PowerShell, and native executables through the matching spawn path. Manage direct executables through their owned ChildProcess and stop script wrappers with bounded taskkill tree cleanup instead of repeated all-process CIM queries. Preserve incomplete cleanup state when taskkill fails so retries and shutdown cannot silently accept orphaned descendants or target a reused PID. Add regression coverage for the observed opencode.cmd timeout, direct executables, taskkill escalation and failure, wrapper exit races, retry behavior, and shutdown reporting.
|
PR builds are available as GitHub Actions artifacts: https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/29098938563 Artifacts expire in 7 days.
|
Keep virtualized message anchors under bounded stabilization until their measured offset settles, and prevent content growth from overwriting a valid restored position. Cancel restoration on explicit user navigation and guard callbacks across session changes. Restore the persisted Tauri zoom-in shortcut using the actual Ctrl/Cmd+Plus accelerator chord instead of Ctrl/Cmd+Equal. Add regression coverage for delayed and unstable anchor mounts, content churn, bounded fallback, cancellation, stale generations, and top-crossing anchor selection.
|
PR builds are available as GitHub Actions artifacts: https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/29103593207 Artifacts expire in 7 days.
|
Re-enable WebView zoom hotkeys and restore the original Windows View-menu labels for Ctrl++ and Ctrl+-. Remove the replacement menu accelerators that did not match the user's keyboard behavior.
|
PR builds are available as GitHub Actions artifacts: https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/29105202649 Artifacts expire in 7 days.
|
Observe WebView2 zoom-factor changes so native keyboard and wheel controls update the cached window zoom without replacing the existing shortcuts or menu labels. Primary windows capture and debounce the updated native factor into client state, while secondary windows keep only their local zoom cache current. Invalid native values are rejected and valid values use the existing clamp policy. Add normalization coverage and pin the Windows WebView2 callback dependency to the version used by the current Tauri runtime.
|
PR builds are available as GitHub Actions artifacts: https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/29106447067 Artifacts expire in 7 days.
|
Summary
Implementation
The restored shell state remains local to the desktop client. Durable semantic session properties continue to use OpenCode session metadata separately.
Validation
pm run typecheck
pm run typecheck --workspace @neuralnomads/codenomad
pm run build
pm run build:tauri
Platform notes