Repository navigation
Restore remote explorer updates after server recovery - #26612
Conversation
0c3a32b to
1ce04b2
Compare
c365e95 to
bdc7f68
Compare
bdc7f68 to
f092245
Compare
1ce04b2 to
31a0101
Compare
|
Review fix (restacked on current main): the app watcher decided whether the sidebar needed a watch from the stored sidebar tab. When that tab is hidden for the workspace (for example Source Control on a folder repo or a remote folder workspace), the Explorer is shown as a fallback but nothing was watched, so remote creates and deletes never reached it. The sidebar now publishes the tab it actually shows ( |
f092245 to
9b2a67c
Compare
75c93a0 to
c11d9ce
Compare
9b2a67c to
f895e39
Compare
bb075c3 to
21737a8
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (14)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe sidebar now records its effective tab, and editor watch-target selection uses that tab when available. The explorer watch hook handles runtime file-change events through a window event and retains the local filesystem listener. A new E2E spec checks explorer file visibility during and after a managed-server outage. CI routes changes to explorer watch files to that spec and runs it in the Docker conversion job. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The recovered watcher can update the remote Explorer after a server outage. No actionable merge-blocking risk remains after normal checks. 🚥 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, compatibility notes, and checklist. However, the required Linked Issue section states that no existing issue exists and does not provide an actual issue reference. Full details: Docstring CoverageExplanation Docstring coverage is 8.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 13 files. (1 skipped: 1 unsupported.)
✨ 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
After a Remote server restarts, the file explorer catches up and keeps showing new files without needing to reopen it.
What Changed
The explorer used its own remote file-change subscription. When that stream closed, the app watcher could recover while the explorer kept its abandoned listener. Files could be read from the host and their events reached the app, yet they never appeared in the tree.
Managed explorers now consume the existing app watcher, which #26606 restores after contact returns. Host and workspace-root checks keep events scoped to the displayed tree. Existing refresh scheduling, deferred interaction updates and local/direct SSH listeners remain in use.
Why
The app already owns the watcher for a visible explorer, including a folder workspace with no editor open. Sharing that recovered event source removes a redundant subscriber and avoids maintaining another retry loop. A recovery overflow refreshes files created while the server was unavailable; subsequent events refresh their directories normally.
Linked Issue
Found during SSH → Remote consolidation testing; no existing issue.
Visual Proof
Identical worktree and non-Git folder journeys: the before screenshots omit DURING_OUTAGE.txt and WATCH_RECOVERED.txt even after positive host reads and a real recovered app event. The after screenshots show both files.
explorer-watch-recovery-runtime-red-final.log
explorer-watch-recovery-runtime-green-final.log
Testing
Each real case first proves a live watcher and rendered tree, terminates only the disposable host's server, creates a file during the outage, verifies a replacement server PID and positive host reads, then creates another file and waits for its actual host event. The unchanged parent explorer fails both cases (25.9 s / 25.8 s); the corrected build passes both (15.8 s / 15.9 s, 33.2 s total).
All four new broker regressions fail on the parent. Final affected suite: 125 tests / 13 files pass, covering host/root isolation, overflow resync, owner changes, cleanup, pending refreshes, watch sharing and Docker lane selection. Full
pnpm tc,pnpm lint, changed-code quality, standalone React Doctor, fresh E2E build and commit hooks pass.Review
Stacked on #26606: merge that PR first. Its CI is fully green. The product change is confined to the explorer's remote event source and a typed DOM event declaration, already used identically by #26599.
Agent skill upstream boundary
Notes
No server, RPC or remote wire changes. Outage evidence does not imply process death. Fault injection is restricted to owned Docker hosts. Windows was not runtime-tested. Other conversion findings are separate PRs and may still appear in these baseline logs.
Checklist