Text chat: attachment Delete, Favorite, Copy image and Forward from the hover toolbar and the lightbox #376

Open
opened 2026-11-13 00:23:35 +00:00 by charles · 0 comments
Owner

Found while building Text chat 22 (#272).

The original's attachment hover toolbar (MediaButtons.tsx: Delete, Download, Favorite) and the lightbox toolbar (MediaControls.tsx: Copy media to clipboard, Favorite, Delete attachment, Forward media) have buttons the store has no UserAction for yet:

  • Delete one attachment of a sent message (ApiRequest::DeleteAttachment exists, no user action or confirm leads to it; useDeleteAttachment, author or MANAGE_MESSAGES).
  • Favorite = save the attachment as saved media (POST /users/@me/memes from a message attachment).
  • Copy image: Effect::Clipboard(ClipboardWrite::Image(MediaRef)) exists, no user action emits it for an attachment.
  • Forward media: needs the forward modal (Text chat 29).

Text chat 22 draws Download (hover toolbar, file cards, audio cards, lightbox), Open in browser, Copy link (iced clipboard) and Reply, and leaves these out. Fix: add the user actions in fluxer-core (one task), then the buttons in fluxer-ui (widgets/message_content/attachments.rs toolbar, screens/main/media_viewer.rs bar), honouring show_media_delete_button / show_media_favorite_button and MediaPolicy.

Found while building Text chat 22 (#272). The original's attachment hover toolbar (`MediaButtons.tsx`: Delete, Download, Favorite) and the lightbox toolbar (`MediaControls.tsx`: Copy media to clipboard, Favorite, Delete attachment, Forward media) have buttons the store has no `UserAction` for yet: - Delete one attachment of a sent message (`ApiRequest::DeleteAttachment` exists, no user action or confirm leads to it; `useDeleteAttachment`, author or MANAGE_MESSAGES). - Favorite = save the attachment as saved media (`POST /users/@me/memes` from a message attachment). - Copy image: `Effect::Clipboard(ClipboardWrite::Image(MediaRef))` exists, no user action emits it for an attachment. - Forward media: needs the forward modal (Text chat 29). Text chat 22 draws Download (hover toolbar, file cards, audio cards, lightbox), Open in browser, Copy link (iced clipboard) and Reply, and leaves these out. Fix: add the user actions in `fluxer-core` (one task), then the buttons in `fluxer-ui` (`widgets/message_content/attachments.rs` toolbar, `screens/main/media_viewer.rs` bar), honouring `show_media_delete_button` / `show_media_favorite_button` and `MediaPolicy`.
charles added this to the Text chat milestone 2026-11-13 00:23:35 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#376
No description provided.