You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue adds two complementary surfaces in the preview, both deriving from the same data (REVIEW markers in the source), both pure rendering (no interaction beyond click-to-jump).
Proposal — two marker-aware features, one bundle
Bundled because they share the same source of truth (REVIEW markers in the doc), the same parsing infrastructure (regex from plan-review.ts:31), and the same eligibility gating.
1. Inline REVIEW marker rendering
Render <!-- REVIEW(@<author>): <text> --> as styled inline call-out boxes in the preview, not as hidden HTML comments.
Visual:
... existing rendered paragraph ...
┌─ 💬 @architect ───────────────────────────────────┐
│ tighten this paragraph │
└────────────────────────────────────────────────────┘
... next rendered paragraph ...
Implementation: a markdownItPlugin that transforms REVIEW markers at AST-conversion time. The plugin recognizes the marker syntax during tokenization and emits a custom <div class="codev-review-marker"> with author + body fields
Visual: subtle border, colored accent on the left edge (VS Code theme variable), small icon (💬 or $(comment)), author label, comment body
Click: clicking the call-out jumps to the marker's line in the source editor (uses the data-line attribute the plugin emits)
Future-compat: when reply / resolve state lands (per the Phase 3 design call), the call-out grows to show thread state (unresolved border color, reply count, etc.)
2. REVIEW marker minimap (right-edge column)
A vertical column at the right edge of the preview showing colored dots at the scroll-positions of each REVIEW marker.
Visual:
┃ ← preview content
┃
┃ • marker at L47
┃
┃ • marker at L52
┃
┃ • marker at L58
┃
┃
┃ • marker at L91
┃
┃
Implementation:previewScripts scans the rendered DOM for the inline call-out boxes from feature The Gestalt Problem - Features Developed in Isolation Without System Awareness #1; computes their vertical position in the preview viewport; renders a colored dot at the corresponding position in a position: fixed right-edge column
Click dot: smooth-scrolls preview to that marker
Hover dot: shows a tooltip with author + first ~80 chars of body
Same as #859, #860, #861, and the document-state surfaces filing: only .md files in codev/(plans|specs|reviews)/. Other markdown files render REVIEW markers (if any) as standard hidden HTML comments, unchanged.
Implementation sketch
Files
New: packages/vscode/src/markdown-preview/marker-render-plugin.ts — markdown-it plugin that recognizes REVIEW markers during tokenization and emits the call-out HTML
New: packages/vscode/src/markdown-preview/marker-render.css — previewStyles for both the inline call-outs and the minimap dots
Marker-rendering plugin details
The plugin operates at the inline-token level. When it sees an HTML comment token matching REVIEW_COMMENT_PATTERN, it replaces the token with a custom block-level html_block token whose content is the styled call-out markup. Source-line attribution preserved via data-line (so the minimap can find the position).
Minimap details
Computes positions via getBoundingClientRect() on each rendered call-out box
Updates positions on resize (debounced) and on preview rebuild
No virtualization needed — typical doc has <20 markers
Authors flow consistently through both: a marker added via #859's preview + shows up as an inline call-out in the preview AND as a Comments API thread in the editor on next refresh.
Acceptance criteria
Inline REVIEW marker rendering
<!-- REVIEW(@<author>): <text> --> markers in eligible files render as visible inline call-out boxes in the preview
Call-out shows author and body; subtle border with colored left edge
Click call-out → opens source file at the marker's line in editor
Uses VS Code theme variables (--vscode-editor-foreground, --vscode-textBlockQuote-border, etc.)
Markers in non-eligible files render as standard hidden HTML comments (no change to default behavior)
No regression to existing editor-side Comments API rendering — both surfaces show the same markers
REVIEW marker minimap
Right-edge fixed column shows one colored dot per REVIEW marker, positioned proportional to the marker's location in the preview viewport
Hover dot → tooltip with author + truncated body
Click dot → smooth-scrolls preview to the marker's call-out
Reply / thread display in the call-outs — single comment per call-out in v1; design call deferred (depends on the broader Phase 3 reply-storage decision)
Resolve state visualization (different border color for resolved markers) — depends on resolve-state storage decision (Phase 3.3 from prior planning); add when that lands
Editor-side counterpart: packages/vscode/src/comments/plan-review.ts + packages/vscode/src/review-decorations.ts — both unchanged by this issue
Why this is high leverage
Currently the preview is a partial view of the doc — it shows the rendered prose but hides the feedback layer entirely. The architect's "read the preview" workflow gives them no signal that there's anything to address. This issue completes the preview: the feedback layer becomes visible in context (inline call-outs at the exact paragraph being discussed) and spatially (minimap shows where feedback is concentrated). Combined with #859 (add comments from the preview), the preview becomes the complete review surface — read, see existing feedback, add new feedback, see where it is, click to navigate, all without switching to the source editor unless replying/deleting.
Problem
Today the markdown preview hides
<!-- REVIEW(@<author>): <text> -->markers entirely (HTML comments don't render). Two consequences:This issue adds two complementary surfaces in the preview, both deriving from the same data (REVIEW markers in the source), both pure rendering (no interaction beyond click-to-jump).
Proposal — two marker-aware features, one bundle
Bundled because they share the same source of truth (REVIEW markers in the doc), the same parsing infrastructure (regex from
plan-review.ts:31), and the same eligibility gating.1. Inline REVIEW marker rendering
Render
<!-- REVIEW(@<author>): <text> -->as styled inline call-out boxes in the preview, not as hidden HTML comments.Visual:
markdownItPluginthat transforms REVIEW markers at AST-conversion time. The plugin recognizes the marker syntax during tokenization and emits a custom<div class="codev-review-marker">with author + body fields$(comment)), author label, comment bodydata-lineattribute the plugin emits)unresolvedborder color, reply count, etc.)2. REVIEW marker minimap (right-edge column)
A vertical column at the right edge of the preview showing colored dots at the scroll-positions of each REVIEW marker.
Visual:
previewScriptsscans the rendered DOM for the inline call-out boxes from feature The Gestalt Problem - Features Developed in Isolation Without System Awareness #1; computes their vertical position in the preview viewport; renders a colored dot at the corresponding position in aposition: fixedright-edge columnPath eligibility
Same as #859, #860, #861, and the document-state surfaces filing: only
.mdfiles incodev/(plans|specs|reviews)/. Other markdown files render REVIEW markers (if any) as standard hidden HTML comments, unchanged.Implementation sketch
Files
packages/vscode/src/markdown-preview/marker-render-plugin.ts— markdown-it plugin that recognizes REVIEW markers during tokenization and emits the call-out HTMLpackages/vscode/src/markdown-preview/marker-minimap.js—previewScriptsentry; DOM scanning, dot rendering, click handlerspackages/vscode/src/markdown-preview/marker-render.css—previewStylesfor both the inline call-outs and the minimap dotsMarker-rendering plugin details
The plugin operates at the inline-token level. When it sees an HTML comment token matching
REVIEW_COMMENT_PATTERN, it replaces the token with a custom block-levelhtml_blocktoken whose content is the styled call-out markup. Source-line attribution preserved viadata-line(so the minimap can find the position).Minimap details
getBoundingClientRect()on each rendered call-out boxresize(debounced) and on preview rebuildpostMessage({type: 'jumpToLine', line: N})protocol from vscode: review summary webview — bird's-eye list of all REVIEW markers in spec/plan files with click-to-jump #860Composition with the editor side
The editor-side Comments API surface (
plan-review.ts) keeps rendering REVIEW markers as comment threads in the gutter. This issue is preview-only:+and comment threads (unchanged)Authors flow consistently through both: a marker added via #859's preview
+shows up as an inline call-out in the preview AND as a Comments API thread in the editor on next refresh.Acceptance criteria
Inline REVIEW marker rendering
<!-- REVIEW(@<author>): <text> -->markers in eligible files render as visible inline call-out boxes in the preview--vscode-editor-foreground,--vscode-textBlockQuote-border, etc.)REVIEW marker minimap
General
codev/(plans|specs|reviews)/*.mdpaths+add-comment) — newly added markers appear in both the inline call-out rendering AND the minimap on next preview refreshOut of scope (v1)
Dependencies
Related
packages/vscode/src/comments/plan-review.ts+packages/vscode/src/review-decorations.ts— both unchanged by this issueWhy this is high leverage
Currently the preview is a partial view of the doc — it shows the rendered prose but hides the feedback layer entirely. The architect's "read the preview" workflow gives them no signal that there's anything to address. This issue completes the preview: the feedback layer becomes visible in context (inline call-outs at the exact paragraph being discussed) and spatially (minimap shows where feedback is concentrated). Combined with #859 (add comments from the preview), the preview becomes the complete review surface — read, see existing feedback, add new feedback, see where it is, click to navigate, all without switching to the source editor unless replying/deleting.