Repository navigation
fix(tui): keep an early menu move and wait for the selection paint (Refs #791) - #801
Merged
Merged
Conversation
… a wrapping description column (Refs #791) Co-authored-by: arena-agent <[email protected]>
…s (Refs #791) Co-authored-by: arena-agent <[email protected]>
… rows paint (Refs #791) Co-authored-by: arena-agent <[email protected]>
Co-authored-by: arena-agent <[email protected]>
The scrollbox painted exactly the height it was capped to, so the titleColumn path that returned the terminal cap left the panel with 8 blank rows at 120x40, 12 with one level filtered, and 29 at 120x80. The height now follows the rows the list actually laid out, measured from the option renderables themselves, and keeps the terminal cap as the upper bound. Opt-in: only the option set with a titleColumn measures itself; every other picker keeps the static row math. Co-authored-by: arena-agent <[email protected]>
…791) A slow first layout could run the measuring effect before the scrollbox existed, which left the panel on the static one-row-per-option estimate. The ref callback now starts a measurement too, and the settle loop waits for consecutive passes instead of a single read. Co-authored-by: arena-agent <[email protected]>
…ther pickers exact (Refs #791) Only an option set with a titleColumn schedules the measurement; every other picker keeps the untouched height expression and schedules nothing. The test settle now polls painted text (cheap) and reads the panel geometry from a single span capture, so a loaded runner no longer spends its test budget on captures. Co-authored-by: arena-agent <[email protected]>
… row (Refs #791) D3: a wrapped row has no line count to size the box from, so any estimate made before layout clipped the last line until a later pass. The wrapping layout now lets the scrollbox keep the content's own height with maxHeight as a real cap (contentOptions minHeight 0), so the panel is already content-tall on the first paint and the measurement machinery is gone. Only pickers whose options set a titleColumn get that content option; every other picker keeps its default sizing. D2: centering a row as tall as the window pushed its last line out of view forever (44x20). Such a row is now pinned to the top so all of its lines stay on screen. Tests: the geometry suite gains a first-paint assertion that the panel does not resize after it appears, and a 44x20 test that the four wrapped lines of the selected Thorough row are all visible; the plain-picker control now asserts the untouched static height. Co-authored-by: arena-agent <[email protected]>
…efs #791) A keyboard move pressed while the dialog is opening was lost: the settle queued for the current option one tick after it opens ran after the move and pulled the cursor back, so a wrapped level selected with two quick arrows never got revealed. moveTo now cancels that pending settle, which is the same rule the settle itself applies when it runs. The effort-selector reads were keyed on the `●` marker, which belongs to the stored level and is already true when the arrows are pressed, so the span read could land between the press and its repaint. Navigation now waits for the marked opening frame and the highlight read waits for the selected row's own paint to hold still. No assertion was relaxed. Two bounded checks join the suite: a 20-column terminal hides the description column instead of wrapping it back over the level names, and an opt-in picker with optionSpacing 2 sizes its panel to the rows it paints. Co-authored-by: arena-agent <[email protected]>
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
…t (Refs #791) Co-authored-by: arena-agent <[email protected]>
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Reviewed by free · Input: 92.2K · Output: 1.5K · Cached: 432.6K |
…57-silvercode (Refs #791) Co-authored-by: arena-agent <[email protected]>
This was referenced Nov 2, 2026
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.
Issue for this PR
Fixes #791
This is the successor of #796: it carries that PR's eight commits unchanged (same SHAs,
95c6691…6c8fb8e93) plus two follow-up commits and a normal merge oforigin/dev-vibecodedat7d552b480d6878abefd9d0c3fb8863255763abcc, and #796 stays open for its own record. Nothing here is a rewrite of that branch.Type of change
What does this PR do?
The Agent effort menu now spaces its three levels with one blank row each and puts their descriptions in a fixed description column that wraps under itself, so a wrapped description keeps its alignment instead of running back under the level name. The selected row's highlight covers every wrapped line; when a selected row is as tall as the list viewport it is pinned to the top so its last line stays visible. The list is sized to the rows it paints (including on the first paint) instead of to a guess, and
maxHeightstays the terminal-height cap. All of this is opt-in on the shared picker: labels, copy, chips, colors, current indicator, footer, effort semantics and every other picker's single-line rows and line math are unchanged.The first follow-up commit closes one more way a move could be lost. While the dialog is opening it settles the cursor on the stored level on a zero-delay timer; a keyboard move pressed in that window set the cursor and then the settle pulled it back, so a level picked with two quick arrows was never revealed.
moveTonow cancels that pending settle, which is the same rule the settle applies to itself when it runs. The selector's reads were also keyed on the●marker, which belongs to the stored level and is already true when the arrows are pressed, so a read could land between a press and its repaint; navigation now waits for the marked opening frame and the highlight read waits for the selected row's own paint to hold still.The second follow-up is test-only. It restores
selectionPaint's maximum from 900 to 600 passes—the same pump budget asframeWhere, at the same 5 ms spacing. The readiness rule still requires the first painted frame plus two further identical full frames (same >= 2), and no test title, level, or assertion changed.The base update is a normal merge commit (
0690a9c64e2de2ba4b594ad465c4e7b8649d2f9f; parents3fe6a638093ca5727bdeec2c79c0ae8e2d5fd23aand7d552b480d6878abefd9d0c3fb8863255763abcc), not a rebase or tree rewrite. It brings in the accepted activity-block spacing update from the new base. That update changed four files, none overlapping this PR's 13 files; the effort menu'soptionSpacing={1}layout and the 600-pass readiness rule are unchanged.Two bounded checks join the suite:
optionSpacing={2}sizes its panel to the rows it paints, so therows()spacer accounting is guarded for a spacing other than the effort menu's 1.How did you verify your code works?
Validation after the normal base merge at head
0690a9c64e2de2ba4b594ad465c4e7b8649d2f9f(parents3fe6a638093ca5727bdeec2c79c0ae8e2d5fd23aand7d552b480d6878abefd9d0c3fb8863255763abcc, brancharena/93f73757-silvercode, basedev-vibecodedat7d552b480d6878abefd9d0c3fb8863255763abcc):cd packages/tui && bun test --timeout 30000 test/cli/tui/dialog-agent-effort.test.tsx→ 38 pass, 1 skip (the opt-in asset capture), 0 fail, 235 expectations.cd packages/tui && bun test --timeout 30000 --only-failures→ 826 pass, 5 skip, 0 fail, 3,868 expectations; 831 tests across 108 files. The increased totals include the new base's activity-padding tests.origin/dev-vibecodedis now7d552b480d6878abefd9d0c3fb8863255763abcc; relative to that base, this PR still changes the same 13 files (+966/−24), with notask/promptfiles.packages/opencodewas run underNODE_OPTIONS=--max-old-space-size=3072.Mechanism evidence from earlier head
f64c62199371ca79d05a9aa0dc8b6ef81ca79979remains separate from runner causality. In a deliberately delayed local harness, the previous marker-keyed wait could observe the pre-move highlight ([13,16,17,18,19,20,21,22,23,24,25,26]) where the settled selected row paints[20,21,22,23]; waiting for the selection paint itself to settle passes with the assertion unchanged. That demonstrates a locally reachable failure mode. It does not establish what happened on any CI runner.Kilo review on #796: its cap warning is not reproducible at
6c8fb8e93— the content-sizing test shows the panel is its rows plus chrome in 40- and 80-row terminals, somaxHeightis only a cap; itsoptionSpacingsuggestion is now guarded for spacing 1 and 2; its narrow-terminal suggestion is the bounded 20-column check above rather than an alignment claim.Captures are real harness output. At
f64c62199371ca79d05a9aa0dc8b6ef81ca79979,TUI_CAPTURE_DIR=/tmp/captures bun test … -t "captures the normal, narrow, short and capped layout frames"regenerated four span dumps byte-identical to the committed ones, andscript/render-tui-capture.pyrendered them with the same captions to four PNGs byte-identical to the committed ones. The 600-pass commit and the later base merge do not change those effort-menu assets. They come from the production dialog stack, not from a screen or a private session.CI facts, kept separate from any cause claim:
3fe6a638093ca5727bdeec2c79c0ae8e2d5fd23a, the five CI checks in the PR rollup—check-standards,check-compliance,typecheck,unit (linux), andunit (windows)—were successful. That result belongs to3fe6a638093ca5727bdeec2c79c0ae8e2d5fd23aonly; fresh CI and review are owed for merged head0690a9c64e2de2ba4b594ad465c4e7b8649d2f9f, and this description does not carry the older green result forward.f64c62199371ca79d05a9aa0dc8b6ef81ca79979, run41377636945completed its Linuxunitjob (125061270200) successfully.unitjob (125061270430) in that run failed. Its annotation says: “The action 'Run unit tests' has timed out after 40 minutes.” The two raw failures reported from that job wererunning task tool preserves metadata when dispatched in the background(5,520 ms) andqueued prompt finishing preparation during an in-flight cancel waits for the interrupted assistant to settle(4,002 ms), the latter withtimed out waiting for active tool call.task/promptarea (fix(session): preserve prompt lineage and finish ownership #790) or raise its 2-second, 5-second, or host budgets.unitat6c8fb8e93also failed with real test failures: the raw runner log read in the earlier audit showed 43 failing CLI/core/script tests,gitexiting 66, and thebun run testprocess exiting -1073741502 (0xC0000142). Tests did run. That earlier job also has no proven root cause here.closingIssuesReferencesfor this PR currently resolves empty even though the body saysFixes #791. I have not verified why, and this description does not claim a cause for it.The 600-pass restore and the base merge are validated locally above. Neither the later green CI at
3fe6a638093ca5727bdeec2c79c0ae8e2d5fd23anor this merge retroactively explains the older Windows failures, and fresh CI/review remain owed at0690a9c64e2de2ba4b594ad465c4e7b8649d2f9f.Screenshots / recordings
Sanitized synthetic span captures rendered by the committed renderer — actual harness frames, byte-identical to the committed assets at this head.
Normal · Narrow · Short · Capped 44x20
Checklist