Commit Graph

61 Commits

Author SHA1 Message Date
Ben Stull bda394ea4e F10 SLICE-3: remove superseded public renderAuthorship (salvaged into colorByAuthor) (#29)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 00:16:57 -07:00
Ben Stull bcacbf062d F10 SLICE-2: fix renderReview author-coloring for duplicate blocks; tidy renderReviewOp + escape proposal id (#29)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 00:13:54 -07:00
Ben Stull d59f22b22f F10 SLICE-2: add ProposalView + renderReview combined on-state render (#29)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 00:09:45 -07:00
Ben Stull 0311ad89ba F10 SLICE-2: add renderPlain off-state (#29)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 00:08:31 -07:00
Ben Stull ebe3d4bab5 F10 SLICE-2: extract colorByAuthor from renderAuthorship sentinels (#29)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 00:08:10 -07:00
Ben Stull 3b45e784c1 test(f7.1): host E2E — changed flowchart augments emitted source (#22)
Adds a renderHtmlFor test seam to TrackChangesPreviewController.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 16:34:42 -07:00
Ben Stull 6702490497 feat(f7.1): render augmented mermaid diff in changed-block branch (#22)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 16:33:12 -07:00
Ben Stull e938572ebc feat(f7.1): sequence participant/message diff + rect emission (#22)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 16:32:08 -07:00
Ben Stull 96931f245d feat(f7.1): sequence-diagram parser (#22)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 16:31:44 -07:00
Ben Stull 1454c7792a feat(f7.1): flowchart node/edge diff + styling emission (#22)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 16:31:09 -07:00
Ben Stull 78352c2922 feat(f7.1): flowchart parser (#22)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 16:30:32 -07:00
Ben Stull d8ce4f12e1 feat(f7.1): mermaid diff dispatcher + type detection (#22)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 16:29:36 -07:00
Ben Stull 4212d90055 test(f9): host E2E — authorship mode marks Claude's landed span
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 14:39:54 -07:00
Ben Stull 95eaf78891 feat(f9): renderAuthorship — inline author spans + atomic fence badges (INV-26/27/28)
PUA sentinel injection through markdown-it; adjacent-span ordering handled;
code/mermaid fences atomic with a block-level author badge.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 14:36:19 -07:00
Ben Stull 82d7c52983 feat(f9): splitBlocksWithRanges — block offsets aligned to the source
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 14:34:40 -07:00
Ben Stull 5030cad612 test(f8): host E2E — out-of-folder file + untitled + in-workspace regression; folder-less suite
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 13:14:45 -07:00
Ben Stull dca12f4f50 feat(f8): SidecarRouter — keyOf + per-document routing (spec §6.2)
Routes by #24's isUnderRoot: in-workspace file: → CoauthorStore (repo-relative key,
.threads/), out-of-folder file: + untitled: → GlobalSidecarStore (URI-string key).
keyOf is the single document identity. vscode-free; CoauthorStore conforms
structurally (unmodified, INV-2).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 13:08:01 -07:00
Ben Stull bc77cee0bd feat(f8): isAuthorable + widened selectionRejection (file|untitled)
Spec §6.4: replace the scheme!=file / !isUnderRoot rejections with a single
!isAuthorable branch. isUnderRoot retained as a routing input. Per-condition
messaging (#24) kept for no-editor / empty-selection / non-{file,untitled}.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 13:06:58 -07:00
Ben Stull 515acb4868 feat(f8): SidecarStore interface + GlobalSidecarStore (sha256 key, untitled in-memory)
Spec §6.2/§6.4: out-of-workspace file: → <globalStorage>/sidecars/<sha256(uri)>.json
(INV-19/24); untitled: → in-memory only (F6 degrade). update() carries the INV-16
newer-major throw + anchor prune; consumeSelfWrite is a no-op (outside the .threads
watcher). Mirrors src/baselineStore.ts; vscode-free, unit-tested.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 13:06:08 -07:00
Ben Stull 0bdee1c286 fix(edit-selection): accurate per-condition warnings + path-boundary workspace check
cowriting.editSelection collapsed four distinct failures (no editor / no
selection / unsaved / outside the workspace folder) into one misleading
"select some text in a workspace document first" warning — so editing a
selection in a file OUTSIDE the EDH workspace root (e.g. a content-repo file
while the EDH opens sandbox/) was rejected as if no text were selected.

- New pure, vscode-free src/workspacePath.ts: isUnderRoot() (separator-bounded
  membership, fixing a latent startsWith() prefix collision where a sibling
  whose name prefixes the root — e.g. vscode-cowriting-plugin-content vs
  vscode-cowriting-plugin — falsely matched) + selectionRejection() (one
  message per condition). Unit-tested (8 cases), incl. the reported bug.
- Wire isUnderRoot into all five membership checks: extension.ts (editSelection
  guard + renderIfOpen) and the thread/attribution/proposal controllers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 12:12:18 -07:00
Ben Stull 216a7f1ffe test(f7): host E2E for the track-changes preview (#21)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 08:48:13 -07:00
Ben Stull 6c3b137ebb feat(f7): per-block error-chip fallback (PUC-6, #21)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 08:44:13 -07:00
Ben Stull 3b0ec4f53e feat(f7): render annotated track-changes HTML (#21)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 08:43:38 -07:00
Ben Stull 6ffbf67871 feat(f7): block-level diff with atomic fences (#21)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 08:42:51 -07:00
Ben Stull 247a450e10 feat(f7): block splitter for the render engine (#21)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 08:42:11 -07:00
Ben Stull 15d1df0f4c test(f6): E2E for any-file + untitled diff-view (#19)
Migrate test surface to URI-string keys; add out-of-workspace file (persisted
in global storage) + untitled-buffer (in-memory, not persisted) cases; assert
F6 toggle works with no folder open. No LLM.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 07:49:05 -07:00
Ben Stull e617f504e7 feat(f6): diff-view toggle on any file — global storage, untitled in-memory (#19)
F6 no longer requires a workspace file. It gets its own diffable predicate
(any file: or untitled:) decoupled from F2 isTracked, keys baselines by a
sha256 of the document URI, and stores them in VS Code GLOBAL storage
(context.globalStorageUri) — always present, never the repo (INV-19). Untitled
buffers have no durable identity → in-memory baseline only (lost on reload).

DiffViewController is now constructed before the workspace-root check and its
commands are always live (never stubbed) — the machine-landing advance wiring
stays in the with-root branch since the seam only fires on workspace files.
BaselineStore generalized to key-by-hash (Baseline.docPath → uri).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 07:47:05 -07:00
Ben Stull e052ffc1a9 test(f6): assert toggleDiffView + pinDiffBaseline are no-folder stubs (#8, SLICE-4)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 07:18:53 -07:00
Ben Stull aed665a978 test(f6): host E2E — toggle, advance-on-accept, pin, persist, untracked (SLICE-4)
F6 §6.8. Drives the programmatic seam ingress (propose + accept, no LLM):
opened baseline → toggle opens cowriting-baseline diff → type (baseline steady)
→ accept advances past the landing (INV-18) → operator delta → pin → on-disk
baseline outside .threads (INV-19) → toggle closes (normal editor active) →
untracked warns.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 07:18:23 -07:00
Ben Stull 6f0b903596 feat(f6): BaselineStore — vscode-free per-doc baseline persistence (SLICE-1)
F6 §6.2/§6.3, INV-19. One JSON per docPath under VS Code workspace storage,
never the repo. Mirrors CoauthorStore; unit-tested round-trip/paths/overwrite.

Also lands the F6 implementation plan
(docs/superpowers/plans/2026-06-11-f6-diff-view-toggle.md).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 07:11:42 -07:00
Ben Stull 4c947acc43 fix: proposal threads disable the reply input — decide-only, INV-12
Playing with F4, the operator hit VS Code's default "Reply…" box on a
proposal thread: no submit command is wired for cowriting.proposals, so
typed text had nowhere to go. Proposals are decide-only (accept/reject in
the title bar); discussion belongs in a coauthoring thread. Set
canReply=false so the dead input never renders, and expose canReply on the
test-facing RenderedProposal with an E2E assertion.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 23:26:11 -07:00
Ben Stull 5de59fde11 test: host E2E — crossrung round-trip + newer-major fail-safe (F5 SLICE-4, PUC-2/PUC-4, #14)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 23:05:38 -07:00
Ben Stull e0c127c4d9 feat: crossrung-reply stand-in writer — validate, append, stable-serialize (F5 SLICE-4, #14)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 23:04:17 -07:00
Ben Stull 452f5d193f feat: mergeArtifacts — deterministic union-by-id with surfaced conflicts (F5 SLICE-3, INV-17, #14)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 23:03:15 -07:00
Ben Stull ef4ec8dbe9 feat: currentAuthor() carries git user.email — fail-open identity (F5 SLICE-2, #14)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 23:00:03 -07:00
Ben Stull 746071a585 feat: isNewerMajor + store write-refusal backstop (F5 SLICE-2, INV-16, #14)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 22:59:04 -07:00
Ben Stull a6b16f0d9c feat: serializer preserves unknown fields at every level (F5 SLICE-2, INV-15, #14)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 22:57:58 -07:00
Ben Stull da172a3117 feat: Provenance gains email + agent.onBehalfOf — cross-rung identity (F5 SLICE-2, #14)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 22:56:45 -07:00
Ben Stull 7c4d3ed79f feat: publish coauthoring-sidecar JSON Schema + rung-neutral validator (F5 SLICE-1, PUC-5, #14)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 22:54:39 -07:00
Ben Stull 8fdea97d36 F4 SLICE-5: host E2E (propose/accept/reject/persist/stale/coexist) + seam fix: event-level net-effect matching survives host word-diff splitting (INV-9) (#12)
The accept E2E exposed a latent F3 limitation: VS Code word-diffs one
applied WorkspaceEdit into several minimal hunks when old/new share
interior tokens, so the registry's per-hunk exact match missed and seam
edits fell through as fragmented human spans. PendingEditRegistry.match
is replaced by matchEvent (all hunks inside the registered full range +
equal net delta — one applyEdit is one change event). Plan AMENDMENT 1.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 22:12:15 -07:00
Ben Stull f474684946 F4 SLICE-1: proposalModel helpers — add/remove + fenced-diff body (#12)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 22:03:20 -07:00
Ben Stull d5beb619aa F4 SLICE-1: anchor prune counts proposal anchorIds (closes store.ts F4 TODO) (#12)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 22:02:48 -07:00
Ben Stull 652f8619d2 F4 SLICE-1: typed proposals[] on shared anchors/Provenance (spec §6.3, INV-13) (#12)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 22:02:08 -07:00
Ben Stull c0bae8c774 Fix #8: register warning stubs when no workspace folder; F5 opens the repo. Add selection context menus (#9)
- extension.ts: with no folder open, every contributed coauthoring command now
  registers a warning stub ('open a folder first') instead of being absent —
  the palette no longer errors 'command not found'. Opening a folder reloads
  the window and re-activates with a real root.
- .vscode/launch.json: the EDH now opens the repo as its workspace, so plain
  F5 lands in a working state.
- package.json: editor/context menu entries for 'Ask Claude to Edit
  Selection' and 'Add Coauthoring Thread on Selection', shown only when text
  is highlighted in a file-scheme editor (editorHasSelection).
- E2E: second no-workspace pass (suite-no-workspace) pins the #8 regression.

Fixes #8. Fixes #9.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 14:26:59 -07:00
Ben Stull d85194224f F3 polish: active-editor status bar + E2E for command wrapper and toggle (PUC-5) (#6)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 11:09:04 -07:00
Ben Stull 41b1cb4f3b F3 hardening: observable seam misses, cheaper disk-compare, E2E ordering notes (#6)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 11:00:28 -07:00
Ben Stull fc5fde1cc9 F3 SLICE-6: host E2E — type/seam/persist/re-anchor/orphan, no LLM in CI (#6)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 10:50:58 -07:00
Ben Stull 2604ab4925 F3 SLICE-3 host fixes: disk-compare sync detection + self-minimized seam edits (INV-9) (#6)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 10:50:07 -07:00
Ben Stull fe23ffa100 F3 SLICE-5 review fixes: fence-aware replacement extraction + editSelection guards (#6)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 10:35:16 -07:00
Ben Stull c08dc075af F3 SLICE-5: live claude-code turn via applyAgentEdit seam + manual smoke (INV-8) (#6)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 10:25:56 -07:00