fix(web): show remote editors without changing the VS Code default#25490

open2
main
maria/takeover-pr-23572
opened3d agobyMmaria
View on GitHubTwo-way sync enabledPR last imported 3d ago

Problem

Remote web browsers offer only VS Code even though other supported editors can open SSH links. Expanding the list alone also changes the fresh default to Cursor.

Change

Offer the supported remote links in browsers and explicitly retain VS Code as their default. Saved selections still win. Desktop probing and local host editor choices keep their existing behavior. The current atom-based implementation needs one early return instead of the original hook's fallback/cache changes.

The expanded remote choices need Maria's approval; the default editor does not change.

Verification

  • Passed: regression failed on current main because Cursor was absent, then passed with the fix.
  • Passed: Blacksmith vp run check:changed, including format, lint, knip, affected typechecks, and 20 tests.
  • Passed: real Chrome client at a non-loopback origin, paired to the dev server. Expanded menu retains VS Code, selecting Zed persists after reload, and clicking Open requests the server-advertised zed://ssh/ destination. Browser regression also covers the favorite-editor shortcut and local choices.
  • Unverified: native editor window launch (no local editor handler), packaged Electron, mobile, and relay/tunnel transports. No provider, protocol, server, or mobile changes.

before: remote browser offers only VS Code

after: remote browser offers supported editors with VS Code selected

select Zed and open its remote SSH destination

Takeover

Replaces #23572, with thanks to @ulughbeck for the original implementation.

Built with GPT-6.1-Sol in the Codex harness on T3 Code.

Checks

22 successful · 10 skipped
All checks passed
4d67ae0

Added 1 commit

  • fix(web): show remote editors while keeping the VS Code default91ea058
Synced from GitHub

Review in Change Stack →

No actionable comments were generated in the recent review.

External image Recent review info
External image Run configuration
External image Commits

Reviewing files that changed from the base of the PR and between 28df7a246f9f7063180f9a4c509ee17c6823b32b and 4d67ae051dbcbe12c5c71783e71018f18233dc80.

External image Files selected for processing: 4
  • apps/web/src/components/chat/OpenInPicker.browser.test.tsx
  • apps/web/src/components/chat/OpenInPicker.tsx
  • apps/web/src/editorPreferences.ts
  • apps/web/src/remoteOpen.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

The change updates preferred-editor selection and remote editor availability when no desktop bridge is present. Browser tests cover remote editor choices, URL opening, the retained shortcut, and local editor choices.

Changes: Remote editor picker

Layer / File(s)Summary
Editor defaults and availability
apps/web/src/editorPreferences.ts, apps/web/src/remoteOpen.ts
usePreferredEditor accepts an optional default editor. When no desktop bridge is available, remoteCapableEditorsAtom returns the remote-capable editor IDs without probing.
Picker integration and browser coverage
apps/web/src/components/chat/OpenInPicker.tsx, apps/web/src/components/chat/OpenInPicker.browser.test.tsx
In browser remote-link mode, the picker uses VS Code as the fallback editor. Tests cover remote editor choices, opening remote URLs from the picker and retained shortcut, and local editor choices.

Priority: External image Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

Suggested reviewers: juliusmarminge, yash-singh1

Merge Risk: External image Minimal · up to 4d67a

The change is mergeable with no identified material risk; browser protocol handling remains dependent on installed editor registrations.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check nameStatusExplanationResolution
Description checkWarningThe description follows the template's main sections: Problem, Change, Scope and approval, and Verification. The Problem and Change sections are clear and specific. Verification lists focused tests, a…Add a Scope and approval section. Link the triaged bug issue or discussion that covers this direction and scope. Include the maintainer approval comment from Maria, or link to it. If no prior issue exists, explain why this focused fix quali…
Passed Passed checks: 3 passed
Check nameStatusExplanation
Title checkPassedThe title follows the conventional commit format and names the main change: remote browsers now see the supported remote editors while VS Code stays the default. It matches the summarized changes in O…
Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title follows the conventional commit format and names the main change: remote browsers now see the supported remote editors while VS Code stays the default. It matches the summarized changes in OpenInPicker, usePreferredEditor, and remoteCapableEditorsAtom. It is 66 characters, which is concise.

Full details: Description check

Explanation

The description follows the template's main sections: Problem, Change, Scope and approval, and Verification. The Problem and Change sections are clear and specific. Verification lists focused tests, a real-browser check, screenshots, and items not checked. The Scope and approval section is missing. It does not link a triaged bug issue or a maintainer discussion. It only says the expanded remote choices need Maria's approval, and it gives no approval comment or link. The description also references a takeover of a prior PR, which is useful context but does not replace the required scope approval.

Resolution

Add a Scope and approval section. Link the triaged bug issue or discussion that covers this direction and scope. Include the maintainer approval comment from Maria, or link to it. If no prior issue exists, explain why this focused fix qualifies for an exemption. Explain that the change is focused configuration of an existing capability and that its effects stay within that capability.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

Added 1 commit

  • test(web): require the remote editor shortcut to open a new URL4d67ae0
Synced from GitHub

Approvability

Verdict: Approved at 4d67ae0

Macroscope's review found this PR approvable — This small web fix exposes existing remote editor links in browsers while keeping VS Code as the fresh default and preserving saved selections. Desktop probing, local editor behavior, and production contracts remain unchanged, with browser regression coverage added.

Notes:

  • No code objects were reviewed. Approvability was decided on eligibility alone.

You can add or adjust custom eligibility rules. Learn more.