diff --git a/src/main/persistence/loading-store/terminal-session-cleanup.ts b/src/main/persistence/loading-store/terminal-session-cleanup.ts index 2981cabc114..dede6bf8747 100644 --- a/src/main/persistence/loading-store/terminal-session-cleanup.ts +++ b/src/main/persistence/loading-store/terminal-session-cleanup.ts @@ -8,6 +8,11 @@ import { type TerminalScrollbackSnapshotStorage } from '../../terminal-scrollback-snapshots' +// Why localOnlyScrollbackByTabId is deliberately NOT here despite TERMINAL_SCROLLBACK_SESSION_HOMES +// pairing it with terminalLayoutsByTabId: full normalization reaches the fail-closed strip in +// workspace-session-terminal-buffers.ts, which drops a leaf whose worktree main cannot attribute — +// the renderer already capped that field with attribution in hand, and re-stripping it here is the +// scrollback loss the local-only home exists to prevent. Add it only together with that strip. const WORKSPACE_SESSION_PATCH_FULL_NORMALIZATION_KEYS = new Set([ 'tabsByWorktree', 'terminalLayoutsByTabId'