Skip to content

fix(chat): keep composer Send button reachable with many attachments#255

Open
craigamcw wants to merge 1 commit into
OpenCoworkAI:mainfrom
craigamcw:fix/composer-attachment-overflow
Open

fix(chat): keep composer Send button reachable with many attachments#255
craigamcw wants to merge 1 commit into
OpenCoworkAI:mainfrom
craigamcw:fix/composer-attachment-overflow

Conversation

@craigamcw

Copy link
Copy Markdown

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:

  • pasted-image grid → max-h-[28vh] overflow-y-auto
  • attached-file list → max-h-[22vh] overflow-y-auto

Now 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 --noEmit clean.

🤖 Generated with Claude Code

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>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 CSS scrollbar-gutter: stable property on the same containers (which reserves space for the scrollbar without requiring hardcoded padding) or increasing the padding to pr-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-stable is not a Tailwind utility; you may need to add a custom class or use the inline style style={{ 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant