Scroll approval prompts when their body overflows the terminal - #291
Merged
TheGreatAxios merged 4 commits intoAug 4, 2026
Conversation
TheGreatAxios
force-pushed
the
cl-4612-make-approval-prompts-scroll-when-content-overflows-the
branch
2 times, most recently
from
August 2, 2026 04:09
81296c7 to
f9c1554
Compare
TheGreatAxios
force-pushed
the
cl-4612-make-approval-prompts-scroll-when-content-overflows-the
branch
2 times, most recently
from
August 2, 2026 04:49
5ff9729 to
f78eced
Compare
TheGreatAxios
force-pushed
the
cl-4612-make-approval-prompts-scroll-when-content-overflows-the
branch
from
August 4, 2026 00:12
f78eced to
8c598f5
Compare
The permission modal's request body (segment list, expanded payloads, notice) and the operator modal's question and option list now page against the real terminal height instead of painting past it. The focused choice and full action list stay fixed and reachable below the body; PageUp/PageDown scroll a long body or question, and a long option list windows to keep the highlighted option in view as the operator navigates. Short prompts render exactly as before, with no scroll indicator or forced affordance.
The overflow indicator already shows "more below" while content remains past the visible window and swaps to "more above" once scrolled to the end, right next to the Accept/Reject choices. No gap found, so this only covers the existing behavior with a test.
operator-modal and permission-modal each carried their own copy of FALLBACK_TERMINAL_ROWS, maxRowOffset, and the clamp-and-slice PageUp/PageDown logic. Extract it into useScrollWindow so the offset math is owned in one place.
Clamp scroll offset before paging when content shrinks, reserve rows for scroll indicators, keep PageUp/PageDown while typing a custom answer, sanitize and clamp agent labels/cwds, expand non-collapsible multi-line bodies, and hide Ctrl+O when nothing is expandable.
TheGreatAxios
force-pushed
the
cl-4612-make-approval-prompts-scroll-when-content-overflows-the
branch
from
August 4, 2026 00:27
8c598f5 to
278b8bc
Compare
TheGreatAxios
marked this pull request as ready for review
August 4, 2026 03:17
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.
Summary
Verification
bun run typecheck && bun run build && bun test— full suite passes (3586/3586)Closes CL-4612