feat(annotate): All files view in the annotations panel for folder sessions (#1533)
* feat(ui): group annotations by document for multi-document sessions Pure helpers behind the annotations panel's cross-file view: one group per document that carries feedback (open document first, the rest by path, labelled relative to the nearest session root), and the rule that decides which scope the panel opens on — the saved preference, except that a document with no feedback of its own while other documents have some opens on All files. * feat(ui): All files view in the annotations panel The panel gains an optional This file | All files scope toggle and a grouped cross-file timeline built from the same AnnotationCard the single-document view renders. Cards belonging to another document route their select, edit and delete to per-document callbacks; useLinkedDoc grows updateStoredAnnotations so a host can write into a stored document's annotations (and refuses the active one, whose annotations are host state). Every new prop is optional: a host that passes none of them renders the previous panel, legacy '+N in M other files' affordance included. * feat(annotate): show every document's comments in folder sessions Wires the panel's All files view into the annotate app: the scope toggle appears whenever feedback exists outside the open document, the scope is re-resolved on each document change (and kept across a jump), and cross-file edits and deletes write into the owning document's store so the export reflects them. Clicking a card in another document navigates through the file browser's own selection path, waits for the commit, then selects — which is what scrolls a markdown highlight or drives the HTML viewer's marker. Cross-file mutations are deliberately not recorded in the annotation history: that stack describes the open document's surface. * docs: cross-file annotations in multi-document annotate sessions AGENTS.md gets the model (toggle, default rule, grouping, cross-file mutation and its undo caveat, jump, counts) under Annotation System, and tests/UI-TESTING.md a nine-step manual checklist. * chore(guides-show): repin the viewer manifest The scope toggle's two new Tailwind utilities (.min-w-[16px], .bg-surface-1/60) moved the viewer's bundled CSS hash. Only the CSS lines change: the viewer JS hash and every grammar chunk are byte-identical, so nothing from the annotations panel leaked into the read-only viewer. * fix(annotate): keep the sidebar closed when a cross-file jump lands on HTML A jump from the annotations panel follows the same rule as a link click between HTML documents: an HTML destination owns the viewport and the header carries its own Back, so arriving there must not pop the left sidebar. The rule now has one spelling — documentRendersHtml, extracted from resolveHtmlLinkIntent — which both callers ask.
M
Michael Ramos committed
1f9eb451cb6717d36956763359745f80f352b8fd
Parent: e45d472
Committed by GitHub <noreply@github.com>
on 9/15/2026, 6:17:19 AM