F6: diff-view toggle on any file (global storage, untitled in-memory) #19

Closed
opened 2026-06-11 14:42:21 +00:00 by benstull · 1 comment
Owner

Extend F6 (diff-view toggle, #17) to work on any file, not only files inside the opened workspace folder.

Motivation: the toggle currently warns "open a tracked workspace document" for untitled buffers and files outside the folder, because it reused F2 isTracked (which means "workspace file" so threads/attribution can use the .threads/ sidecar). F6 needs no sidecar — only a stable doc identity + a storage home.

Decisions (operator, session 0019):

  • Uniform global storage — baselines move to context.globalStorageUri, keyed by a hash of the document URI (one path for in-folder, out-of-folder, and untitled).
  • Untitled buffers supported in-memory only — no durable identity to persist against; baseline lives in memory, lost on reload, title reads "(unsaved)".
  • F6 gets its own diffable predicate (file: or untitled:), decoupled from F2 isTracked — F2–F5 untouched.

Acceptance: Ctrl+Alt+D / Toggle Diff View works on any saved file (inside or outside the folder) with a persisted baseline, and on untitled buffers in-memory; warning only when there is no active text editor. Unit + host E2E green, no LLM in CI. Spec coauthoring-diff-view.md amended.

Extend F6 (diff-view toggle, #17) to work on **any file**, not only files inside the opened workspace folder. **Motivation:** the toggle currently warns "open a tracked workspace document" for untitled buffers and files outside the folder, because it reused F2 `isTracked` (which means "workspace file" so threads/attribution can use the `.threads/` sidecar). F6 needs no sidecar — only a stable doc identity + a storage home. **Decisions (operator, session 0019):** - **Uniform global storage** — baselines move to `context.globalStorageUri`, keyed by a hash of the document URI (one path for in-folder, out-of-folder, and untitled). - **Untitled buffers supported in-memory only** — no durable identity to persist against; baseline lives in memory, lost on reload, title reads "(unsaved)". - F6 gets its **own diffable predicate** (`file:` or `untitled:`), decoupled from F2 `isTracked` — F2–F5 untouched. **Acceptance:** Ctrl+Alt+D / Toggle Diff View works on any saved file (inside or outside the folder) with a persisted baseline, and on untitled buffers in-memory; warning only when there is no active text editor. Unit + host E2E green, no LLM in CI. Spec `coauthoring-diff-view.md` amended.
Author
Owner

Shipped in PR #20 (session 0019): F6 now works on any file (in/out of folder) and untitled buffers; baseline in global storage keyed by URI hash (INV-19 holds); untitled in-memory. Spec amended to v0.2.0 (§11). 104 unit + 28+4 host E2E green, no LLM.

Shipped in PR #20 (session 0019): F6 now works on any file (in/out of folder) and untitled buffers; baseline in global storage keyed by URI hash (INV-19 holds); untitled in-memory. Spec amended to v0.2.0 (§11). 104 unit + 28+4 host E2E green, no LLM.
Sign in to join this conversation.