F9: authorship view in the rendered preview #27
Reference in New Issue
Block a user
Delete Branch "f9-authorship-preview"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds an Authorship mode to the F7 rendered preview, surfaced as friction during F8 testing ("the preview doesn't show the Claude-composed annotations"). Design:
docs/superpowers/specs/2026-06-11-authorship-preview-design.md. Session 0026.What changes
The preview header gains a
[ Track changes | Authorship ]toggle (per-panel, default Track changes — unchanged). Authorship mode re-renders the current document with each span colored by its F3 author — Claude (blue) vs you (green), inline and char-precise — with a header legend. Because it reads F3 attribution directly (not the F6 baseline), Claude's contributions stay visible even after the baseline absorbs a landing (INV-18). Code/mermaid fences get a block-level author badge (atomic, INV-27).How
trackChangesModel.ts:splitBlocksWithRanges(block source offsets) + purerenderAuthorship(currentText, spans)— PUA sentinel injection through markdown-it, post-processed to<span class="cw-by-claude|cw-by-human">; fences atomic.AttributionController.spansFor(document)— maps live F3 spans to authorship spans (resolves the URI-vs-keyOf key mismatch).trackChangesPreview.ts: per-panel mode +setModemessage + render branch;extension.tsreorders the F7 controller after attribution.media/: segmented toggle, legend,.cw-by-*CSS.model.ts/store.ts/mergeArtifacts.ts/diffViewController.ts/baselineStore.tsuntouched; track-changes mode behavior unchanged.Invariants
INV-26 (authorship is baseline-independent), INV-27 (fences atomic), INV-28 (pure
renderAuthorship).Tests
splitBlocksWithRanges,renderAuthorshipincl. adjacency / atomic-fence / sentinel-leak / determinism).Docs:
docs/MANUAL-SMOKE-F9.md, README F9 section. Plan:docs/superpowers/plans/2026-06-11-f9-authorship-preview.md.🤖 Generated with Claude Code