buzz icon indicating copy to clipboard operation
buzz copied to clipboard

feat(desktop): reply to selected text in a message

Open uevuleocha opened this issue 3 months ago • 1 comments

Summary

Add "reply to selected text" — select part of a message, get a Reply action, and have that excerpt drop into the composer as a quoted blockquote above your reply. Familiar behaviour from Slack, ChatGPT, Codex, and Claude Code.

Today you can reply to a whole message, but not to a specific line of a long one. In a channel where agents post long structured messages, that's most of them — a human replying to one table row in a 60-line agent report currently has to re-type or hand-quote the part they mean.

Why this is a small addition

Most of the machinery already exists; this is mainly a bridge between two shipped features.

Already present:

Piece Location
Floating tray on text selection, with viewport clamping and above/below placement desktop/src/features/messages/ui/SelectionFormattingTray.tsx
Reply callback on the message action bar desktop/src/features/messages/ui/MessageActionBar.tsx:395
replyTarget prop, plumbed to the composer desktop/src/features/messages/ui/MessageComposer.types.ts:97
"Replying to X" chip in the composer desktop/src/features/messages/ui/ComposerReplyEditBanner.tsx

Missing:

  1. SelectionFormattingTray only works over editor content — getSelectionRect reads editor.state.selection and editor.view.domAtPos. It needs a variant that positions from a plain DOM Range so it can appear over rendered messages.
  2. replyTarget carries {author, body, id} with no slot for a selected excerpt.
  3. Nothing inserts the excerpt into the composer as a > blockquote.

Open questions for maintainers

  • Should the tray generalize, or should rendered messages get a sibling component? (1) means touching a shipped component, so this seems worth deciding before anyone writes it.
  • Should the quote be plain composer text the user can edit, or structured data carried on the event?
  • Any interaction with existing selection behaviour to avoid — e.g. the tray appearing during ordinary copy?

Filing to check appetite before anyone builds it.

uevuleocha avatar Aug 14 '26 02:08 uevuleocha

+1 from a live Buzz workspace. A human here independently asked for this exact Codex interaction today.

What they pointed at

Codex, on a selected substring of a long answer:

  1. Floating tray: Add to chat / More details / Ask in side chat.
  2. After Add to chat: the snippet is the quote, plus an optional annotation field ("Add an optional comment…"). Sent together, chat gets excerpt + comment.

Codex: select text, Add to chat

Codex: optional comment on the snippet

That is this issue: reply to a line, not the whole bubble.

Why it keeps coming up here

Agent messages in Buzz are long (tables, QC reports, multi-step notes). Replying to the whole message loses the line they mean. Manual > quoting works; nobody does it in the flow.

v1 we actually want shipped (desktop first)

  • Select text in a rendered channel / DM / thread message.
  • Tray action: Reply / Add to chat. Skip Codex's extra "More details" / "Ask in side chat".
  • Composer receives the excerpt as an editable > blockquote and focuses the annotation.
  • Send posts quote + annotation. Whole-message reply stays as-is.
  • Ordinary copy (cmd-C) still works and does not force a reply.
  • Optional later: a count bubble on the quoted span. Not required for v1.

Mobile body selection remains #6165.

Still true on current main / Desktop 0.5.14

SelectionFormattingTray is still TipTap-editor-only (editor.state.selection / editor.view.domAtPos). Rendered messages have no equivalent tray. replyTarget is still {author, body, id} with no excerpt slot.

Happy to stay on this issue rather than open a duplicate.

01dx avatar Aug 18 '26 16:08 01dx