Repository navigation
Keep managed workspace paths out of desktop editor launches - #26668
Conversation
88db24b to
486786c
Compare
|
Rebased onto main (Phase 3.5 has merged) and retargeted the base to main. Changes on top: resolved conflicts with the browser/editor-ownership specs now in the same managed Docker lane; dropped the duplicate Docker reachability test file because main already has the same check in pr-e2e-docker-lane-contract.test.mjs; moved the sidebar row's owner lookup into a small WorktreeRowOpenInSubMenu so it runs only while the menu is open instead of on every store update for every row; isRevealInFileManagerBlocked now reuses the extended guard. The new guard unit tests fail on main and pass here; tc, affected tests, oxlint, the changed-code gate and anti-slop pass. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📥 CommitsReviewing files that changed from the base of the PR and between bc0c6f26c7a76671e982e1b794c96b031968af56 and 9a3416a. 📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughOpen-in checks now receive the target runtime environment ID and block file-manager or external-editor actions for managed owners. Worktree menus and the file explorer pass this ID through the relevant checks. A Docker-backed E2E spec exercises four UI surfaces. CI selection and routing include the spec in the dedicated Docker job. Priority: ➖ Normal Merge Risk: 🔵 Low · up to The change is mergeable with owner awareness, but future changes to two Open in entry points may miss the dedicated regression test. Add those paths to the route and its test. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)✅ Passed checks (3 passed)Full details: Description checkExplanation The description explains the change, motivation, testing, visual behavior, risks, and checklist status. However, the required Linked Issue section states that no existing issue is linked, which does not meet the repository template requirement. Full details: Docstring CoverageExplanation Docstring coverage is 23.53% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 17 functions across 19 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
config/scripts/pr-e2e-source-routing.mjs (1)
93-93: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winRoute both managed-owner implementations to the owner E2E spec.
The source route uses exact path matching. A PR that changes only
WorktreeRowOpenInSubMenu.tsxorreveal-in-file-manager.tscan therefore omittests/e2e/ssh-orcad-open-in-owner.spec.ts. This is a test-coverage gap, not a desktop launch regression. Add both paths to the route and its routing assertion.Suggested routing update
- /^src\/renderer\/src\/(?:lib\/(?:local-path-open-guard|external-editor-open-capability|worktree-runtime-owner)\.ts|components\/(?:sidebar\/(?:WorktreeOpenInMenu|WorktreeContextMenuView)\.tsx|right-sidebar\/(?:FileExplorer(?:Toolbar)?\.tsx|source-control\/listing\/entry-context-menu\.tsx)))$/.test( + /^src\/renderer\/src\/(?:lib\/(?:local-path-open-guard|external-editor-open-capability|worktree-runtime-owner|reveal-in-file-manager)\.ts|components\/(?:sidebar\/(?:WorktreeOpenInMenu|WorktreeContextMenuView|WorktreeRowOpenInSubMenu)\.tsx|right-sidebar\/(?:FileExplorer(?:Toolbar)?\.tsx|source-control\/listing\/entry-context-menu\.tsx)))$/.test(Add the same two paths to the source list in
config/scripts/orcad-e2e-routing.test.mjs.
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
d9638993-17f8-4c71-add2-0b3612baa53d
📥 Commits
Reviewing files that changed from the base of the PR and between 4e232f9 and 486786c4e03518751ca7073b15fd20d17ba95de7.
📒 Files selected for processing (20)
.github/workflows/e2e.ymlconfig/scripts/ci-e2e-job-selection.mjsconfig/scripts/orcad-e2e-routing.test.mjsconfig/scripts/pr-e2e-source-routing.mjssrc/renderer/src/components/right-sidebar/FileExplorer.tsxsrc/renderer/src/components/right-sidebar/FileExplorerToolbar.test.tsxsrc/renderer/src/components/right-sidebar/FileExplorerToolbar.tsxsrc/renderer/src/components/right-sidebar/source-control-entry-context-menu.test.tsxsrc/renderer/src/components/right-sidebar/source-control/listing/entry-context-menu.tsxsrc/renderer/src/components/sidebar/WorktreeContextMenu.copy-worktree-name.test.tsxsrc/renderer/src/components/sidebar/WorktreeContextMenuView.tsxsrc/renderer/src/components/sidebar/WorktreeOpenInMenu.test.tsxsrc/renderer/src/components/sidebar/WorktreeOpenInMenu.tsxsrc/renderer/src/components/sidebar/WorktreeRowOpenInSubMenu.tsxsrc/renderer/src/lib/external-editor-open-capability.test.tssrc/renderer/src/lib/external-editor-open-capability.tssrc/renderer/src/lib/local-path-open-guard.test.tssrc/renderer/src/lib/local-path-open-guard.tssrc/renderer/src/lib/reveal-in-file-manager.tstests/e2e/ssh-orcad-open-in-owner.spec.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
486786c to
bc0c6f2
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
787a0349-6632-4fa0-b2b3-7f11168d76fe
📥 Commits
Reviewing files that changed from the base of the PR and between 486786c4e03518751ca7073b15fd20d17ba95de7 and bc0c6f26c7a76671e982e1b794c96b031968af56.
📒 Files selected for processing (3)
.github/workflows/e2e.ymlconfig/scripts/ci-e2e-job-selection.mjsconfig/scripts/pr-e2e-source-routing.mjs
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.
| (isProductSource(file) && | ||
| /^src\/renderer\/src\/(?:lib\/(?:local-path-open-guard|external-editor-open-capability|worktree-runtime-owner)\.ts|components\/(?:sidebar\/(?:WorktreeOpenInMenu|WorktreeContextMenuView)\.tsx|right-sidebar\/(?:FileExplorer(?:Toolbar)?\.tsx|source-control\/listing\/entry-context-menu\.tsx)))$/.test( | ||
| file |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Route both remaining Open in entry points to the owner regression.
The source pattern omits src/renderer/src/components/sidebar/WorktreeRowOpenInSubMenu.tsx and src/renderer/src/lib/reveal-in-file-manager.ts. If a later PR changes only one of these files, this route will not select ssh-orcad-open-in-owner.spec.ts. Add both paths to the pattern and its routing test.
|
Rebased onto main (resolved e2e routing conflicts by keeping both the markdown-conversion and open-in-owner specs). Unit shard 4/5 failed in src/main/git/worktree-base-divergence-real-git.test.ts ('refuses unrelated histories', expected 'unknown' to be 'exceeded' after 2032ms) — a real-git timing test this PR doesn't touch; rerunning failed jobs once. |
bc0c6f2 to
a70ab92
Compare
a70ab92 to
9a3416a
Compare
ELI5
A remote file and a desktop file can have the same address. Orca offered a desktop editor for the remote file and opened the desktop copy instead. The menus now check which machine owns the target before offering or dispatching a local application.
What Changed
Pass the existing workspace-owner answer through Source Control, the Files toolbar, and worktree/folder context menus into their shared Open in capability and click guards. Managed targets show the existing “Local only” hint and cannot send their path to a desktop editor or file manager while the global runtime focus is local.
Why
Managed conversion removes the old SSH connection ID from the repository. Checking that ID and global focus therefore misses host-owned targets. Extending the shared guards keeps menu state and click handling consistent, preserves local launchers and existing legacy SSH VS Code support, and avoids separate rules for each menu.
Linked Issue
Found while exercising SSH-to-managed-server conversion on Phase 3.5. No existing issue linked.
Visual Proof
Source Control before / after:
Non-Git folder before / after (after also proves the inactive-row case):
remote-menu-editor-owner-phase35-runtime-red.log
remote-open-in-owner-final-runtime-green.log
remote-open-in-owner-runtime-green.log
remote-menu-editor-owner-unit-red.log
remote-open-in-inactive-row-unit-red.log
The baseline used an owned recorder executable in place of a real editor: a legitimate local control launched it, then each remote menu launched it on the desktop and read
LOCAL_ONLY_EDITOR_COLLISION. Positive host RPC returnedREMOTE_ONLY_EDITOR_OWNERfor the same absolute path. No native window was opened or focused.Testing
126 affected unit/component/CI-contract tests across 13 files pass. Full
pnpm tc,pnpm lint, changed-code/design-system checks and a fresh Electron E2E build pass. All four new real SSH regressions fail on unchanged Phase 3.5. The corrected 11-case conversion/update/stdio/port/idle/restart suite passes in 3.0 minutes. Final rebuilt menu cases pass in 43.5 seconds, including inactive worktree and folder rows (10.4 / 9.6 / 11.4 / 10.5 seconds). A further inactive-row component regression failed before honoring the row’s explicit host and passes after the correction.Tests cover a Git file, Git root and non-Git folder on disposable Linux Docker SSH hosts with a hidden macOS Electron renderer. Local and legacy SSH launcher controls are covered. Native Windows runtime was not exercised.
CI routes changed guards/menus and the shared harness to the Docker lane that builds the server template; the general lane excludes this dedicated spec. The reachability contract now also inspects workflow steps that actually enable Docker.
Review
P1 / Medium merge risk. Affects shared desktop-opening guards and owner propagation across four menus; preserves IPC and remote wire formats. Independent base:
OrcaWin/phase35, c8f0a25, with no dependency on the previously handed-off PRs.Agent skill upstream boundary
Notes
Uses existing owner resolution, platform-neutral capability policy, menu hints and localization. No new effects, network calls, host writes in product code, or provider-specific logic. Folder workspaces are exercised through their real menu. No native editor or file-manager focus test was run.
Initial CI had two audited failures. The unchanged telemetry privacy test matched
2222inside random trace IDeb2592222be5240b0b49b5e10e3f068e; the span attributes contain no pane or PTY IDs. Node shard 10/10 passed 12,952 tests and skipped 86. The Docker lane passed ten cases and failed the worktree-menu fixture before the menu because it unnecessarily queried the asynchronously hydrated folder catalog once. One failed-job retry was requested; both original receipts are retained.Commit
88db24baeb7now queries the folder catalog only in the folder case and waits for its actual hydration. All menu/recorder assertions are preserved. A fresh exact build passes all four menu cases in 42.1 seconds. Corrected fixture runtime log. Updated head 88db24b has fully green CI: 22 successful checks / 22 conditional skips, including the corrected Docker lane and verify.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)