mirror of
https://github.com/stablyai/orca.git
synced 2026-10-23 16:03:49 +00:00
Bound exclusive host navigation to a generation-aware latest-wins single-flight so bulk open and switch fan-out stay responsive on large remote fleets. Add freeze repro harnesses and navigated settlement.
25 lines
750 B
TypeScript
25 lines
750 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { formatTerminalFocus } from './terminal-format'
|
|
|
|
describe('formatTerminalFocus', () => {
|
|
it('distinguishes superseded navigation from a winning focus', () => {
|
|
expect(
|
|
formatTerminalFocus({
|
|
focus: {
|
|
handle: 'term_stale',
|
|
tabId: 'tab-stale',
|
|
worktreeId: 'worktree-1',
|
|
navigated: false
|
|
}
|
|
})
|
|
).toBe(
|
|
'Focus request for terminal term_stale was superseded or host navigation was skipped (tab tab-stale).'
|
|
)
|
|
expect(
|
|
formatTerminalFocus({
|
|
focus: { handle: 'term_winner', tabId: 'tab-winner', worktreeId: 'worktree-1' }
|
|
})
|
|
).toBe('Focused terminal term_winner (tab tab-winner).')
|
|
})
|
|
})
|