Skip to content

Store hardening, session restore and placement fixes#369

Merged
Anton-Horn merged 2 commits into
mainfrom
fix/store-hardening-session-placement
Jun 10, 2026
Merged

Store hardening, session restore and placement fixes#369
Anton-Horn merged 2 commits into
mainfrom
fix/store-hardening-session-placement

Conversation

@Anton-Horn

Copy link
Copy Markdown
Contributor

Hardening and bugfix batch plus a large set of regression tests.

  • Corrupt JSON files (settings, granted paths, workspace/session files) now get quarantined to a .corrupt- backup instead of being silently overwritten with defaults
  • workspace.json is structure-validated on load and falls back to .bak when the primary parses but is broken
  • Terminal ids are sanitized before being joined into scrollback/log paths
  • Dock window snapshots with panels but no zone layout recover into a tab stack instead of losing the panels
  • New panels land on the active canvas instead of the primary one when a secondary canvas tab is focused
  • Session save captures terminal cwds for all activated workspaces, not just the selected one
  • Dock tabs remount content per panel id so switching canvas-to-canvas or terminal-to-terminal never reuses the old instance
  • Agent panel resets a saved model from a since-disconnected provider instead of prompting to reconnect

New test suites cover dock/window flush races, placement, canvas/panel/terminal lifecycle, session serialize round-trip, panel transfer, and a multi-canvas e2e spec.

Typecheck and full vitest suite (1541 tests) pass.

- quarantine corrupt JSON (userData stores, granted paths, workspace files)
  via shared quarantineCorruptFile instead of silently overwriting
- validate workspace.json container shapes and fall through to .bak when the
  primary is parseable but structurally broken
- reject terminal ids with path separators before joining log paths
- recover dock window snapshots whose zones reference no panels by laying the
  orphaned panels into a fresh tab stack instead of dropping them
- land keyboard-created panels on the active canvas, not the primary one
- capture live terminal cwds for every activated workspace on session save
- remount dock tab content when switching between same-type tabs so a reused
  instance never drives the previous tab's store
- agent panel: drop stale model picks from disconnected providers once auth
  status arrives, unify composer disabled/placeholder states
- add regression suites: dock/window flush races, placement, canvas and panel
  lifecycle, terminal lifecycle and logger, session serialize round-trip,
  panel transfer, plus a multi-canvas e2e spec
stream.end() releases the fd asynchronously; on Windows the open handle
made the afterEach rmSync fail with ENOTEMPTY. Retry the removal until
the close lands.
@Anton-Horn Anton-Horn merged commit 3953cf8 into main Jun 10, 2026
3 checks passed
@Anton-Horn Anton-Horn deleted the fix/store-hardening-session-placement branch June 10, 2026 21:56
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