Skip to content

fix(plugin-chatbot): draw a user turn's images whole, above the bubble, with a preview - #39300

Merged
os-bob merged 1 commit into
mainfrom
fix/39293-user-image-display
Dec 3, 2026
Merged

os-bob merged 1 commit into
mainfrom
fix/39293-user-image-display

Conversation

@os-bob

@os-bob os-bob commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Fixes #39293

What changes

In @object-ui/plugin-chatbot:

  • UserAttachments draws an image whole, at its own proportions (object-contain, no fixed width/height): one image up to max-h-60; when a turn carries several images, each is a smaller tile (up to max-h-28, max-w-[16rem]) and the row wraps.
  • A plain click on an image opens a preview Dialog over 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.
  • ChatbotEnhanced draws UserAttachments above the user's MessageContent instead 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

Clause-②: no
Metadata-protocol: none

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic.
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes.
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed.
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

🤖 Generated with Claude Code

…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
os-bob enabled auto-merge December 3, 2026 09:36
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Dec 3, 2026
@os-bob
os-bob added this pull request to the merge queue Dec 3, 2026
Merged via the queue into main with commit f808641 Dec 3, 2026
54 of 55 checks passed
@os-bob
os-bob deleted the fix/39293-user-image-display branch December 3, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

用户消息里的图片显示问题(被裁切、外面多一层框、点开新开标签)

2 participants