Repository navigation
Filter unrelated workspace events before Explorer defers them - #26265
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to Explorer now ignores filesystem events from other workspaces before queuing them, which cuts unnecessary retention and refresh work. Current-workspace events still replay after interactions. No merge-blocking risk was found. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description is detailed and covers the change, rationale, testing, visual proof, review notes, and checklist. However, the required Linked Issue section does not contain an actual issue reference and explicitly states that no issue is linked.
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ELI5
While a file rename or drag is open, File Explorer can retain filesystem events from other workspaces. Hiding and reopening Files then refreshes the current tree unnecessarily. Those unrelated events are now filtered before they enter the deferred queue.
What Changed
The watch listener applies the same normalized workspace-root comparison already used by reconciliation, before deferring events for inline input or dragging. Current-workspace events still queue and replay in order. Disposed subscriptions keep their existing late-event resync handling.
Why
Reconciliation already ignores foreign workspace events, but its filter ran after deferred storage. Moving that existing admission check earlier removes both the retained payloads and the false resync trigger, without adding a queue cap, dropping current-workspace changes or changing transport batching.
A native macOS Parcel watcher emitted nine real batches containing 5,000 updates across 1,000 existing generated JavaScript paths in another owned workspace. With a rename open, all nine payloads remained reachable before; none remained reachable after forced GC with the fix. On reopening an ordinary tree with 20 expanded folders, directory reads fell from 21 to zero, with identical contents. This measures event retention and unnecessary work, not a cause for the intermittent Codex typing pause.
Linked Issue
Performance audit; no existing issue linked.
Visual Proof
Before:
After:
Hidden Electron/CDP check of the actual FileExplorer, tree, watch hook and private store: focus a real row, press Enter to rename, receive one explicitly generated foreign event, hide and reopen Files. Controlled directory IPC calls fall from 21 to zero. The rename input, expanded folders and rendered tree remain identical; the screenshots are byte-identical. This rendered received-event check is separate from the native producer proof above. The fixture used a fresh desktop build and isolated profile; its owned app, daemon and profile were removed.
Testing
Native measurement was on macOS. Windows/Linux normalization is covered by the paired controls, not a local native run. SSH broadcasts and runtime RPC events enter the same listener; its existing root comparison and host ownership are unchanged. The fixture includes ordinary workspace paths and does not require Git.
Review
Independent reviews of the final production and regression diff found no blocker. No UI styling, wire fields, polling or watcher batching changes. Filtering uses exact root identity with existing normalization, so sibling paths are not accepted as the current workspace.
Agent skill upstream boundary
Checklist