Repository navigation
fix(cli): preserve fullscreen editor and status on short terminals - #6085
Conversation
Generated-by: Codex
Astro-Han
left a comment
There was a problem hiding this comment.
Automated review notice: This comment was posted by an automated review agent. It is not an independent human review and does not replace one.
I found no P0–P2 issue at f4b7e8e937640c7137f74c5faba36480d9c37301.
The diagnosis is right: budgetEditorAndPendingRows clamped editorRows up to minimumEditorRows, so the chrome's squeeze loop (if (inputRows >= minimumInputRows) break;) always broke on the first check and the activity strip, margin and unread banner never yielded. The VStack then clipped the chrome's bottom, which is the composer's lower border and the status line (#6082). Returning the real remainder lets the existing yielders run in their intended order. The blocking-question branch already computed an unclamped remainder, so the two branches now agree.
I also checked the case where every yielder has been used and the remainder is still below the minimum. MakaAutocompleteAboveEditorComponent.setViewportRows only limits the autocomplete slot (arrangeAutocompleteAboveEditor); the editor lines always render in full. So a viewport below the minimum hides autocomplete rows rather than truncating the draft, and the frame is no worse than before. budget === 0 still yields 0, as before.
The new regression drives the real Editor, TuiAltScreen and renderLayoutFrame at every height from 8 to 20 rows, and asserts the transcript reservation, both editor borders, all four draft lines and the status line. That covers the reported failure directly.
P3 (non-blocking): the squeeze-rule comment in MakaFullscreenChromeComponent.render still says the input "clamps to that minimum". After this change nothing clamps it, so it would read more accurately as "the input needs at least that minimum, so decorative chrome rows yield…".
CI for this exact head passed, and the branch merges cleanly with main.
|
Thanks @Dante-dan for the contribution, and for working through the review feedback. Merging now. |
Astro-Han
left a comment
There was a problem hiding this comment.
Approved at @Astro-Han's explicit request: no blocking findings in the automated review of this head, and CI is green.
Summary
The fullscreen editor budget hid its real shortage by clamping the remainder to the editor's minimum. Return the actual remainder so the existing squeeze loop drops optional activity/unread chrome before clipping the composer or status. Queue-first reservation stays intact.
Adds a production real-editor/layout-frame regression for every height from 8 through 20 rows, checking both borders, all four draft lines, status, and the transcript reservation.
Fixes #6082
Verification
--test-concurrency=1; the new regression fails without the fix. Existing queue, blocking-question, autocomplete and localized unread coverage passes.npm testfailed in other workspaces and hit Host/CLI timeouts, including sandbox state-root permission failures. No full post-fix suite pass is claimed.draft three, with the fourth line, lower border and status clipped; after:Terminal I/O is the repository fixture. Physical-terminal resize acceptance remains unperformed and is still required before Nightly graduation.
AI use
Tool(s) and scope: Codex implemented the budget fix and regression, ran the checks, reviewed the diff, and drafted this PR. The commit includes
Generated-by: Codex.Checklist
Does this PR entail a change in behavior?