Skip to content

fix: settle ink input handlers after frame waits so TUI coverage runs stop flaking on Windows - #1996

Draft
olaservo wants to merge 1 commit into
v2/mainfrom
v2/fix/1942-tui-coverage-flake
Draft

fix: settle ink input handlers after frame waits so TUI coverage runs stop flaking on Windows#1996
olaservo wants to merge 1 commit into
v2/mainfrom
v2/fix/1942-tui-coverage-flake

Conversation

@olaservo

Copy link
Copy Markdown
Member

Closes #1942

Test-only. In ink 6 a visible frame doesn't imply armed useInput handlers (they re-subscribe in the passive-effect flush), so a keypress right after a frame wait could be silently swallowed — v8 instrumentation widens the window, hence the coverage-only flake. waitUntil now awaits one setImmediate turn after its predicate passes; check-queue FIFO guarantees the effect flush runs first. Verified: race made deterministic via a 1ms-poll amplifier (3/3 failing before, 3/3 green after) plus 3 consecutive full green test:coverage runs. Full root-cause in the issue comment.

🤖 Generated with Claude Code

…I App tests

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@olaservo olaservo added the v2 Issues and PRs for v2 label Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2 Issues and PRs for v2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant