fix: prevent suggestion cards from overflowing in narrow sidebars#255
Open
gadenbuie wants to merge 3 commits into
Open
fix: prevent suggestion cards from overflowing in narrow sidebars#255gadenbuie wants to merge 3 commits into
gadenbuie wants to merge 3 commits into
Conversation
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.
9e5f812 to
1ef8b67
Compare
cpsievert
approved these changes
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 tomin-width: auto, sizing the chat content to its content width rather than the available container width.Fix
Add
min-width: 0to.shiny-chat-messages-wrapperso the grid child can shrink below its content size. Any residual scrollbar-gutter offset is absorbed by the wrapper's existingoverflow: clip.Verified across 250px / 350px / 500px container widths that the cards and greeting stay within the chat container.