mirror of
https://github.com/stablyai/orca.git
synced 2026-09-25 16:02:38 +00:00
test(renderer): cover parked worktree intent cleanup
This commit is contained in:
+18
@@ -1,6 +1,7 @@
|
||||
import { afterEach, describe, expect, it } from 'vitest'
|
||||
import {
|
||||
captureParkedTerminalPaneCandidates,
|
||||
pruneParkedTerminalWatchers,
|
||||
retireParkedTerminalTab
|
||||
} from './terminal-parked-watcher-registry'
|
||||
import {
|
||||
@@ -107,6 +108,23 @@ it('releases captured scroll-intent keys when a parked tab is closed', () => {
|
||||
expect(readTerminalScrollIntentKeyRetention().intents).toBe(0)
|
||||
})
|
||||
|
||||
it('releases captured scroll-intent keys when a parked worktree is removed', () => {
|
||||
writeKeyedTerminalScrollIntent(SECOND_LEAF_ID, {
|
||||
kind: 'pinnedViewport',
|
||||
bufferType: 'normal',
|
||||
viewportY: 8,
|
||||
baseY: 16,
|
||||
revision: 1
|
||||
})
|
||||
captureParkedTerminalPaneCandidates(TAB_ID, WORKTREE_ID, [
|
||||
{ ptyId: FIRST_PTY_ID, paneId: 1, leafId: SECOND_LEAF_ID, drivesTabTitle: true }
|
||||
])
|
||||
|
||||
pruneParkedTerminalWatchers(new Set())
|
||||
|
||||
expect(readTerminalScrollIntentKeyRetention().intents).toBe(0)
|
||||
})
|
||||
|
||||
// Why: the sole-newborn parity flag is a fact about the captured PTY, so the
|
||||
// layout-fallback rescue must carry it only while the leaf still binds that PTY.
|
||||
describe('untouchedFreshSpawn carry through the layout-fallback rescue', () => {
|
||||
|
||||
Reference in New Issue
Block a user