Skip to content

fix: prevent action buttons clipping in composer footer at narrow widths#865

Closed
TheLevic wants to merge 2 commits intopingdotgg:mainfrom
TheLevic:fix/composer-footer-action-buttons-clipping
Closed

fix: prevent action buttons clipping in composer footer at narrow widths#865
TheLevic wants to merge 2 commits intopingdotgg:mainfrom
TheLevic:fix/composer-footer-action-buttons-clipping

Conversation

@TheLevic
Copy link
Contributor

@TheLevic TheLevic commented Mar 10, 2026

Summary

When the chat area is narrowed (sidebar open, narrow window), the right-side action buttons ("Submit answers", "Implement" split button) get clipped or pushed completely off-screen.

Root cause: In wide mode at sm+ (≥640px), the left section had sm:min-w-max which forced min-width: max-content, preventing it from shrinking. Combined with the right section's shrink-0, the right section overflows and gets clipped by a parent overflow-hidden.

Changes

  • Remove sm:min-w-max and sm:overflow-visible from the wide-mode left section in ChatView.tsx — lets it shrink via its existing min-w-0 flex-1 to make room for action buttons. The overflow-x-auto with hidden scrollbar remains as a safety net.
  • Bump wide-actions compact breakpoint from 720px → 800px in composerFooterLayout.ts — triggers compact mode slightly earlier when wide action buttons are present, reducing how much the left section needs to compress.

Before

Submit Example
Screenshot 2026-03-10 at 6 14 49 PM

Implement Example
Screenshot 2026-03-10 at 5 18 50 PM

After

Submit Example
Screenshot 2026-03-10 at 6 00 02 PM

Implement Example
Screenshot 2026-03-10 at 6 04 19 PM

Note

Fix action button clipping in composer footer at narrow widths

  • Removes sm:min-w-max sm:overflow-visible from the non-compact action container in ChatView.tsx, keeping it horizontally scrollable with hidden scrollbars at all widths.
  • Raises COMPOSER_FOOTER_WIDE_ACTIONS_COMPACT_BREAKPOINT_PX from 720 to 800 in composerFooterLayout.ts, so the compact layout activates at a wider viewport.

Macroscope summarized ff16239.

@coderabbitai
Copy link

coderabbitai bot commented Mar 10, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: cd7f36ce-639c-4e11-a814-0ccee1a96175

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the vouch:unvouched PR author is not yet trusted in the VOUCHED list. label Mar 10, 2026
When the chat area is narrowed (e.g. sidebar open, narrow window), the
right-side action buttons ("Submit answers", "Implement" split button)
get clipped or pushed off-screen.

Root cause: the wide-mode left section had `sm:min-w-max` which forced
min-width: max-content, preventing it from shrinking. Combined with the
right section's shrink-0, the right section overflows and gets clipped.

- Remove `sm:min-w-max` and `sm:overflow-visible` from the wide-mode
  left section so it respects `min-w-0 flex-1` at all widths
- Bump the wide-actions compact breakpoint from 720px to 800px so
  compact mode triggers earlier when wide action buttons are present
@TheLevic TheLevic force-pushed the fix/composer-footer-action-buttons-clipping branch from 02ebb4d to 38d3ca3 Compare March 10, 2026 23:17
@TheLevic TheLevic marked this pull request as ready for review March 10, 2026 23:18
});

it("uses a higher breakpoint for wide action states", () => {
expect(COMPOSER_FOOTER_WIDE_ACTIONS_COMPACT_BREAKPOINT_PX).toBe(800);
Copy link
Member

Choose a reason for hiding this comment

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

dear codex...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Lol. Whoops. Didn't read the dumb test. Removed

@TheLevic TheLevic closed this Mar 11, 2026
@TheLevic TheLevic deleted the fix/composer-footer-action-buttons-clipping branch March 11, 2026 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants