Skip to content

fix(cli): preserve fullscreen editor and status on short terminals - #6085

Merged
Astro-Han merged 1 commit into
apache:mainfrom
Dante-dan:fix/6082-short-terminal-chrome
Oct 16, 2026
Merged

Astro-Han merged 1 commit into
apache:mainfrom
Dante-dan:fix/6082-short-terminal-chrome

Conversation

@Dante-dan

Copy link
Copy Markdown
Contributor

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

  • 306/306 fullscreen-mode, pi-tui-runner and tui-copy-catalog tests pass with --test-concurrency=1; the new regression fails without the fix. Existing queue, blocking-question, autocomplete and localized unread coverage passes.
  • Root lint, format, build and typecheck; desktop/UI knip; staged checks pass (Node 24.12.0, npm 11.19.0).
  • The initial parallel affected run had one navigation-retraction timing failure; it passed in isolation and the serial rerun. The full pre-fix npm test failed in other workspaces and hit Host/CLI timeouts, including sandbox state-root permission failures. No full post-fix suite pass is claimed.
  • Fixture frame evidence at 8 rows: before, the final row was draft three, with the fourth line, lower border and status clipped; after:
TRANSCRIPT-SENTINEL
────────────────────────────────────────────────────────────────────────────────
draft one
draft two
draft three
draft four
────────────────────────────────────────────────────────────────────────────────
STATUS-SENTINEL

Terminal I/O is the repository fixture. Physical-terminal resize acceptance remains unperformed and is still required before Nightly graduation.

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

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

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@github-actions github-actions Bot added the effort/S Under 100 readable lines label Oct 13, 2026

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Astro-Han

Copy link
Copy Markdown
Contributor

Thanks @Dante-dan for the contribution, and for working through the review feedback. Merging now.

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved at @Astro-Han's explicit request: no blocking findings in the automated review of this head, and CI is green.

@Astro-Han
Astro-Han merged commit f000611 into apache:main Oct 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/S Under 100 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(tui): fullscreen multiline drafts clip status on short terminals

2 participants