Skip to content

fix(workspace): carry v2 bury notes and harden degenerate-shape migration #1030

Description

@Juliusolsson05

Follow-ups from #1013 review A (persistence). None of these block #1013.

  1. Bury notes are dropped. v2's bury prompt stored an optional user-typed note (LegacyBuriedPaneRecord.note, legacyWorkspaceV2.ts:75). legacyMemberships carries only the metadata and buriedAt, so the note is lost on migration. v3 has no parked-note UI, so carrying the text would also need a place to show it; decide the surface first. The owner's own file has 0 buried panes.
  2. A v2 file with zero tabs drops its buried rows. The active project becomes '', then undefined, and the rows are dropped (workspaceShape.ts:138-141,165,170). v2 kept buried panes unconditionally.
  3. Hand-edited files can unlock autosave over an empty pool. tabs: null, or a non-array projects, migrates to an empty pool; rehydrate then mints a tab and reports complete: true (rehydrate.ts:790-793). v2 threw into the locked fallback instead. The safer rule: an unparseable container is unreadable, never an empty pool.
  4. Closing a hibernated terminal leaks its tmux session until the next launch's sweep. killSessionBackendIfOwned (session.ts:129-150) passes no tmuxName. There are more such terminals now, because boot hibernates everything but the focused lane.

Each fix needs a fail-first test on a real recorded document. testing/fixtures/workspace-v2/ and testing/fixtures/worktree-context/ are the corpus.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions