fix(tui): keep permission prompt buttons visible for long commands - #41216
Open
KDB-Wind wants to merge 2 commits into
Open
fix(tui): keep permission prompt buttons visible for long commands#41216KDB-Wind wants to merge 2 commits into
KDB-Wind wants to merge 2 commits into
Conversation
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
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
Closes #40793
Type of change
What does this PR do?
The TUI permission prompt rendered command text as a plain
<text>node with no wrapping and no height limit. A long shell command pushed the Allow/Reject buttons off-screen, so the request could not be answered. The desktop app has the same bug (#40968).All text-based permission bodies (bash, task, webfetch, websearch, read, glob, grep, list) now render in a bounded scrollbox with
wrapMode="word". The buttons stay visible; long content scrolls instead of overflowing.How did you verify your code works?
packages/tui/test/cli/tui/permission-prompt.test.tsx. It mountsPermissionPrompt, injects a permission request viamessage.part.updated, and checks that:<text>rendering and passes with the fix (verified both ways).bun run typecheckinpackages/tui: clean.packages/tuisuite: 196 pass. One pre-existing Windows-only failure inruntime.test.tsx, unrelated.Screenshots / recordings
Rendered with the TUI renderer test harness (15-row terminal, long heredoc commit command).
Before (dev): command text is clipped with no scrollbar, the tail is unreachable.
After (this PR): the body is a bounded scroll area with a scrollbar; the full command is reachable and the buttons stay visible.
Checklist