Repository navigation
Trim unused rules from the editor's same-file check (keep WSL folding for discard holds) - #31669
Conversation
…g from buffer identity SSH files are keyed by connection target; the guarded save catches a retarget. \\wsl$ and \\wsl.localhost stay distinct, including for discard holds and the per-file write lock: main compares WSL writes at write time. Co-Authored-By: Claude <noreply@anthropic.com>
A discard via \\wsl$ must hold autosave of a tab opened via \\wsl.localhost: the local guarded write is not atomic against git. Buffer identity stays unfolded; only the hold/lock key folds, on the local Windows client. Co-Authored-By: Claude <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
ELI5
Removes rules from the editor's "is this the same file?" module that the plan no longer needs, so there's less code to keep correct. Nothing changes for users.
What Changed
editor-buffer-identity.tsno longer takes host facts, a captured SSH endpoint or a remote path flavor. SSH files are keyed by their connection target; if a connection is pointed at a different machine, the existing check that refuses to save over a file that changed on disk catches it.\\wsl$and\\wsl.localhostpaths apart (it no longer folds them).Why
The plan for sharing one buffer per file was simplified to rely on the guarded save rather than per-tab endpoint fingerprints and path-flavor rules. Nothing uses buffer identity for sharing yet, so trimming it now is behaviour-neutral and keeps the next step smaller. The WSL folding stays where it protects a discard: the guarded write isn't atomic against git, so the hold must cover both forms.
Linked Issue
Follow-up to #31272.
Visual Proof
N/A: no visible change.
Testing
Identity tests keep the protections against merging distinct files (exact case, POSIX backslash vs slash, UNC share case, UNC server folding,
//only on a Windows client) and check SSH keys by target.New regression: a discard through
\\wsl$\Ubuntu\repoholds a\\wsl.localhost\ubuntu\repo\a.tstab, while a case-different file and a real\\wsl\...share are not held.223 tests across identity, holds, autosave, save queue, write lock and combined diff pass;
pnpm tc,check:code-quality:changed,oxfmt --checkpass.I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platoform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
No wire or persisted-state change.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)