test: diagnose replay-suppressed input during SSH pane restore

This commit is contained in:
Neil
2026-09-06 05:59:46 -07:00
parent e46d67b3d8
commit 2ea912ce10
2 changed files with 12 additions and 0 deletions
@@ -33,6 +33,9 @@ export function installPtyInputForward(session: ConnectPanePtySession): void {
// engage the guard via replayIntoTerminal; here we drop everything
// xterm emits while the guard is active. See replay-guard.ts.
if (isPaneReplaying(session.deps.replayingPanesRef, session.pane.id)) {
const dataset = session.pane.container.dataset
dataset.e2eReplayDroppedInput = ((dataset.e2eReplayDroppedInput ?? '') + data).slice(-512)
dataset.e2eReplayDropCount = String(Number(dataset.e2eReplayDropCount ?? '0') + 1)
return
}
const currentPtyId = session.transport.getPtyId()
@@ -144,6 +144,15 @@ test.describe('five SSH panes under simultaneous output', () => {
})
throw error
} finally {
const replayDrops = await orcaPage.evaluate((tabId) => {
const manager = window.__paneManagers!.get(tabId)!
return manager.getPanes().map((pane) => ({
ptyId: pane.container.dataset.ptyId,
droppedInput: pane.container.dataset.e2eReplayDroppedInput ?? '',
dropCount: pane.container.dataset.e2eReplayDropCount ?? '0'
}))
}, tabId)
console.log('[five-pane-replay-drops]', JSON.stringify({ round, index, replayDrops }))
await inputTrace.evaluate((trace) => trace.dispose())
await inputTrace.dispose()
}