Repository navigation
Quote transcript text as a card in the composer, as desktop does - #107
Merged
Merged
Conversation
Tarquinen
force-pushed
the
feat-composer-quote
branch
from
November 16, 2026 20:54
fd3e7f4 to
5e2e503
Compare
Tarquinen
force-pushed
the
feat-composer-quote
branch
from
November 16, 2026 20:55
5e2e503 to
57ddce4
Compare
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
force-pushed
the
feat-composer-quote
branch
from
November 16, 2026 21:38
57ddce4 to
a2e77d9
Compare
Merged
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.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 readsline-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 wereThe wire format matches desktop's
request.ts: the prompt text is the typed text, file references, then each quote asThe user quoted the following from earlier in the conversation:with its lines prefixed by>, followed byThe user made the following comment regarding this quote: …when it has a comment.metadatahasdisplayText(the typed text) andcomments: [{"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:
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.shpasses.