mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 08:02:28 +00:00
fix(terminal): let a park capture survive an unhydrated repo catalog
Reading state.repos unguarded threw out of the cold-park effect whenever the catalog was absent, which would break parking itself. Capture is best-effort evidence; an empty catalog also fails open in shouldPreserveTerminalScrollbackBuffers, the safe direction for a park.
This commit is contained in:
@@ -21,7 +21,10 @@ export function captureNewlyParkedTerminalTabs(
|
||||
if (capturedTabIds.size === parkedTabIds.size) {
|
||||
return
|
||||
}
|
||||
const repos = useAppStore.getState().repos
|
||||
// Why the fallback: capture is best-effort evidence and must never throw out of the park pass.
|
||||
// An unhydrated catalog also fails open in shouldPreserveTerminalScrollbackBuffers — the safe
|
||||
// direction, since a worktree wrongly judged local would park with no copy at all.
|
||||
const repos = useAppStore.getState().repos ?? []
|
||||
for (const tabId of parkedTabIds) {
|
||||
if (capturedTabIds.has(tabId)) {
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user