Skip to content

fix: prevent suggestion cards from overflowing in narrow sidebars#255

Open
gadenbuie wants to merge 3 commits into
mainfrom
fix/suggestion-min-width
Open

fix: prevent suggestion cards from overflowing in narrow sidebars#255
gadenbuie wants to merge 3 commits into
mainfrom
fix/suggestion-min-width

Conversation

@gadenbuie

Copy link
Copy Markdown
Collaborator

The greeting / suggestion-cards feature could overflow the chat area in narrow containers such as Shiny sidebars, pushing cards past the visible edge.

Cause

The suggestion-card grid uses an auto-fit track (repeat(auto-fit, minmax(min(175px, 100%), 1fr))). Its max-content width propagated up the messages/greeting subtree because the grid item defaulted to min-width: auto, sizing the chat content to its content width rather than the available container width.

Fix

Add min-width: 0 to .shiny-chat-messages-wrapper so the grid child can shrink below its content size. Any residual scrollbar-gutter offset is absorbed by the wrapper's existing overflow: clip.

Verified across 250px / 350px / 500px container widths that the cards and greeting stay within the chat container.

Add min-width: 0 to .shiny-chat-messages-wrapper so the grid child can
shrink below its content size. Without it, the auto-fit suggestion-card
grid forces the messages/greeting subtree to its max-content width,
overflowing the chat container in narrow spaces like sidebars.
@gadenbuie gadenbuie force-pushed the fix/suggestion-min-width branch from 9e5f812 to 1ef8b67 Compare June 18, 2026 12:35
@gadenbuie gadenbuie marked this pull request as ready for review June 18, 2026 12:35
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.

2 participants