F7 gains an Authorship mode (segmented header toggle) that renders the current doc
with each span colored by its F3 author (Claude blue / human green), inline and
char-precise via PUA sentinel injection; code/mermaid fences get a block-level
author badge. Baseline-independent (INV-26), reads AttributionController.spansFor.
INV-26..28. Surfaced as friction during F8 testing.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Spec §6.4: construct GlobalSidecarStore + SidecarRouter (CoauthorStore when root);
remove the no-root early-return + command stubs so F2/F3/F4 are real folder-less;
renderIfOpen gated by isAuthorable; editor-context menus widened to untitled;
export sidecarRouter on CowritingApi. activate now always returns the API.
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 §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>
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>