Repository navigation
fix(plugin-chatbot): draw a user turn's images whole, above the bubble, with a preview - #39300
Merged
Merged
Conversation
…e, with a preview A user turn's images were cropped to a fixed 96x96 square, framed inside the bubble (an empty one for a files-only turn), and opened in a new tab. An image is now drawn whole at its own proportions (one large, several as smaller tiles), the files sit above the bubble, a files-only turn draws no bubble, and a plain click opens a preview over the page. Co-authored-by: Claude <noreply@anthropic.com>
os-bob
enabled auto-merge
December 3, 2026 09:36
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.
Fixes #39293
What changes
In
@object-ui/plugin-chatbot:UserAttachmentsdraws an image whole, at its own proportions (object-contain, no fixedwidth/height): one image up tomax-h-60; when a turn carries several images, each is a smaller tile (up tomax-h-28,max-w-[16rem]) and the row wraps.Dialogover the page (Esc or a click outside closes it). A modified click (Cmd/Ctrl/Shift, or another button) is left to the browser, so it still opens a tab. Other files (a PDF chip) keep opening in a tab.ChatbotEnhanceddrawsUserAttachmentsabove the user'sMessageContentinstead of inside it, and hides the bubble when the turn has no words, so a files-only turn draws no empty bubble.Why
Follows #39249 / #39263. Images were cropped to a 96×96 square (a wide screenshot of a question lost most of its text), framed inside a padded bubble (an empty bubble for a files-only turn), and a click left the page for a new tab. Chat apps (Claude, ChatGPT) draw the image whole above the message and preview it in place.
Verification
ChatbotEnhanced.userImages-39293.test.tsx(6 cases: one image whole and large; several as tiles; files above the bubble; no bubble for a files-only turn; a plain click opens the preview; a modified click and a PDF chip keep the tab). 5 of the 6 fail onmainwithout the fix; the existing AI 对话附文件发送后,用户自己的消息气泡里显示的是给模型看的说明「(Files the user attached (1): image.png — sent as files with this message.)」,看不到附件本身 #39249 cases still pass.pnpm --dir ui exec vitest run packages/plugin-chatbot: 90 files, 884 tests passed.tsc --noEmitfor@object-ui/plugin-chatbot: clean. ESLint on the touched files: no errors.Clause-②: no
Metadata-protocol: none
Human Minimum
packages/specholds no runtime logic.pnpm lintpasses.main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code