F6: diff-view toggle on any file (global storage, untitled in-memory) #20
Reference in New Issue
Block a user
Delete Branch "f6-any-file"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Broadens F6 diff-view toggle to work on any file — not only files inside the opened workspace folder. Closes #19; builds on #17 (F6).
Why
Manual testing of #17 surfaced friction:
Ctrl+Alt+Dwarned "open a tracked workspace document" for untitled buffers and files outside the folder. F6 reused F2isTracked(= "workspace file", needed so threads/attribution can use the.threads/sidecar) — but F6 needs no sidecar, only a stable doc identity + a storage home.What (operator decisions, session 0019)
file:oruntitled:, decoupled from F2isTracked.DiffViewControlleris now constructed before the no-folder activation branch, so the toggle/pin commands are always live (never stubbed) — F6 even works with no folder open.context.globalStorageUrikeyed bysha256(documentUri)(one path for in-folder, out-of-folder, untitled). Still never the repo (INV-19).Baseline.docPath→uri.(unsaved)in the title). Saving promotes to a persistedfile:baseline.F2–F5 are untouched. The machine-landing
advancewiring stays in the with-root branch (the seam only fires on workspace files).Verification
npm run typecheckclean ·npx vitest run104 pass (BaselineStore re-keyed).npm run test:e2e28 + 4 pass (exit 0): adds an out-of-workspace file case (persisted in global storage), an untitled buffer case (in-memory, not persisted), and a no-folder activation case proving the toggle works folder-less. No LLM in CI.Docs
coauthoring-diff-view.md§11 + §1.7/§6.3/§6.5/§6.7/INV-19/change log) — pushed to the content repo.docs/MANUAL-SMOKE-F6.mdupdated (incl. fixing theCtrl+Alt+Dwording — it'sCtrl, notCmd, on macOS too).Session 0019.
🤖 Generated with Claude Code