Repository navigation
test(tui): wait for the Thinking Effort row in the color menu's own-colors test - #135
Closed
eric-engberg wants to merge 11 commits into
Closed
eric-engberg wants to merge 11 commits into
eric-engberg wants to merge 11 commits into
Conversation
The line editor and color menu tests slept a fixed 25ms after rendering and after each key, then asserted. Ink redraws, and React re-attaches Ink's input listener, on their own schedule. On a loaded machine the assertion ran before the redraw, or the next key reached the listener left from before the last redraw and was applied to the old state. Under load these tests failed intermittently, the number style and label tests most often. Each wait now retries until the key's visible effect shows (the row's new suffix, the label editor's draft, the picker's search text, the moved highlight), then yields two setImmediate turns before the next key, through the shared helper in src/tui/__tests__/helpers/wait-for-ink.ts. Assertions that only restated a wait move into it; the rest are unchanged.
…est/wait-for-ink-keys-color-menu
…olors test The line and color editor tests no longer sleep a fixed 25ms after each render and key. They wait for the key's visible effect, and the sleep helper flushInk is gone. The color menu test that checks the note for a widget that sets some of its own colors still called flushInk after the first render, so it no longer compiled. It now waits until the frame shows the Thinking Effort row, then reads that frame as before.
…or-menu # Conflicts: # docs/USAGE.md # src/tui/App.tsx # src/tui/__tests__/App-dev-reload.test.ts # src/tui/components/ItemsEditor.tsx # src/tui/components/__tests__/ItemsEditor.test.ts # src/utils/renderer.ts # src/widgets/SessionUsage.ts # src/widgets/__tests__/ThinkingEffort.test.ts # src/widgets/shared/usage-display.ts # src/widgets/shared/usage-percent-widget.ts
eric-engberg
changed the base branch from
test/wait-for-ink-keys
to
feat/model-family-colors
November 6, 2026 01:02
|
Owner
Author
|
Superseded: this fix reached main with sirmalloc#777. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Builds on #133 (
test/wait-for-ink-keys) and mergesfeat/model-family-colors(#40), which carries the Thinking Effort test from #2. Fork-only meet branch fornext; not for upstream.What
The color menu test that checks the note for a widget that sets some of its own colors waits for the Thinking Effort row to show instead of calling
flushInk.Why
#133 replaces every fixed 25 ms sleep in
ColorMenu.test.tsxand drops theflushInkhelper. That test comes from the fork's Thinking Effort branch and isn't onmain, so #133 can't change it. Once both are innext, the file no longer compiles (Cannot find name 'flushInk'), and a recorded conflict resolution can't carry the fix.How
feat/model-family-colorsinto test(tui): wait for each key's effect in the line and color editor tests #133.▶ 1: Thinking Effort, then reads that frame as before.Testing
bun run lint: clean; it fails on the merge alone.nextrebuilds with lint and the full suite passing once this branch is listed.