orca/tests
Brennan Benson daaea6acaa
Fix terminal output lag from background panes (#1699)
* Fix terminal output lag from background panes

Co-authored-by: Orca <help@stably.ai>

* Fix scheduler edge cases: replay ordering, foreground gate, dispose race

- Drain queued background bytes before replay/snapshot writes so the
  scheduler's deferred drain cannot land older bytes on top of the replay.
- Gate foreground on isVisibleRef only — visible-but-inactive split panes
  should not be throttled; only hidden panes (background tabs) should be.
- Catch writes to disposed terminals in the drain loop so a late PTY ping
  after pane.terminal.dispose() drops the dead entry instead of crashing
  the scheduler for other panes still draining.
- Update App.tsx comment to drop stale agentStatusEpoch reference; epoch
  no longer ticks on every PTY event after the agent-status slice change.
- Guard e2e Math.max(...drainWrites) against empty array to avoid a
  vacuous pass.

Co-authored-by: Orca <help@stably.ai>

* Fix flaky e2e: put background marker after burst payload

The terminal-output-scheduler e2e test asserts that a background marker
appears in the terminal buffer after switching to that tab. getTerminalContent
returns only the last 4000 chars of the serialized buffer; with the marker
prefixed before a 50000-char x-burst, the marker is always evicted and the
final assertion always fails.

Move the marker to the END of the burst so it survives tail truncation. The
burst itself remains the same length, so the chunked-drain invariants the
test exercises are unchanged.

Co-authored-by: Orca <help@stably.ai>

* Add terminal scheduler regression coverage

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Orca <help@stably.ai>
2026-05-11 17:00:44 -07:00
..
e2e Fix terminal output lag from background panes (#1699) 2026-05-11 17:00:44 -07:00
.gitignore feat: add idempotent E2E test suite with headless Electron support (#671) 2026-04-19 12:09:32 -07:00
playwright.config.ts ci: run E2E tests on every PR, surface on release (non-blocking) (#842) 2026-04-19 13:48:27 -07:00