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 (MessageBubble → UserMessageBubble → AttachmentTray → AttachmentCard) 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
Description
Attachment cards rendered inside user message bubbles (
UserMessageBubble) are currently inert — clicking a file does nothing. This is inconsistent withConversationSourcesPanel, where the sameuseAttachmentActionhook already drives download behaviour. This feature threadsonAttachmentClickthrough the existing component hierarchy (MessageBubble→UserMessageBubble→AttachmentTray→AttachmentCard) so that clicking a file attachment in the conversation view triggers a download, reusing the already-specified action resolver.Key points:
AttachmentTraygains optionalonAttachmentClickandclickLabelprops; forwards them to eachAttachmentCardUserMessageBubblePropsandMessageBubblePropseach gainonAttachmentClick/attachmentClickLabel; both components forward the propsConversationMessageItemcallsuseAttachmentAction()and passeshandleAttachmentClick+ the i18n label to everyMessageBubbleit renders (main path and Suspense fallback)AssistantMessageBubbleis unaffected — props only forwarded whenrole === MessageRole.UseruseAttachmentAction, BFF, generated client, or shared modelsapps/chat, passed into libs via propsRelated issues
No response
Confidential information