Files
Claude fb2e62f322 feat(issues): annotate a selection inside a deliverable document
Before: the full-screen deliverable view showed the file beside the
thread, but only comments and the description could be quoted into a
reply. Referring to a line of a report meant copying it by hand.

After: selecting text in a Markdown or text deliverable shows the same
"Annotate" bubble as comments. Confirming a note adds an annotation to
the thread's reply draft, highlighted in the document with a numbered
marker. The annotation chip shows the file name, clicking it returns to
the quote, and the published reply attributes the quote to the file
(linked to its preview page, or the plain name where no link exists).
Images, HTML, tables and structured files stay unannotatable.

How:
- ReplyAnnotation gains an optional source ({ type: "attachment", id,
  filename }); stored drafts without it are unchanged, and an unreadable
  source is dropped without losing the annotation. Annotations stay
  client-side draft metadata: the server only receives the composed
  Markdown, so it validates nothing new.
- composeAnnotatedReply names a file source with or without a link; the
  existing resolver contract already receives the annotation, and
  useAnnotationSourceLink branches on its source.
- AttachmentPreviewPanel marks Markdown and text bodies as a quotable
  region through annotationSource; code lines count as blocks when the
  text is indexed so multi-line quotes keep their breaks.
- The focus view mounts useCommentAnnotations on the issue's top-level
  reply draft (new:<issueId>), the one the thread composes into, with
  the file as the only source (attachment:<id>). Its popups mount inside
  the dialog so the focus trap accepts the note field, and IssueDetail
  routes chip clicks for a file quote back to the document.
- add_document locale key in en, zh-Hans, ja, ko and fr.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_017deksZDSzZBA4QSqZZoBip
2026-10-21 06:59:58 +00:00
..