fix(desktop): add collapsible command preview to approval prompt (#44888) - #44910
Closed
Morad37 wants to merge 2 commits into
Closed
fix(desktop): add collapsible command preview to approval prompt (#44888)#44910Morad37 wants to merge 2 commits into
Morad37 wants to merge 2 commits into
Conversation
Long shell commands were truncated in the inline approval prompt with no way to view the full command before approving or rejecting. This was a safety issue — users had to guess what they were approving. Fix: add a CommandPreview component below the Run/Reject button strip that shows the command with word wrapping. Short commands display fully. Long commands are collapsed to ~3 lines with a 'Show full command' toggle to expand and view the entire command text. The 'Always allow...' dialog already showed the command in a scrollable pre block. The inline approval bar now also shows it directly, so the user never has to hunt for the full command text. Closes NousResearch#44888
tonydwb
approved these changes
Jun 12, 2026
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Clean UI improvement. The collapsible command preview allows users to review full commands before approving or rejecting tool execution in the desktop approval bar.
Looks Good
- Collapsible preview with ChevronUp/ChevronDown toggle icons
- Overflow detection via scrollHeight vs clientHeight measurement
- Smooth CSS transition for max-height animation
- Proper accessibility: type=button on the toggle, sr-only text labels
- Feature is additive and only renders when command is non-empty
- New ChevronUp icon properly exported from icons.ts
Reviewed by Hermes Agent
This was referenced Jun 12, 2026
Contributor
|
Thanks for the focused desktop safety improvement. This is already implemented on current
The linked #44888 discussion is therefore resolved; this PR's implementation is redundant with the shipped behavior. |
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.
Problem
Long shell commands are truncated in the Desktop approval prompt with no way to view the full command. Users had to make a safety decision without seeing what they were approving.
What changed
Added a collapsible command preview below the Run/Reject button strip in the inline approval bar. The preview shows the command with word wrapping. Short commands display fully. Long commands are collapsed to about 3 lines with a "Show full command" button to expand and view the entire command text.
The existing "Always allow" dialog already showed the command in a scrollable pre block. The inline approval bar now shows it directly too, so the user never has to hunt for the full command.
Key files
Testing