diff --git a/design/PAP-9432-doc-annotations/index.html b/design/PAP-9432-doc-annotations/index.html deleted file mode 100644 index e29fad38a39..00000000000 --- a/design/PAP-9432-doc-annotations/index.html +++ /dev/null @@ -1,461 +0,0 @@ - - - - - -PAP-9432 — Document Annotations UX - - - -
-
- - - PAP-9432 · Doc Annotations
- Jump to a screen -
- -
- -
- -
-
-
PAP-9432 · Phase 1 UX spec
-

Document annotations — UX spec

-

Document-native highlights and comment threads on Paperclip issue documents (primary target: the plan document). Paired desktop/mobile wireframes for rendered mode, edit mode, side panel, state matrix, and deep-link behaviour. Pair this with the spec document on PAP-9432.

-
- 6 screens - Desktop + mobile - Lo-fi · monochrome - Click any wireframe to zoom -
-
- -
-
Flow
-

Annotation lifecycle across revisions

-

Single thread followed through select → compose → resolve → revision → re-anchor outcomes. Dashed arrows are side effects (e.g. assignee wake).

-
-
flow.svg1280×720
- Annotation lifecycle flow -
-
- -
-
Step 1 · Capture
-

1.Rendered mode — selection

-

User selects body text; floating toolbar offers Comment + Copy link. ⌘⇧M is the keyboard equivalent.

-
-
-
rendered-selection.svg1280×800 · desktop
- Rendered-mode selection — desktop -
-
-
mobile375×812
- Rendered-mode selection — mobile -
-
-
-

Annotations

-
    -
  • 1 — floating selection toolbar anchored above the range (flips below if <48px from card top).
  • -
  • 2 — active highlight: solid mid-grey underline.
  • -
  • 3 — resolved highlight: dashed underline, only visible when "Show resolved" is on.
  • -
  • 4 — unresolved-count chip lives between rev menu and right-actions.
  • -
  • 5 — ⌘⇧M opens the comment composer for the current selection.
  • -
  • Mobile — selection sheet → + Comment opens the bottom sheet directly; native platform sheet is preferred when extensible.
  • -
-
Why this changes: document-native capture matches Google Docs / Notion mental models; agents and reviewers already think in "select text → comment" rather than "open a chat".
-
-
-
-
- -
-
Step 2 · Read & reply
-

2.Side panel · bottom sheet

-

Annotation panel is bound to one document. Desktop = right slide-in (380px), mobile = bottom sheet with peek/half/full snap points.

-
-
-
side-panel.svg1280×800 · desktop
- Side panel — desktop -
-
-
mobile375×812
- Bottom sheet — mobile -
-
-
-

Annotations

-
    -
  • 1 — filter chips (Open / Resolved / Stale / Orphan); active chip is filled.
  • -
  • 2 — focused thread auto-expands with composer; others collapse to 2-line summary.
  • -
  • 3 — focused anchor in body gets a 2px border + soft fill; bi-directional click linkage.
  • -
  • Mobile — single thread at a time; prev/next steps through current filter. Composer collapses to a pill at rest.
  • -
-
Why this changes: right-rail Properties is rarely read while reviewing comments — collapsing it for the panel buys 380px without a new layout. On mobile, single-thread focus + prev/next avoids horizontal cramming that kills usability in narrow viewports.
-
-
-
-
- -
-
Step 3 · Edit mode
-

3.Edit-mode capture + dirty-draft guardrails

-

MDXEditor/Lexical hosts selection capture via a plugin; existing thread anchors render as read-only decorations. Dirty/conflicted drafts disable new-anchor creation with explicit reason text.

-
-
-
edit-mode.svg1280×800 · desktop
- Edit mode — desktop -
-
-
mobile375×812
- Edit mode — mobile -
-
-
-

Annotations

-
    -
  • 1 — toolbar primary action uses current Lexical RangeSelection; same ⌘⇧M shortcut.
  • -
  • 2 — dirty-draft banner names the reason; resolves the second autosave commits.
  • -
  • 3 — side-panel footer CTA mirrors the disabled state; existing threads remain readable.
  • -
  • Mobile — keyboard accessory bar shows the disabled state inline so it isn't a surprise.
  • -
-
Why this changes: anchors are tied to a saved revision baseline. Allowing creation against a dirty draft either fabricates revisions or risks anchors into never-saved text. The explicit disabled-with-reason pattern is preferable to silent allow-then-fail.
-
-
-
-
- -
-
Step 4 · State matrix
-

4.Open · Resolved · Stale · Orphaned

-

Identical data layout, distinct chrome. Resolved hidden by default; stale highlights remain but flagged; orphaned have no in-body anchor.

-
-
-
states.svg1280×800 · desktop
- Annotation states — desktop -
-
-
mobile375×812
- Annotation states — mobile -
-
-
-

Annotations

-
    -
  • Open — solid grey underline, primary "Open" pill, Reply / Resolve / Copy link.
  • -
  • Resolved — dashed outline + dimmed card, hidden by default; Reopen + Copy link.
  • -
  • Stale — dashed outline + ⚠; Re-anchor (inline re-select), Show diff, Resolve.
  • -
  • Orphaned — no in-body anchor; panel-only with "View rev N" link to the last valid revision.
  • -
-
Why this changes: distinguishing fuzzy vs. lost anchors avoids the binary "vanished" failure mode. Reviewers keep their thoughts even when prose changes, and stale state surfaces a path back to a clean anchor.
-
-
-
-
- -
-
Step 5 · Deep linking
-

5.Folded → unfolded with focused thread + comment

-

URL adds &thread=…&comment=… to the existing #document-key anchor. Resolving forces unfold, scroll, pulse, panel auto-open, thread expand, comment focus.

-
-
-
deep-link.svg1280×800 · desktop
- Deep link — desktop -
-
-
mobile375×812
- Deep link — mobile -
-
-
-

Annotations

-
    -
  • 1 — folded card auto-unfolds; count chip remains the only chrome on the folded header.
  • -
  • 2 — URL grammar — three precision levels, each optional.
  • -
  • 3 — body pulse ring (1.4s) on anchor; then steady focused border.
  • -
  • 4 — panel auto-opens, expands target thread, comment-level focus ring.
  • -
-
Why this changes: agents quote-link inside comments today; without unambiguous deep-link resolution, a clicked link drops the reader into a generic doc view and forces them to scroll-hunt. Three precision levels (doc / thread / comment) means we don't have to invent a new scheme for each entry point.
-
-
-
-
- -
-
Accessibility
-

Keyboard, focus, motion, ARIA

-
-
    -
  • Shortcut — ⌘⇧M / Ctrl⇧M opens Comment for the current selection in both rendered and edit modes.
  • -
  • Tab order — header filters → thread cards (tabindex=0) → expanded thread composer.
  • -
  • Focus on open — composer textarea (compose) or first comment row (deep link).
  • -
  • Focus on close — returns to the originating highlight or the count chip.
  • -
  • Escape semantics — composer dirty → confirm-discard; otherwise collapse thread → close panel. Bottom sheet snaps down one step per Esc / scrim tap.
  • -
  • Visible focus — focus-visible:ring-2 ring-ring ring-offset-2; 2px outline on highlight runs (never colour alone).
  • -
  • ARIA — panel role="complementary", thread role="article" + aria-labelledby on quote, hidden state text on highlights and thread headers.
  • -
  • Reduced motion — pulse, slide, snap fall back to instant under prefers-reduced-motion: reduce; focus rings stay.
  • -
  • Contrast — quote chip bg-muted/40 on bg-card passes AA; Stale never relies on the ⚠ glyph alone.
  • -
-
-
- -
-
For reviewer
-

Open questions

-
-
    -
  • Q1 — Selection on touch: inject into native selection sheet where supported (iOS Safari, Chrome Android), fall back to floating FAB anchored to selection rect. Recommend platform-sheet-first with FAB fallback.
  • -
  • Q2 — Resolved visibility default: hidden with toggle (recommended) or visible with softer chrome. Hidden by default — matches Google Docs and keeps long plan docs readable.
  • -
  • Q3 — Stale Re-anchor: inline re-select (recommended) vs. modal with two body previews. Inline; "Show diff" covers the modal-style comparison need.
  • -
-
-
- - -
-
- - - - - - diff --git a/design/PAP-9432-doc-annotations/wireframes/deep-link-mobile.svg b/design/PAP-9432-doc-annotations/wireframes/deep-link-mobile.svg deleted file mode 100644 index f12c113adfd..00000000000 --- a/design/PAP-9432-doc-annotations/wireframes/deep-link-mobile.svg +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - ← Issue - PLAN — rev 4 - ⋯ - - - - - - …#document-plan&thread=docann_xyz - - - - - - - - - - - - - - - - - - - - - - - Thread - × - - - - - “quote …” - - Dotta · 2m ago - - - - - - UXDesigner · just now - [comment=c_42] - - - - - ‹ - 1 of 2 open - - › - - Resolve - - - - - - - - - - - 1 deep link unfolds doc, scrolls anchor into upper half of viewport above the sheet - 2 bottom sheet opens automatically; comment-id focus ring on target comment - - diff --git a/design/PAP-9432-doc-annotations/wireframes/deep-link.svg b/design/PAP-9432-doc-annotations/wireframes/deep-link.svg deleted file mode 100644 index 4ab80f9842f..00000000000 --- a/design/PAP-9432-doc-annotations/wireframes/deep-link.svg +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - /PAP/issues/PAP-9436#document-plan&thread=docann_xyz&comment=c_42 - - - - - Before deep link - - - ▸ PLAN rev 4 updated 12m ago 3 comments - ⋯ - - - - - - After deep link — folded card auto-opens, scrolls to anchor, opens panel to thread - - - - ▾ - - PLAN - rev 4 ▾ - - - 3 comments - - - - - - - - - - - - - - - - - - - - - - Comments - PLAN · rev 4 - - - - - - “selected quote …” - - - Dotta · 2m ago - - - - - - - UXDesigner · just now - [comment=c_42] - - - - - - - Reply… - - Reply - - - - - - - - - - - - - 1 folded state — fold curtain still hides body. Deep link forces unfold + scroll + focus. - 2 URL grammar — `#document-{key}&thread={id}&comment={id}`; key alone scrolls to doc only - 3 body pulse — 1.4s ring on anchor, then steady focused border - 4 panel auto-opens on the right, expands target thread, scrolls to target comment, focus ring on comment - - diff --git a/design/PAP-9432-doc-annotations/wireframes/edit-mode-mobile.svg b/design/PAP-9432-doc-annotations/wireframes/edit-mode-mobile.svg deleted file mode 100644 index 911ca7fa757..00000000000 --- a/design/PAP-9432-doc-annotations/wireframes/edit-mode-mobile.svg +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - ← Cancel - Edit plan - Done - - - - - - ⟳ Saving draft… new comments disabled until saved - - - - - - - B - I - H - • - ⌧ - - - + Comment (save first) - - - - - - - - - - - - - - - - - - - - - - - - - Comment disabled — autosave in progress - Hide - - - - - - - - - - 1 dirty-state ribbon — explains why new anchors are disabled - 2 toolbar action disabled with reason hover (sheet on tap) - 3 keyboard accessory mirrors the disabled state - - diff --git a/design/PAP-9432-doc-annotations/wireframes/edit-mode.svg b/design/PAP-9432-doc-annotations/wireframes/edit-mode.svg deleted file mode 100644 index 86ecf9fdfef..00000000000 --- a/design/PAP-9432-doc-annotations/wireframes/edit-mode.svg +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - - - EDIT - - PLAN - rev 4 ← editing - - ⟳ Saving… - - - - 3 comments - - - Cancel - - Done - - - - - - - B - I - S - - H1 - H2 - • - 1. - - ⌧ Link - ⌗ Code - ⌹ Table - - - - + Comment on selection - ⌘⇧M - - - - - - - - - - - - - - - - - - - - - - - - - + Comment - - ⌘⇧M - - - - - - - - Save draft to anchor new comments - Existing threads remain readable. New anchors are disabled while the draft is unsaved. - - Save now - - - - - - - - Comments - PLAN · rev 4 · read-only while draft is dirty - - - - - - “existing quote …” - Dotta · 1h ago - 2 replies - - - - - New comment disabled — save draft first - - - - - - - - - - - 1 toolbar primary action — uses current Lexical selection; same shortcut ⌘⇧M - 2 dirty-draft banner — explains why new anchors are disabled until save lands - 3 disabled "new comment" CTA mirrors banner reason - - diff --git a/design/PAP-9432-doc-annotations/wireframes/flow.svg b/design/PAP-9432-doc-annotations/wireframes/flow.svg deleted file mode 100644 index 6d314420926..00000000000 --- a/design/PAP-9432-doc-annotations/wireframes/flow.svg +++ /dev/null @@ -1,141 +0,0 @@ - - - - Annotation lifecycle — single thread across revisions - Each card is one state in the lifecycle of a single thread. Arrows show user/system events that drive transitions. - - - - - - - 1. Select text - - - - + Comment - selection toolbar - - - - - 2. Compose - - “quote…” - - type comment… - - Send - - - - - 3. Open thread - - - anchor + 2 replies - wakes agent on issue - - - - - 4. Resolve - - - Resolved - hidden by default; - "Show resolved" reveals - - - - - - 5. Doc revised - rev 4 → rev 5 - - - server remaps anchor - - - - - 6a. Exact remap - - quote+prefix+suffix match - thread stays Open - - - - - 6b. Stale - - fuzzy match only - ⚠ flag + Re-anchor action - - - - - 6c. Orphaned - - no match in body - view rev 3 to see original - - - - - - 4'. Reopen - - resolved → open - re-wakes assignee - - - - - - Edit-mode draft - dirty / conflicted - - read-only panel - no new anchors - save → unlocks - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Legend - - user/system event - - side-effect (e.g. wake) - - resolved / stale chrome - - diff --git a/design/PAP-9432-doc-annotations/wireframes/rendered-selection-mobile.svg b/design/PAP-9432-doc-annotations/wireframes/rendered-selection-mobile.svg deleted file mode 100644 index 26aa1996827..00000000000 --- a/design/PAP-9432-doc-annotations/wireframes/rendered-selection-mobile.svg +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - ← Issue - ⋯ - - - - - PAP-9436 - Phase 4: Document - annotation UI - - - - - - - - ▾ - - PLAN - rev 4 ▾ - - - - 3 comments - - - - - - - - - - - - - - - - - - - - - - - + Comment - - ⎘ Copy link - - - - - - - - Long-press text to select • Selection menu appears above - - - - - - - - - 1 native selection sheet → tap "Comment" opens compose drawer (full bottom sheet) - 2 unresolved count chip - - diff --git a/design/PAP-9432-doc-annotations/wireframes/rendered-selection.svg b/design/PAP-9432-doc-annotations/wireframes/rendered-selection.svg deleted file mode 100644 index dc5e9f51a80..00000000000 --- a/design/PAP-9432-doc-annotations/wireframes/rendered-selection.svg +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - Share - ⋯ More - - - - - PAP / Issue - Phase 4: Document annotation UI - - in progress - - medium - - - - - - - - ▾ - - PLAN - rev 4 ▾ - updated 12m ago - - - - 3 comments - - - ⧉ - - ⋯ - - Comments - - - - - - - - - - - - - - - - - - - - - - - - - - - - - show more ▾ - - - - - - + Comment - - ⎘ Copy link - ⌘⇧M - - - - - - - - - Properties - - Assignee - - Status - in progress - Priority - medium - Project - Paperclip App - Blockers - 0 - - - - - - - - - - - - 1 selected range — floating toolbar anchors above selection (or below on near-top) - 2 active thread highlight — solid underline, hover/focus elevates - 3 resolved thread highlight — dashed underline, dimmed - 4 unresolved count chip in document chrome - 5 floating toolbar — "Comment" + "Copy link"; ⌘⇧M keyboard shortcut - - diff --git a/design/PAP-9432-doc-annotations/wireframes/side-panel-mobile.svg b/design/PAP-9432-doc-annotations/wireframes/side-panel-mobile.svg deleted file mode 100644 index 85fa67908fa..00000000000 --- a/design/PAP-9432-doc-annotations/wireframes/side-panel-mobile.svg +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - - - - - - - - - - Tap scrim to dismiss - - - - - - - - - - Comments - PLAN · rev 4 - × - - - - - - Open 2 - - Resolved 1 - - Stale 0 - - - - - - - “selected quote …” - - - Dotta · board - 2m ago - - - - - - - ‹ - 1 of 2 open - - › - - Resolve - - - - - - - Reply… - - Send - - - - - - - - - - - 1 grab handle — swipe up to expand to full height, swipe down to dismiss - 2 single thread focus — prev/next steps through "Open" filter; tapping body scrolls to anchor - 3 composer collapses; tapping expands to multiline + mention chip - - diff --git a/design/PAP-9432-doc-annotations/wireframes/side-panel.svg b/design/PAP-9432-doc-annotations/wireframes/side-panel.svg deleted file mode 100644 index f3ef3d82e3b..00000000000 --- a/design/PAP-9432-doc-annotations/wireframes/side-panel.svg +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - - - - - - - - ▾ - - PLAN - rev 4 ▾ - - - - 3 comments - - - ⧉ - - ⋯ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Comments - PLAN · rev 4 - - - - Open 2 - - Resolved 1 - - × - - - - - - - - - “selected quote from the document …” - - - - Dotta · board - 2m ago - - - - - - - UXDesigner · agent - just now - - - - - - - - Reply… - - @ mention - - Resolve - - Reply - - - - - - - “another anchored quote…” - - - Senior PE - 1d ago · 2 replies - - - - - - - - “resolved quote…” - - - CodexCoder - Resolved · 3h ago - - Reopen - - - - - - - - + New comment on selection - ⌘⇧M - - - - - - - - - - - 1 panel header — filter chips (Open / Resolved) + clear-focus × - 2 expanded thread — quote chip, replies, mention picker, Resolve + Reply - 3 focused anchor — soft inset background, links pane ↔ body - - diff --git a/design/PAP-9432-doc-annotations/wireframes/states-mobile.svg b/design/PAP-9432-doc-annotations/wireframes/states-mobile.svg deleted file mode 100644 index 6245124bd10..00000000000 --- a/design/PAP-9432-doc-annotations/wireframes/states-mobile.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - ← PLAN - Comments - ⋯ - - - - - - Open 1 - - Resolved 1 - - Stale 1 - - Orphan 1 - - - - - - - - “quote …” - - Open - rev 4 · 2 replies - - Reply - Resolve - Copy link - - - - - - “quote …” - - Resolved - rev 3 → 4 - - Reopen - Copy link - - - - - - “fuzzy quote …” - - Stale - ⚠ matched fuzzy - - Re-anchor - Show diff - Resolve - - - - - - “original quote …” - - Orphaned - last seen rev 3 - - View rev 3 - Resolve - Copy link - - - - - - Filter chips wrap to a second row at 320px. "Show resolved/orphaned" toggles persist per-document. - - - - - - - diff --git a/design/PAP-9432-doc-annotations/wireframes/states.svg b/design/PAP-9432-doc-annotations/wireframes/states.svg deleted file mode 100644 index c6253850dfb..00000000000 --- a/design/PAP-9432-doc-annotations/wireframes/states.svg +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - Thread state matrix — visible chrome per state - Same anchor data, different presentation. Card states on the left, in-body highlight states on the right. - - - - - - - - - “selected quote …” - Open · active anchor - Dotta · 2m ago · 2 replies - - Open - rev 4 (current) - - Reply • Resolve • Copy link - - - - - - - “resolved quote …” - Resolved - CodexCoder · 3h ago · 1 reply - - Resolved - rev 3 → 4 - - Reopen • Copy link - - - - - - - “fuzzy-matched quote …” - Stale · fuzzy anchor - Senior PE · resolved match at rev 4 - - Stale - - Re-anchor - - Show diff - - Click "Show diff" to compare rev 3 anchor vs rev 4 text - - - - - - - “original quote no longer in body” - Orphaned · no match - QA · last seen rev 3 · 4 replies - - Orphaned - - View rev 3 - - Resolve - - No in-body anchor → no scroll-to action; quote stays canonical - - - - - - - In-body highlight legend - - - - - - Active selection (composing) - - - Open thread — solid mid-grey underline - - - Resolved thread — dashed outline, dim fill - - - Stale (fuzzy match) — dashed outline, ⚠ flag - ⚠ - - - Orphaned — no in-body underline; panel-only - - - Focused thread — heavy 2px border across anchor - - - - - - - 3 comments - unresolved count only — resolved/stale/orphaned hidden until filter toggled - - - - - - - - All four states show identical author/quote/reply metadata. Only the chrome (border, fill, badge, actions) differs — never the data layout. - diff --git a/design/PAP-9436-doc-annotation-ui/screenshots/01-integrated-desktop-open.png b/design/PAP-9436-doc-annotation-ui/screenshots/01-integrated-desktop-open.png deleted file mode 100644 index cc44b18358e..00000000000 Binary files a/design/PAP-9436-doc-annotation-ui/screenshots/01-integrated-desktop-open.png and /dev/null differ diff --git a/design/PAP-9436-doc-annotation-ui/screenshots/02-integrated-desktop-zero-count.png b/design/PAP-9436-doc-annotation-ui/screenshots/02-integrated-desktop-zero-count.png deleted file mode 100644 index 8482ccc3536..00000000000 Binary files a/design/PAP-9436-doc-annotation-ui/screenshots/02-integrated-desktop-zero-count.png and /dev/null differ diff --git a/design/PAP-9436-doc-annotation-ui/screenshots/03-integrated-desktop-edit-mode.png b/design/PAP-9436-doc-annotation-ui/screenshots/03-integrated-desktop-edit-mode.png deleted file mode 100644 index ee6e2b42bbf..00000000000 Binary files a/design/PAP-9436-doc-annotation-ui/screenshots/03-integrated-desktop-edit-mode.png and /dev/null differ diff --git a/design/PAP-9436-doc-annotation-ui/screenshots/04-integrated-desktop-dirty-draft.png b/design/PAP-9436-doc-annotation-ui/screenshots/04-integrated-desktop-dirty-draft.png deleted file mode 100644 index 3e4b94ec0f4..00000000000 Binary files a/design/PAP-9436-doc-annotation-ui/screenshots/04-integrated-desktop-dirty-draft.png and /dev/null differ diff --git a/design/PAP-9436-doc-annotation-ui/screenshots/05-integrated-mobile-sheet.png b/design/PAP-9436-doc-annotation-ui/screenshots/05-integrated-mobile-sheet.png deleted file mode 100644 index b8326f054ab..00000000000 Binary files a/design/PAP-9436-doc-annotation-ui/screenshots/05-integrated-mobile-sheet.png and /dev/null differ diff --git a/design/PAP-9436-doc-annotation-ui/screenshots/10-states-open-focused.png b/design/PAP-9436-doc-annotation-ui/screenshots/10-states-open-focused.png deleted file mode 100644 index 291d720a8f4..00000000000 Binary files a/design/PAP-9436-doc-annotation-ui/screenshots/10-states-open-focused.png and /dev/null differ diff --git a/design/PAP-9436-doc-annotation-ui/screenshots/11-states-resolved-focused.png b/design/PAP-9436-doc-annotation-ui/screenshots/11-states-resolved-focused.png deleted file mode 100644 index bcd689d6369..00000000000 Binary files a/design/PAP-9436-doc-annotation-ui/screenshots/11-states-resolved-focused.png and /dev/null differ diff --git a/design/PAP-9436-doc-annotation-ui/screenshots/12-states-stale-focused.png b/design/PAP-9436-doc-annotation-ui/screenshots/12-states-stale-focused.png deleted file mode 100644 index 5f8a1c2b334..00000000000 Binary files a/design/PAP-9436-doc-annotation-ui/screenshots/12-states-stale-focused.png and /dev/null differ diff --git a/design/PAP-9436-doc-annotation-ui/screenshots/13-states-orphaned-focused.png b/design/PAP-9436-doc-annotation-ui/screenshots/13-states-orphaned-focused.png deleted file mode 100644 index 1490c15f84f..00000000000 Binary files a/design/PAP-9436-doc-annotation-ui/screenshots/13-states-orphaned-focused.png and /dev/null differ diff --git a/design/PAP-9486-doc-comments-right/screenshots/01-integrated-desktop-open.png b/design/PAP-9486-doc-comments-right/screenshots/01-integrated-desktop-open.png deleted file mode 100644 index 55b3f60ad0c..00000000000 Binary files a/design/PAP-9486-doc-comments-right/screenshots/01-integrated-desktop-open.png and /dev/null differ diff --git a/design/PAP-9486-doc-comments-right/screenshots/02-integrated-desktop-zero-count.png b/design/PAP-9486-doc-comments-right/screenshots/02-integrated-desktop-zero-count.png deleted file mode 100644 index 7c271658c14..00000000000 Binary files a/design/PAP-9486-doc-comments-right/screenshots/02-integrated-desktop-zero-count.png and /dev/null differ diff --git a/design/PAP-9486-doc-comments-right/screenshots/03-integrated-desktop-edit-mode.png b/design/PAP-9486-doc-comments-right/screenshots/03-integrated-desktop-edit-mode.png deleted file mode 100644 index 8da6279b49a..00000000000 Binary files a/design/PAP-9486-doc-comments-right/screenshots/03-integrated-desktop-edit-mode.png and /dev/null differ diff --git a/design/PAP-9486-doc-comments-right/screenshots/04-integrated-desktop-dirty-draft.png b/design/PAP-9486-doc-comments-right/screenshots/04-integrated-desktop-dirty-draft.png deleted file mode 100644 index 37f94e2edab..00000000000 Binary files a/design/PAP-9486-doc-comments-right/screenshots/04-integrated-desktop-dirty-draft.png and /dev/null differ diff --git a/design/PAP-9486-doc-comments-right/screenshots/05-integrated-mobile-sheet.png b/design/PAP-9486-doc-comments-right/screenshots/05-integrated-mobile-sheet.png deleted file mode 100644 index d049f6ee57e..00000000000 Binary files a/design/PAP-9486-doc-comments-right/screenshots/05-integrated-mobile-sheet.png and /dev/null differ diff --git a/design/PAP-9486-doc-comments-right/screenshots/10-states-open-focused.png b/design/PAP-9486-doc-comments-right/screenshots/10-states-open-focused.png deleted file mode 100644 index 259ac719d09..00000000000 Binary files a/design/PAP-9486-doc-comments-right/screenshots/10-states-open-focused.png and /dev/null differ diff --git a/design/PAP-9486-doc-comments-right/screenshots/11-states-resolved-focused.png b/design/PAP-9486-doc-comments-right/screenshots/11-states-resolved-focused.png deleted file mode 100644 index bf6811d1fce..00000000000 Binary files a/design/PAP-9486-doc-comments-right/screenshots/11-states-resolved-focused.png and /dev/null differ diff --git a/design/PAP-9486-doc-comments-right/screenshots/12-states-stale-focused.png b/design/PAP-9486-doc-comments-right/screenshots/12-states-stale-focused.png deleted file mode 100644 index 2c8552fe01b..00000000000 Binary files a/design/PAP-9486-doc-comments-right/screenshots/12-states-stale-focused.png and /dev/null differ diff --git a/design/PAP-9486-doc-comments-right/screenshots/13-states-orphaned-focused.png b/design/PAP-9486-doc-comments-right/screenshots/13-states-orphaned-focused.png deleted file mode 100644 index 5d298631b3a..00000000000 Binary files a/design/PAP-9486-doc-comments-right/screenshots/13-states-orphaned-focused.png and /dev/null differ diff --git a/scripts/screenshot-doc-annotations.mjs b/scripts/screenshot-doc-annotations.mjs deleted file mode 100644 index ba616d44a1e..00000000000 --- a/scripts/screenshot-doc-annotations.mjs +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/env node -// Capture screenshots of the Document Annotation storybook stories. -// Usage: node scripts/screenshot-doc-annotations.mjs - -import http from "node:http"; -import path from "node:path"; -import fs from "node:fs/promises"; -import { chromium } from "@playwright/test"; - -async function main() { - const [, , staticDir, outDir] = process.argv; - if (!staticDir || !outDir) { - console.error("usage: node scripts/screenshot-doc-annotations.mjs "); - process.exit(1); - } - await fs.mkdir(outDir, { recursive: true }); - const absStaticDir = path.resolve(staticDir); - - const server = http.createServer(async (req, res) => { - try { - let urlPath = decodeURIComponent((req.url || "/").split("?")[0]); - if (urlPath.endsWith("/")) urlPath += "iframe.html"; - const filePath = path.resolve(absStaticDir, `.${urlPath}`); - if (!filePath.startsWith(absStaticDir + path.sep) && filePath !== absStaticDir) { - res.writeHead(403); - res.end("Forbidden"); - return; - } - const buf = await fs.readFile(filePath); - const ext = path.extname(filePath).toLowerCase(); - const mime = { - ".html": "text/html; charset=utf-8", - ".js": "application/javascript", - ".css": "text/css", - ".json": "application/json", - ".svg": "image/svg+xml", - ".png": "image/png", - ".woff": "font/woff", - ".woff2": "font/woff2", - ".map": "application/json", - }[ext] || "application/octet-stream"; - res.writeHead(200, { "content-type": mime }); - res.end(buf); - } catch (err) { - res.writeHead(404); - res.end(String(err)); - } - }); - - await new Promise((resolve) => server.listen(0, "127.0.0.1", resolve)); - const port = server.address().port; - const baseUrl = `http://127.0.0.1:${port}/iframe.html`; - - const browser = await chromium.launch(); - try { - const stories = [ - // INTEGRATED — these are the captures the UX gate requires. They render - // IssueDocumentsSection chrome (count chip in header row, body + side panel - // wired together, edit mode wrapping the layer, real shadcn Sheet on mobile). - { id: "product-documents-annotations--integrated-desktop-open", file: "01-integrated-desktop-open.png", width: 1440, height: 900 }, - { id: "product-documents-annotations--integrated-desktop-zero-comments", file: "02-integrated-desktop-zero-count.png", width: 1440, height: 900 }, - { id: "product-documents-annotations--integrated-desktop-edit-mode", file: "03-integrated-desktop-edit-mode.png", width: 1440, height: 900 }, - { id: "product-documents-annotations--integrated-desktop-dirty-draft", file: "04-integrated-desktop-dirty-draft.png", width: 1440, height: 900 }, - { id: "product-documents-annotations--integrated-mobile-bottom-sheet", file: "05-integrated-mobile-sheet.png", width: 390, height: 844 }, - // ISOLATED — kept around for visual debugging of state pieces. - { id: "product-documents-annotations--desktop-open-focused", file: "10-states-open-focused.png", width: 1280, height: 900 }, - { id: "product-documents-annotations--desktop-resolved-focused", file: "11-states-resolved-focused.png", width: 1280, height: 900 }, - { id: "product-documents-annotations--desktop-stale-focused", file: "12-states-stale-focused.png", width: 1280, height: 900 }, - { id: "product-documents-annotations--desktop-orphaned-focused", file: "13-states-orphaned-focused.png", width: 1280, height: 900 }, - ]; - - const themeArg = (process.env.SCREENSHOT_THEME || "dark").toLowerCase(); - const theme = themeArg === "light" ? "light" : "dark"; - - for (const story of stories) { - const ctx = await browser.newContext({ - viewport: { width: story.width, height: story.height }, - deviceScaleFactor: 2, - colorScheme: theme, - }); - const page = await ctx.newPage(); - const url = `${baseUrl}?id=${story.id}&viewMode=story&globals=theme:${theme}`; - await page.goto(url, { waitUntil: "networkidle" }); - await page.evaluate((appliedTheme) => { - document.documentElement.classList.toggle("dark", appliedTheme === "dark"); - document.documentElement.style.colorScheme = appliedTheme; - }, theme); - // Allow async query prefill + the layer's interval-driven layout pass to settle. - await page.waitForTimeout(900); - const out = path.join(outDir, story.file); - await page.screenshot({ path: out, fullPage: false }); - console.log("wrote", out); - await ctx.close(); - } - } finally { - await browser.close(); - server.close(); - } -} - -main().catch((err) => { - console.error(err); - process.exit(1); -});