fix(gui): prevent Accept/Reject buttons from being clipped in narrow sidebar - #13131
fix(gui): prevent Accept/Reject buttons from being clipped in narrow sidebar#13131thanhnnict wants to merge 2 commits into
Conversation
…sidebar The PendingToolCallToolbar buttons (Accept/Reject) were being clipped when the sidebar panel was narrow or after extended chat sessions with many code blocks/terminal outputs. Root causes: 1. Toolbar used flexbox with shrink-0 on buttons container, causing overflow when panel width was insufficient 2. Pre elements used max-width: calc(100vw - 24px) which could expand content beyond the sidebar container width, pushing the entire layout outside the overflow-x: hidden boundary Fix: - Switch toolbar row from flexbox to CSS Grid (grid-cols-[minmax(0,1fr)_auto]) ensuring buttons always receive their intrinsic width - Replace viewport-relative max-width with container-relative (100%) for pre elements in both StyledMarkdownPreview and UnifiedTerminal - Add overflow-x: hidden on StepsDiv to contain chat content - Add min-w-0 on flex containers to allow proper shrinking Tested with narrow sidebar (~300px) and extended chat sessions with multiple terminal outputs.
|
Hi maintainers, The only failing check is All other 46 checks pass, including Could you re-run the JetBrains tests or confirm if this is a known flaky test? Thanks! |
|
Hi @sestinj, Following up on this PR — it's been 1 week since creation. The only failing check is All other 47 checks pass, including:
This is a pure CSS/Tailwind fix (no logic changes) that prevents Accept/Reject buttons from being clipped in narrow sidebar. The fix uses CSS Grid instead of flexbox and container-relative widths instead of viewport-relative. Thanks for your time! |
|
Hi @sestinj, I've created issue #13219 to document this bug more clearly. The issue is very user-facing — when the sidebar is narrow, users cannot approve/reject tool calls because the buttons are clipped. This is a pure CSS/Tailwind fix (no logic changes) that should be easy to review and merge. All 47/48 CI checks pass (only Could you take a look when you have a chance? Thanks! |
|
/rerun The only failing check is Evidence it's flaky — same commit produced different results across runs:
This PR only modifies 6 VS Code GUI files (CSS/Tailwind). The failing test is a JetBrains plugin autocomplete test that doesn't touch any of these files. Could you re-run the failed JetBrains test? Thanks! |
Summary
The PendingToolCallToolbar buttons (Accept/Reject) are clipped when the sidebar panel is narrow or after extended chat sessions with many code blocks/terminal outputs.
Root Causes
shrink-0on buttons container, causing overflow when panel width was insufficientmax-width: calc(100vw - 24px)which could expand content beyond the sidebar container width, pushing the entire layout outside theoverflow-x: hiddenboundaryFix
grid-cols-[minmax(0,1fr)_auto]) ensuring buttons always receive their intrinsic width100%) for pre elements in both StyledMarkdownPreview and UnifiedTerminaloverflow-x: hiddenon StepsDiv to contain chat contentmin-w-0on flex containers to allow proper shrinkingTesting
Changed Files
PendingToolCallToolbar.tsxLump/index.tsxmin-w-0,overflow-hiddenStyledMarkdownPreview/index.tsxcalc(100vw-24px)→100%UnifiedTerminal.tsxcalc(100vw-24px)→100%Chat.tsxoverflow-x: hiddengui/index.tsxmin-w-0