fix(web): contain long approval commands - #6503
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Approved f982c47 Pure CSS styling changes to fix text overflow for long approval commands. Adds standard CSS containment classes (min-w-0, max-w-full, overflow-wrap) with no runtime behavior changes. Test updated to verify class application. You can customize Macroscope's approvability policy. Learn more. |
Problem
A command approval containing a very long unbroken argument could impose its min-content width on the composer. The command detail then escaped its container and overlapped the approval actions, making the prompt difficult or impossible to use.
Fix
Before / After
Validation
pnpm --filter @t3tools/web exec vp test run --passWithNoTests --project unit src/components/chat/ComposerPendingApprovalPanel.test.tsxpnpm --filter @t3tools/web exec tsgo --noEmitpnpm --filter @t3tools/web exec vp fmt --check src/components/chat/ComposerPendingApprovalPanel.tsx src/components/chat/ComposerPendingApprovalPanel.test.tsx src/components/chat/ChatComposer.tsxgit diff --checkCloses #6493
Implemented with GPT-5.6-sol in the Codex harness.
Note
Low Risk
Localized chat composer approval UI and styling; no auth, data, or API changes.
Overview
Fixes pending command approvals where a very long unbroken argument forced the composer wider than its container and overlapped the approve/deny actions.
The approval panel now uses shrink-friendly flex constraints (
min-w-0,max-w-full) andoverflow-wrap: anywhereon the command<pre>so the full multiline command stays inside a scrollable area instead of being truncated or spilling out. The composer footer action row usesflex-wrapso buttons remain reachable on narrow widths.A unit test now asserts a 500-character unbroken command renders with complete detail and without truncate/line-clamp classes.
Reviewed by Cursor Bugbot for commit f982c47. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix overflow of long approval commands in
ComposerPendingApprovalPanelLong, unbroken strings in pending approval commands were overflowing their containers. Adds
min-w-0,max-w-full, and[overflow-wrap:anywhere]to the panel's wrapper and<pre>elements so content wraps within the available width. Also addsflex-wrapto the composer footer's action container so approval action buttons wrap onto multiple lines on narrow viewports.Macroscope summarized f982c47.