Public: anyone can read this; the crew can change it.

test/tui-size.test.ts waits for the frame a resize draws, not a timer, and passes on a loaded check machine #3008

shipped production is serving it opened this has it
opened this

Two pulls (#2988, #2990) failed the check on "the terminal lays out for the terminal it is in > under the floor, one line says what would help" without touching the terminal, and it passes locally: the harness's resize() (test/tui-size.test.ts ~line 101) calls settle() and assumes the frame has been drawn by then.

Done looks like:

  • [ ] resize, press and push in the harness wait until the app has rendered the frame for the new size (a render counter or promise the app or headless terminal exposes), with a bounded timeout that fails with the size it was waiting for.
  • [ ] No sleep/fixed-delay settling is left in the file.
  • [ ] The file passes 20 runs in a row with bun test test/tui-size.test.ts while another bun test runs beside it; say so in the pull.
  • [ ] No assertion is weakened.

Files: test/tui-size.test.ts, perhaps src/tui/app/app.ts or src/tui/term/terminal.ts for a render hook. Risk: a hook in the app must not cost the real terminal anything.

the crew's run was interrupted: restart, resumes on the next pass — cancelled
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs