Commit Graph

283 Commits

Author SHA1 Message Date
benstull 0525c40eed Merge pull request 'fix(edit-selection): accurate warnings + path-boundary workspace check' (#24) from fix-editselection-guard into main 2026-06-11 19:13:04 +00: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 28f844d0bd claim vscode-cowriting-plugin session 0022 (placeholder) + sessions.json entry 2026-06-11 12:09:21 -07:00
Ben Stull 5b5e46d142 add sessions/0021/SESSION-0021.0-TRANSCRIPT-2026-06-11T08-33--2026-06-11T11-52.md + replace placeholder/variant SESSION-0021.0-TRANSCRIPT-2026-06-11T08-33--INPROGRESS.md 2026-06-11 11:53:42 -07:00
benstull ce01ef81b5 Merge pull request 'F7: rendered track-changes markdown preview (#21)' (#23) from f7-rendered-preview into main 2026-06-11 15:50:33 +00:00
Ben Stull 36e153b7b5 docs(f7): manual smoke script + README section (#21)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 08:48:53 -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 1ab3cc5348 feat(f7): register showTrackChangesPreview command + keybinding, wire controller (#21)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 08:46:49 -07:00
Ben Stull 8bf4b17e4a feat(f7): TrackChangesPreviewController (sealed webview, test seam) (#21)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 08:46:17 -07:00
Ben Stull 81a8370c41 feat(f7): additive onDidChangeBaseline event on DiffViewController (#21)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 08:45:46 -07:00
Ben Stull a3f9688a91 feat(f7): sealed webview asset + esbuild preview bundle (#21)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 08:45:18 -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 f6b3efe7a5 feat(f7): add markdown-it + diff + mermaid deps (#21)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 08:41:38 -07:00
Ben Stull 3347a77fde docs(f7): implementation plan for rendered track-changes preview (#21)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 08:40:56 -07:00
Ben Stull e5374e0c66 claim vscode-cowriting-plugin session 0021 (placeholder) + sessions.json entry 2026-06-11 08:33:25 -07:00
Ben Stull 0b63a474fc add sessions/0020/SESSION-0020.0-TRANSCRIPT-2026-06-11T08-19--2026-06-11T08-29.md + replace placeholder/variant SESSION-0020.0-TRANSCRIPT-2026-06-11T08-19--INPROGRESS.md 2026-06-11 08:30:32 -07:00
Ben Stull 1c2da43c55 claim vscode-cowriting-plugin session 0020 (placeholder) + sessions.json entry 2026-06-11 08:19:42 -07:00
Ben Stull b38d364972 add sessions/0019/SESSION-0019.0-TRANSCRIPT-2026-06-11T07-41--2026-06-11T07-53.md + replace placeholder/variant SESSION-0019.0-TRANSCRIPT-2026-06-11T07-41--INPROGRESS.md 2026-06-11 07:55:14 -07:00
benstull 259f1672e6 Merge pull request 'F6: diff-view toggle on any file (global storage, untitled in-memory)' (#20) from f6-any-file into main 2026-06-11 14:53:19 +00:00
Ben Stull 5897fb7b26 docs(f6): any-file behavior + Ctrl+Alt+D wording (#19)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 07:52:31 -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 9e7ef4e052 claim vscode-cowriting-plugin session 0019 (placeholder) + sessions.json entry 2026-06-11 07:41:45 -07:00
Ben Stull 5b1ff9e136 add sessions/0018/SESSION-0018.0-TRANSCRIPT-2026-06-11T07-03--2026-06-11T07-24.md + replace placeholder/variant SESSION-0018.0-TRANSCRIPT-2026-06-11T07-03--INPROGRESS.md 2026-06-11 07:25:02 -07:00
benstull da32e0c80b Merge pull request 'F6: diff-view toggle (Feature #17)' (#18) from f6-diff-view-toggle into main 2026-06-11 14:21:45 +00:00
Ben Stull 2edb66fe4c docs(f6): manual smoke + README pointer (SLICE-4)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 07:20:16 -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 26474950df feat(f6): contribute toggleDiffView + pinDiffBaseline commands + ctrl+alt+d (SLICE-3)
F6 §5/§6.4. Palette-visible commands; ctrl+alt+d (when editorTextFocus),
unbound in stock VS Code, user-remappable.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 07:16:20 -07:00
Ben Stull 17976809bf feat(f6): wire DiffViewController into activation (SLICE-3)
F6 §6.2. BaselineStore from context.storageUri (in-memory fallback), advance
subscribed to the seam's onDidApplyAgentEdit, ensureBaseline on first sight in
renderIfOpen, diffViewController on the CowritingApi, commands stubbed in the
no-folder path (#8 precedent).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 07:15:53 -07:00
Ben Stull 64e993992d feat(f6): toggle UX — vscode.diff open/close via tab groups (SLICE-3)
F6 §6.5 PUC-1. Detects the baseline diff tab (original scheme cowriting-baseline,
modified == the doc) to close-and-reveal; else opens vscode.diff with an epoch
title. Live document on the right — editor state preserved by construction.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 07:15:04 -07:00
Ben Stull 4f2fc6fa96 feat(f6): DiffViewController — baseline lifecycle + content provider (SLICE-2)
F6 §6.2/§6.4, INV-18/INV-19. ensure/advance/pin capture buffer text, persist
via BaselineStore, refresh the open diff via onDidChange. Storage-unavailable
degrades to in-memory + one warning. toggle UX lands in SLICE-3.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 07:13:30 -07:00
Ben Stull 281eb09883 feat(f6): onDidApplyAgentEdit — the single machine-landing signal (SLICE-2)
F6 §6.2/§6.4, INV-9/INV-18. Additive EventEmitter on the seam owner, fired
after a real (non-no-op) applyEdit succeeds. Seam signature/return unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 07:12:31 -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 19075f243b claim vscode-cowriting-plugin session 0018 (placeholder) + sessions.json entry 2026-06-11 07:04:00 -07:00
Ben Stull ad89fa343c add sessions/0017/SESSION-0017.0-TRANSCRIPT-2026-06-10T23-52--2026-06-11T06-59.md + replace placeholder/variant SESSION-0017.0-TRANSCRIPT-2026-06-10T23-52--INPROGRESS.md 2026-06-11 07:00:48 -07:00
Ben Stull 68810207d4 claim vscode-cowriting-plugin session 0017 (placeholder) + sessions.json entry 2026-06-10 23:52:50 -07:00
Ben Stull 265227a402 add sessions/0016/SESSION-0016.0-TRANSCRIPT-2026-06-10T23-31--2026-06-10T23-44.md + replace placeholder/variant SESSION-0016.0-TRANSCRIPT-2026-06-10T23-31--INPROGRESS.md 2026-06-10 23:46:09 -07:00
Ben Stull f109f362ef claim vscode-cowriting-plugin session 0016 (placeholder) + sessions.json entry 2026-06-10 23:31:47 -07:00
Ben Stull 26c1c90b3c add sessions/0015/SESSION-0015.0-TRANSCRIPT-2026-06-10T22-37--2026-06-10T23-29.md + replace placeholder/variant SESSION-0015.0-TRANSCRIPT-2026-06-10T22-37--INPROGRESS.md 2026-06-10 23:30:27 -07:00
benstull 611a18016a Merge pull request 'fix: proposal threads disable the dead reply input (decide-only, INV-12)' (#16) from fix/proposal-canreply into main 2026-06-11 06:26:33 +00: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
benstull 4651410136 Merge pull request 'F5: cross-rung format contract + round-trip (#14)' (#15) from feature/14-cross-rung-format into main 2026-06-11 06:07:39 +00:00
Ben Stull abb9c882a4 docs: cross-rung contract pointers in README (F5 SLICE-5, #14)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 23:06:36 -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