fix(chat): keep composer Send button reachable with many attachments#255
fix(chat): keep composer Send button reachable with many attachments#255craigamcw wants to merge 1 commit into
Conversation
The pasted-image grid and attached-file list in the composer had no height limit, and the app's root layout is overflow-hidden. With enough attachments the lists grew tall enough to push the input row and Send button below the viewport, with no scrollbar to reach them. Cap both lists at a viewport-relative max height with their own vertical scroll, so attachments scroll within their own area and the input + Send button stay visible at any window size. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Review mode: initial
Findings
-
[Minor] Potential scrollbar overlap on Windows** – The added
pr-1(4px) may be insufficient to prevent the scrollbar from overlapping content on Windows, where scrollbars are typically 17px wide. This can cause the last few pixels of image/file items to be hidden behind the scrollbar. Consider using the CSSscrollbar-gutter: stableproperty on the same containers (which reserves space for the scrollbar without requiring hardcoded padding) or increasing the padding topr-4(16px) to better accommodate standard scrollbar widths.Suggested fix:
<div className="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-2 mb-3 max-h-[28vh] overflow-y-auto scrollbar-gutter-stable">
(Note:
scrollbar-gutter-stableis not a Tailwind utility; you may need to add a custom class or use the inline stylestyle={{ scrollbarGutter: 'stable' }}.)
Summary
This is an initial review. The PR correctly addresses a real UI bug where the send button becomes inaccessible when many attachments are added. The two-line change (adding max-h with overflow-y-auto to both preview containers) is minimal, well-described, and compiles cleanly. No correctness, security, or regression issues were found. The only suggestion is to improve cross-platform scrollbar handling.
Open Cowork Bot
Problem
When you add many attachments (pasted images and/or files), the composer's preview lists grow with no height limit. Because the chat view's root container is
overflow-hidden, the growing lists push the input row and the Send button below the viewport — with no scrollbar, so there's no way to reach Send to submit.Fix
Cap both preview lists (
ChatView.tsx) at a viewport-relative max height with their own vertical scrollbar:max-h-[28vh] overflow-y-automax-h-[22vh] overflow-y-autoNow attachments scroll within their own area, and the input + Send button stay visible and reachable regardless of how many files are attached or how small the window is.
Two-line change;
tsc --noEmitclean.🤖 Generated with Claude Code