Repository navigation
feat(chat): selected text Copy / Note / Comment actions - #295
Merged
Merged
Conversation
Add Copy and Add as note alongside Comment in the selected-text popover. Preserve selected Markdown with the canonical Milkdown serializer, retain whole-response actions, and cover clipboard, note payload and browser interactions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Oct 12, 2026
Merged
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.
Summary
Alpha follow-up to merged #294 for #293, implementing the user-approved selected-content actions: Copy / Add as note / Comment as icon buttons with localized tooltips and accessible names.
Copy writes only selected plain text using the existing clipboard helper, with an explicit error and retry on failure. Add as note saves only selected Markdown through the existing
canvasStore.addNodepath anduser-from-chatthread origin. Markdown comes from the canonical Milkdown serializer over a parent-preserving document slice, retaining partial inline marks, links, list structure and fenced code without unselected text.Comment retains the existing snapshot editor and explicit Add to input flow. The whole-response bottom buttons are unchanged. Successful copy/note actions dismiss the popover without touching the input draft or triggering generation. Only completed, loaded assistant text in the active Chat is eligible; streaming and cross-surface exclusions remain unchanged.
Scope
No default comments, streaming comment support, permanent annotations, main-targeted delivery, API/schema/dependency/subtree changes or release. The follow-up diff is based on Alpha merge
ae491db34cb5ab26855c46ff3719102c9813437b; it does not repeat the original MVP changes. Related architecture docs describe the selection actions and Markdown capture.Validation
pnpm typecheck,pnpm format,pnpm lint:fix,pnpm check:i18n, andgit diff --checkpassed. Lint: 0 errors, 350 existing warnings.This PR targets alpha, not main. No merge is requested automatically.