Skip to content

Conversation

gagik
Copy link
Contributor

@gagik gagik commented Sep 24, 2025

),
clearChat: () => {
clearChat: async () => {
await chat.stop();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

drive-by, we do not want to continue streaming after clearing

@gagik gagik marked this pull request as ready for review September 24, 2025 20:15
@gagik gagik requested a review from a team as a code owner September 24, 2025 20:15
@gagik gagik requested review from Copilot and mabaasit September 24, 2025 20:15
@gagik gagik force-pushed the gagik/bugbash-fixes branch from 5595f71 to d15d664 Compare September 24, 2025 20:16
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Fixes content overflow and resizing issues in the MongoDB Assistant drawer by implementing container queries and responsive scaling, along with minor styling improvements.

  • Added container query support to the drawer portal to enable responsive behavior
  • Implemented text wrapping and overflow fixes for the assistant chat interface
  • Added responsive title scaling when the drawer becomes narrow
  • Made the clearChat function asynchronous to properly handle chat stopping

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
packages/compass-components/src/components/drawer-portal.tsx Added container type for inline-size queries
packages/compass-assistant/src/components/assistant-chat.tsx Fixed text overflow with width and word-break properties, removed trailing dot
packages/compass-assistant/src/compass-assistant-provider.tsx Made clearChat async and added chat.stop() call
packages/compass-assistant/src/compass-assistant-drawer.tsx Added responsive title scaling with container queries

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@gagik gagik changed the title chore(compass-assistant): fix content overflow and resizing of drawer COMPASS-9882 COMPASS-9883 chore(compass-assistant): fix content overflow and resizing of drawer COMPASS-9882 COMPASS-9883 COMPASS-9888 Sep 24, 2025
// Shrink the title text and badge when the drawer is narrow
'@container (width < 320px)': {
'&': {
transform: 'scale(0.8) translateX(-10%)',
Copy link
Contributor

Choose a reason for hiding this comment

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

😘

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I should note that translate -10% is a bit of a hack but at least it's relative to content

flexDirection: 'column-reverse',
overflowY: 'auto',
width: '100%',
wordBreak: 'break-word',
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering if we should move this to much more targeted elements so that we don't have to turn it off again on things one by one as we find them. Like make sure it is only message text and code blocks?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's one of the things that's actually better applied globally and then we set exceptions accordingly. In most cases we'd prefer breaking instead of overflowing with a scrollbar for example

@gagik
Copy link
Contributor Author

gagik commented Sep 25, 2025

Going to go ahead with merge but if we run into further issues with break-word happy to reconsider the more global styling.

@gagik gagik merged commit a266bdc into main Sep 25, 2025
83 of 84 checks passed
@gagik gagik deleted the gagik/bugbash-fixes branch September 25, 2025 10:56
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