mirror of
https://github.com/stablyai/orca.git
synced 2026-10-12 16:03:03 +00:00
Track the attested tmux selected pane in the canonical status store and fence retired refreshes after asynchronous root resolution. Fixes #10039.
27 lines
896 B
TypeScript
27 lines
896 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { parseAgentStatusParentInput } from './agent-status-store-parent'
|
|
import { TMUX_TEST_PANE, TMUX_TEST_ROOT } from './tmux-status.test-fixture'
|
|
const subject = { ...TMUX_TEST_ROOT.scope, kind: 'pty', paneKey: TMUX_TEST_PANE } as const
|
|
|
|
describe('canonical PTY attachment without a status claim', () => {
|
|
it('retains the subject when its owner reports no selected status', () => {
|
|
expect(parseAgentStatusParentInput({ subject })).toEqual({ subject })
|
|
})
|
|
it('still refuses a status claiming another pane', () => {
|
|
expect(
|
|
parseAgentStatusParentInput({
|
|
subject,
|
|
status: {
|
|
paneKey: 'foreign',
|
|
connectionId: null,
|
|
worktreeId: 'workspace',
|
|
state: 'done',
|
|
prompt: '',
|
|
receivedAt: 1,
|
|
stateStartedAt: 1
|
|
}
|
|
})
|
|
).toBeNull()
|
|
})
|
|
})
|