Skip to content

feat(message): add reply actions and quote previews - #492

Open
minwookshin wants to merge 1 commit into
vercel:mainfrom
minwookshin:codex/message-reply-356
Open

minwookshin wants to merge 1 commit into
vercel:mainfrom
minwookshin:codex/message-reply-356

Conversation

@minwookshin

Copy link
Copy Markdown

Adds a composable reply flow for #356. MessageReply returns the selected text within a message, or the original message when there is no applicable selection. MessageQuote renders a labeled reference with an optional remove action. MessageContent accepts a ref to scope selection handling.

The example composes these with PromptInput and demonstrates quote replacement, draft preservation, composer focus, local submission, and Escape cancellation that respects IME composition and already-handled events. It also guards IME confirmation Enter after composition ends. Documentation covers the APIs, quote state ownership, and explicitly including quoted context when sending to the AI SDK.

Before After
Applications implement reply selection and preview themselves Reusable action and quote preview, with a complete composition example
Browser focus changes can lose a selected quote Selection is captured before pointer focus changes
Quote cancellation may interfere with typing Scoped Escape handling preserves drafts and IME composition

Validation:

  • All 984 Chromium tests pass; 26 new tests also pass in Firefox and WebKit.
  • Production docs build and scoped formatting/lint checks pass.
  • Desktop and 320px/390px browser flows pass; no Axe violations in the new example across the tested themes and reduced-motion setting.
  • A compiler comparison using the elements tsconfig reports the same 56 pre-existing diagnostic locations and codes at the base and with this patch. No new or modified implementation/example file has a diagnostic.
  • The docs site's existing React hydration error Send siteId as label on feedback GitHub issues #418 also reproduces on the untouched Suggestion page.

No new dependencies or PromptInputMessage schema changes. Quote state and model serialization remain application-owned. The example uses a persistent Reply action so keyboard and touch users can reply without selecting text.

Related issue: #356.

Screenshots of the production preview Selected text quoted in the light desktop composer Selected text quoted in the dark mobile composer

@vercel

vercel Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

@minwookshin is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
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