Skip to content

Quote transcript text as a card in the composer, as desktop does - #107

Merged
Tarquinen merged 1 commit into
devfrom
feat-composer-quote
Nov 16, 2026
Merged

Tarquinen merged 1 commit into
devfrom
feat-composer-quote

Conversation

@Tarquinen

@Tarquinen Tarquinen commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Quoting text from a reply now adds a quote card to the composer, like on desktop. You can add a comment to it, and the quote is sent the way desktop sends it.

Before, Quote put a Markdown > blockquote into the text field. It looked rough, it got in the way of what you were typing, and other clients saw it as plain text rather than a quote.

  • Quote (from text selection, from rendered Markdown and the TalkBack action) adds a card to the attachment row, after images and files. The keyboard stays up and the field keeps focus. You can add several, and × removes one
  • The card is desktop's compact card (attachment-card.css): 168dp wide, 8dp padding, one line of quote in medium weight over a small muted "💬 Add Comment" line. With a comment, the comment is on top and "❝ quote" below. It sits at the top of the row next to the image tiles, with the file chip's fill and radius, and uses the row's existing motion. At 2× font it widens a little so the second line still reads
  • Tapping a card opens desktop's compact comment panel (line-comment.css) above the composer, with the agent menu's motion: up to four muted lines of quote beside a thin bar, then the comment field with a ✓. The panel is drawn in the app's own window rather than a popup, so the keyboard stays up and nothing moves while focus goes from the composer's field to the panel and back. ✓, Done or Enter saves it, and an empty comment clears it. Back drops the edit, and a tap outside closes it only when nothing would be lost, as on desktop. Afterwards the composer's field has focus again, with its text and cursor as they were
  • Adding a quote or image scrolls the row to its end so the last card and its × are fully in view, unless that would hide the new card. A row scrolled to its end stays there when the keyboard closes and the composer narrows
  • Quotes and comments are saved with the draft, so they survive the app being killed, and they go out with Send, Steer, Queue and Retry
  • Sent and pending messages show quotes as the same compact cards, above the bubble and below images and files, matching how Android shows sent files. Quotes sent from desktop show the same way
  • While a question or permission is being answered, Quote still inserts Markdown, because the answer is sent as plain text

The wire format matches desktop's request.ts: the prompt text is the typed text, file references, then each quote as The user quoted the following from earlier in the conversation: with its lines prefixed by > , followed by The user made the following comment regarding this quote: … when it has a comment. metadata has displayText (the typed text) and comments: [{"type":"quote","text":…,"comment":…}].

Desktop for reference, then Android: the comment panel with images in the row, the saved comment, and the sent message, light and dark:

Desktop and Android, light Desktop and Android, dark

Quote, add a photo, add a comment with ✓ (the keyboard stays up), send:

quote-image-comment-send.mp4

Checked on the emulator against session-lab in light and dark, at 1× and 2× font: a quote with 1 to 3 images, with a file chip, several quotes with images and a file, an overflowing row, a long draft, and sent, pending and queued messages. Session-lab's record shows Send posting desktop's text and metadata with the comment, and Steer and Queue posting the same format. After a relaunch, the sent message reads its quote and comment back from the server. A quote and its comment in the draft survive killing the app. Frame by frame at 1× and at 0.25× time scale, ✓, Done, Back and a tap outside all close the panel with the keyboard up and the composer still. Adding or removing a quote next to images doesn't move the row or the composer, and a marked-up image still slides into its thumbnail with quote cards in the row. scripts/check.sh passes.

Quoting text from the transcript put a Markdown "> " blockquote into the
text field, which looked rough and didn't match desktop. Desktop adds a
quote card to the attachment row, lets you comment on it, and sends the
quote as a block in the prompt plus a {"type":"quote"} entry in
metadata.comments.

- Every Quote action (text selection, rendered Markdown and the TalkBack
  action) adds a quote card after the images and files in the attachment
  row. The keyboard stays up, the field keeps focus, several quotes can
  be added and x removes one.
- The card is desktop's compact card, sized from attachment-card.css:
  168dp wide, 8dp padding, a 6dp gap, one line of quote in medium 12sp
  over a muted 12sp "Add Comment" line, or the comment over "quote glyph
  + quote". It sits at the top of the row beside the image tiles, with
  the file chip's fill and radius, and widens a little at large font
  sizes so its second line still reads.
- Tapping a card opens desktop's comment panel (line-comment.css,
  compact) above the composer with the agent menu's motion: up to four
  muted lines of quote beside a thin bar, then the comment field and a
  check. The panel is drawn in the session's own window, not a popup, so
  the keyboard stays up and nothing moves as focus goes from the
  composer's field to the panel's and back. Check, Done or Enter saves
  (empty clears), Back drops the edit, an outside tap closes it only when
  nothing changed, and the composer's field gets focus back with its
  text and cursor.
- Adding a card scrolls the row to its end, x included, unless that would
  push the new card off the start, and a row at its end stays there as
  the composer narrows.
- Quotes and comments are saved with the draft and pending prompts, and
  travel with Send, Steer, Queue and Retry.
- The prompt matches desktop's request.ts: typed text, file references,
  then each quote as "The user quoted the following from earlier in the
  conversation:" plus its lines prefixed with "> " and, when commented,
  "The user made the following comment regarding this quote: ...", with
  metadata displayText and comments [{type:"quote", text, comment}].
- Sent and pending messages read the quotes back from metadata.comments
  and show them as the same cards above the bubble, so desktop's quotes
  show on Android too.
- While a question or permission is being answered, Quote still inserts
  Markdown, because the answer is sent as plain text.

Verified: scripts/check.sh on the VM, session tests updated (including
quoteCommented), and on the emulator against session-lab in light and
dark at 1x and 2x font: quotes with 1-3 images, a file chip, several
quotes with images and a file, an overflowing row, the keyboard closing,
a long draft, sent/pending/queued messages, Send with a comment and
Steer and Queue (lab promptPosts match desktop's text and metadata), the
quote and comment read back after a relaunch, killing the app with a
commented quote in the draft, the marked-up image slide into its
thumbnail with quote cards in the row, and frame by frame at 1x and
0.25x time scale that Check, Done, Back and an outside tap close the
panel with the keyboard up and the composer still.
@Tarquinen
Tarquinen merged commit 99cfef3 into dev Nov 16, 2026
3 checks passed
@Tarquinen Tarquinen mentioned this pull request Nov 16, 2026

This branch was previously deployed

1 inactive deployment
release — a2e77d9e Deployed Nov 16, 2026 by Tarquinen via check #369
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant