Repository navigation
Preserve retained desktop browser pages during SSH conversion - #26572
Conversation
26bcbff to
890075a
Compare
b067bac to
7680e04
Compare
d1586c1 to
ae8c3b5
Compare
7680e04 to
d9793b3
Compare
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
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 339a285 and 941e7577ac87e088233bcfc1fad1c9343e892334. 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe change adds explicit local placement for converted SSH browser pages and URL conversion origins. Managed-server catalog loading preserves that placement, and browser-tab creation fallbacks pass a null runtime environment ID. Tests cover page preservation, managed conversion, and SSH-backed tab creation. E2E tests check retained-tab authentication across managed conversion, reconnection, and app restart, and verify that a new managed-runtime tab differs from the retained tab. E2E source routing and CI selection include the affected renderer paths. Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to The change preserves converted browser pages while keeping new managed-runtime tabs distinct. No actionable merge risk remains in the reviewed evidence; it is ready to merge subject to normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)✅ Passed checks (4 passed)✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
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 |
941e757 to
efd0154
Compare
Converted SSH workspaces now keep retained desktop pages local, so the spec opens its remote-placed page on the managed environment instead of relying on the retained page moving there.
…nect The managed host can seed a terminal for the converted workspace and the client mirrors it with focus, hiding the browser notice mid-test.
efd0154 to
42c47ac
Compare
ELI5
An SSH workspace could keep its browser tab after moving to Remote, yet opening that tab showed a connection error. The app had changed where it expected the browser to run. Existing desktop pages now stay on the desktop and keep their login through conversion, reconnect, and app restart.
What Changed
Before refreshing a converted host’s catalogs, the renderer records explicit desktop placement for its existing browser pages. It uses the current workspace owner to include both git and folder workspaces, leaving other hosts and explicit remote pages alone. URL history across document conversion keeps the same placement. Future normal and profile tabs also record the local provider choice at creation.
The real browser routing journey now checks the original tab as well as a new tab, then reconnects SSH and restarts the app. Source changes select that journey in the managed-server CI lane.
Why
Unspecified placement inherits the workspace owner. That owner changes during conversion, although a desktop browser has not moved to the server. Recording the existing placement before the change preserves its meaning and avoids attempting unsupported server streaming or creating a replacement browser on another host.
Linked Issue
Follow-up to #26483. Stacked on #26570: that PR preserves the SSH route for desktop pages once their workspace has managed ownership. This PR fixes the existing page’s placement; merge #26570 first.
Visual Proof
Before: the retained tab attempts a server browser and shows a connection error.
After: the original tab reaches the remote-only website with its original login cookie.
Baseline failure · Conversion, reconnect, restored placement, and restart request records
Testing
132 tests pass across 11 affected browser, conversion, and CI contract files. Full
pnpm tc, affected oxlint, changed-code quality, commit checks, and a fresh Electron E2E build pass.Real hidden Electron on macOS with an owned Linux SSH host fails the retained-page assertion before the fix. Corrected runs reach the private origin with the same partition and login. The final journey also verifies both pages after SSH reconnect and the retained page after a full app restart. A separate saved relay-era browser startup journey passes automatic conversion, reconnect, and another app restart. An owned Linux SSH folder-workspace journey also passes conversion, new-page creation, reconnect, and full app restart; folder ownership is additionally covered by unit tests. Windows validation is left to CI.
The optional repository-wide E2E typecheck reports 246 diagnostics in existing other files; none names a changed file. The standard full typecheck passes.
Review
Self-reviewed conversion ordering, ownership boundaries, explicit remote placement, document history, persistence, and no-op identity retention.
Agent skill upstream boundary
Notes
Uses the existing optional placement field; no paired client/server protocol changes. Login survival is verified from the origin’s requests. This does not promise preservation of in-page memory or browser history across app restart.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)