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>
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>
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>
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>
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>
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>
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>
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>
- 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>
Drives the extension's returned ThreadController API + asserts the on-disk
sidecar and rendered Comments state (spec §6.8 fallback). All 4 host tests
green against VS Code 1.124.0.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
fetchSdkSummary() dynamic-imports the ESM-only SDK and returns its build
version + builtin tool catalog (pure, key-free). Kept vscode-free so it is
unit-testable in Node; test asserts a semver version and the read_files tool.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>