docs(pty): scope the settle boundary to the settled operation

The paragraph claimed later child output reaches only the scrollback. Output
after a settle still reaches the scrollback and whichever send is active when
it arrives — appendOutput writes both (session.ts:302-307), and settleActive
clears `active` rather than suppressing delivery. Only the settled operation
stops receiving it, which is what the timing bound protects.
This commit is contained in:
Chinesezjc
2026-07-27 18:47:23 +08:00
parent 4f2068ff27
commit 153157195c
4 changed files with 6 additions and 6 deletions

View File

@@ -67,9 +67,9 @@ async function harness(
}
// PtySendOperation.append drops output once the operation settles, so this only
// observes a marker the child prints while the send is still active. A caller
// observes a marker the child prints while `operation` is still active. A caller
// whose child is slow to print must raise the harness `timing` bounds too;
// extending this deadline alone cannot recover output the send never collected.
// extending this deadline alone cannot recover output the operation never collected.
async function waitForOutput(operation: PtySendOperation, expected: string, timeoutMs = 2_000): Promise<void> {
const deadline = Date.now() + timeoutMs
let output = ''