Skip to content

feat: make attachment cards in UserMessageBubble clickable (download) #7144

@valerydluski

Description

@valerydluski

Description

Attachment cards rendered inside user message bubbles (UserMessageBubble) are currently inert — clicking a file does nothing. This is inconsistent with ConversationSourcesPanel, where the same useAttachmentAction hook already drives download behaviour. This feature threads onAttachmentClick through the existing component hierarchy (MessageBubbleUserMessageBubbleAttachmentTrayAttachmentCard) so that clicking a file attachment in the conversation view triggers a download, reusing the already-specified action resolver.

Key points:

  • AttachmentTray gains optional onAttachmentClick and clickLabel props; forwards them to each AttachmentCard
  • UserMessageBubbleProps and MessageBubbleProps each gain onAttachmentClick / attachmentClickLabel; both components forward the props
  • ConversationMessageItem calls useAttachmentAction() and passes handleAttachmentClick + the i18n label to every MessageBubble it renders (main path and Suspense fallback)
  • AssistantMessageBubble is unaffected — props only forwarded when role === MessageRole.User
  • No changes to useAttachmentAction, BFF, generated client, or shared models
  • Libs stay host-agnostic: action resolution stays in apps/chat, passed into libs via props

Related issues

No response

Confidential information

  • I confirm that do not share any confidential information

Metadata

Metadata

Assignees

Labels

P3 – MediumSecondary flow or UX is degraded. No data loss. Reasonable workaround availableenhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions