Preview-initiated comments (D15): select in rendered preview → native thread on source #69

Open
opened 2026-07-02 12:32:33 +00:00 by benstull · 0 comments
Owner

What

Deliver D15 — preview-initiated comments: select text in the rendered Markdown preview → a native comment thread is created on the mapped source range (via the markdown-it token source map); the preview shows a 💬 marker that deep-links to the thread. Per the graduated Solution Design coauthoring-native-surfaces.md v0.2.1 (D15, §6.4 ThreadController, PUC-4).

Why deferred

Explicitly deferred from the native-surfaces migration plan (plans/2026-07-01-native-surfaces-migration.md, "Deferred" section, operator-approved 2026-07-02): the rung-2 spike validated only the editor-selection and whole-document halves of E4; the preview-selection→source-map half was not spiked (spec §7.1 v0.2.1 note), and the built-in preview's script sandbox (previewScripts cannot reach the extension host directly) makes feasibility a real question.

Resume context

  • Spec: content repo specs/coauthoring-native-surfaces.md v0.2.1 (graduated) — D15, §6.4.
  • First step is a feasibility check (spike-grade, in vscode-cowriting-prototype, which is retained for exactly this kind of iteration): can a contributed markdown.previewScripts script observe a selection and signal the extension (e.g. via a command URI / postMessage path available to preview scripts)? If no path exists, the finding folds back into the spec as a D15 amendment before any build.
  • Depends on the native-surfaces migration plan's Task 7 (preview annotations) being landed — the source-map plumbing lives there.
## What Deliver **D15 — preview-initiated comments**: select text in the rendered Markdown preview → a **native** comment thread is created on the mapped source range (via the markdown-it token source map); the preview shows a 💬 marker that deep-links to the thread. Per the graduated Solution Design `coauthoring-native-surfaces.md` v0.2.1 (D15, §6.4 ThreadController, PUC-4). ## Why deferred Explicitly deferred from the native-surfaces migration plan (`plans/2026-07-01-native-surfaces-migration.md`, "Deferred" section, operator-approved 2026-07-02): the rung-2 spike validated only the editor-selection and whole-document halves of E4; the preview-selection→source-map half was **not** spiked (spec §7.1 v0.2.1 note), and the built-in preview's script sandbox (previewScripts cannot reach the extension host directly) makes feasibility a real question. ## Resume context - Spec: content repo `specs/coauthoring-native-surfaces.md` v0.2.1 (graduated) — D15, §6.4. - First step is a **feasibility check** (spike-grade, in `vscode-cowriting-prototype`, which is retained for exactly this kind of iteration): can a contributed `markdown.previewScripts` script observe a selection and signal the extension (e.g. via a command URI / postMessage path available to preview scripts)? If no path exists, the finding folds back into the spec as a D15 amendment before any build. - Depends on the native-surfaces migration plan's Task 7 (preview annotations) being landed — the source-map plumbing lives there.
benstull added the type/featurepriority/P2 labels 2026-07-02 12:32:33 +00:00
Sign in to join this conversation.