fix(bloom): add dismiss button to AI callout and increase chat window width#15356
fix(bloom): add dismiss button to AI callout and increase chat window width#15356Tmalone1250 wants to merge 4 commits into
Conversation
… width - Add useState(dismissed) flag and XMark icon button to AiAssistantChatWindowCallout to allow users to dismiss the Bloom AI promotional banner that was permanently blocking the text reading area with no escape hatch - Bump ai-assistant design token (width + maxWidth) from 500px to 600px in www/packages/tailwind/base.tailwind.config.js to give the chat panel more horizontal space for rendering AI responses and code snippets Closes medusajs#15283
|
|
@Tmalone1250 is attempting to deploy a commit to the medusajs Team on Vercel. A member of the Team first needs to authorize it. |
|
Thank you for your contribution, @Tmalone1250! After reviewing this PR, we need one thing addressed before we can move forward: Required changes:
Notes (non-blocking): The dismiss button is positioned Triggered by: new PR opened |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 364f71e. Configure here.
…question change - Add Button and XMark mocks to Callout test file - Add 'dismiss' describe block with 3 new tests: * should show dismiss button when callout is visible * should hide callout when dismiss button is clicked * should reset dismissed state when question changes - Add useEffect to reset dismissed state when lastQuestion changes, preventing the state from persisting across new user questions - Fix dismiss button positioning: wrap Card + Button in a shared relative div so button is anchored to the card, not the flex container Addresses feedback from medusa-os-bot (required tests) and cursor bot (dismissed state persistence, positioning)
|
Thank you for your contribution, @Tmalone1250! The required changes from the previous review have been addressed. Here's a summary: ✅ PR template is complete After an initial review, this PR looks good to us. A team member will do a final review before this is merged. We appreciate your patience! Notes (non-blocking): The test file is missing a trailing newline at the end of Triggered by: new commit pushed |
shahednasser
left a comment
There was a problem hiding this comment.
Thank you for your contribution @Tmalone1250 but can you revert the width change?
|
Thank you for the follow-up commit, @Tmalone1250! The new One non-blocking note from the previous review is still outstanding: Notes (non-blocking): The test file is still missing a trailing newline at the end of This PR still looks good to us. A team member will do a final review before this is merged. We appreciate your patience! Triggered by: new commit pushed |
Matches the close icon color with the arrow icon, applies right padding for consistent alignment, and removes the button hover background effect.
|
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days. |


Summary
What — What changes are introduced in this PR?
Two targeted UI improvements to the Bloom AI chat widget (
AiAssistantChatWindowCalloutand the shared Tailwind design token):Dismiss button on the Bloom AI promotional callout — Added a
useState(dismissed)flag and anXMarkicon button (aria-label="Dismiss Bloom AI suggestion") toAiAssistantChatWindowCallout. When clicked, the callout unmounts cleanly, giving users back the full text reading area.Increased chat window width — Bumped the
ai-assistantdesign token inwww/packages/tailwind/base.tailwind.config.jsfrom500pxto600px(bothwidthandmaxWidth). This gives the panel more horizontal breathing room for rendering AI responses and code snippets.Why — Why are these changes relevant or necessary?
Reported in #15283: the Bloom AI chat panel has two compounding readability problems:
500pxwide, which is cramped when displaying technical content (code blocks, long API responses).Together these issues result in users being unable to comfortably read AI output in the widget.
How — How have these changes been implemented?
AiAssistantChatWindowCallout(www/packages/docs-ui/src/components/AiAssistant/ChatWindow/Callout/index.tsx):useStatefrom React,XMarkfrom@medusajs/icons, andButtonfrom the shared button component.const [dismissed, setDismissed] = useState(false)— a local-only ephemeral state (no persistence needed; the callout resets naturally on next page load or new question).if (loading || !matchedCallout || dismissed).position: relativeto the callout wrapper and placed an absolutely-positionedButton(top-right) containingXMark, callingsetDismissed(true)on click.www/packages/tailwind/base.tailwind.config.js:width["ai-assistant"]:"500px"→"600px"maxWidth["ai-assistant"]:"500px"→"600px"All existing tests pass without modification (5/5 —
Callout/__tests__/index.test.tsx).Closes #15283
Note
Low Risk
Low risk UI-only changes: adds local dismiss state for the Bloom AI callout and adjusts a Tailwind sizing token; no data or auth logic is affected.
Overview
Adds a dismiss (X) button to the Bloom AI callout in
AiAssistantChatWindowCallout, hiding the suggestion after click and automatically resetting dismissal when the latest question changes.Widens the AI assistant panel by updating the Tailwind
ai-assistantwidth/maxWidth token from500pxto600px, and extends callout tests to cover dismiss visibility, dismissal behavior, and reset on new questions.Reviewed by Cursor Bugbot for commit bb0419e. Bugbot is set up for automated code reviews on this repo. Configure here.