Repository navigation
fix(renderer): say which saved servers are the same machine paired twice, and how to fix it - #31100
Conversation
… paired twice, and mark them in Settings
…lishers; generic text when a host is named
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 Walkthrough
Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: 🔵 Low · up to
|
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
e6b5c456-8e1f-4e7a-a586-8797a138818d
📒 Files selected for processing: 16
src/renderer/src/components/settings/runtime-server-row-unverifiable-host.test.tsxsrc/renderer/src/components/settings/runtime-server-row.tsxsrc/renderer/src/components/settings/runtime-servers-connect-section.tsxsrc/renderer/src/components/terminal-pane/pty-connection/pty-input-recovery.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/fr.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/lib/duplicate-paired-servers.test.tssrc/renderer/src/lib/duplicate-paired-servers.tssrc/renderer/src/store/slices/worktrees-duplicate-server-removal.test.tssrc/renderer/src/store/slices/worktrees/listing/worktree-owner-target.tssrc/renderer/src/store/slices/worktrees/teardown/force-delete-preserved-branch.tssrc/renderer/src/store/slices/worktrees/teardown/host-qualified-worktree-removal.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
| const [first, second] = environments | ||
| const key = first?.hostKeyFingerprint | ||
| if (!first || !second || !key) { |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Handle more than two pairings before advising users to remove one.
If three saved entries share a fingerprint and publish the workspace at one location, this function names only the first two. The message says to remove one, but two publishers will remain. Require exactly two publishers for this message, or name all entries and tell users to remove the extras. Update the Settings warning for the same case.
| // on screen. | ||
| get().clearWorktreeDeleteState(worktreeId) | ||
| return { ok: false, error: WORKTREE_REMOVAL_AMBIGUOUS_ERROR } | ||
| return { ok: false, error: ambiguousWorkspaceOwnerMessage(get(), worktreeId) } |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Keep the generic refusal for a host-qualified removal.
If requiredExecutionHostId is set and route resolution fails, this branch can still return the duplicate-pairing message. That differs from the host-qualified owner lookup and the stated rule for callers that named a host. Use the generic ambiguity error when requiredExecutionHostId is set.
…k remove that stays removed (#31082) * feat(settings): one-list Remote Orca Servers page and bulk-manageable SSH Hosts Remote Orca Servers: replace the three mode cards, Advanced fold, duplicate managed/SSH-access lists and troubleshooting accordion with a single list (one row per server: status, one action, overflow menu), an always-visible 'New projects open on' row, and Share / Cloud VM cards that open dialogs. SSH Hosts: group by source, filter, checkbox + shift-range selection, one confirm for bulk remove (skipping hosts with a managed server or workspaces), bulk Test. 'Sync ~/.ssh/config' no longer clears removal tombstones; 'Restore removed hosts (n)' is a separate confirmed action. * fix(settings): address review findings on servers and SSH hosts redesign - SSH filter stays clearable when the list shrinks under the threshold - Cmd/Ctrl-A only selects hosts when pressed in the list itself - group legacy no-source hosts with main's import predicate (now shared) - capture the shift-range anchor before queuing the selection update - blank server names de-duplicate instead of colliding - Share dialog Done refreshes link count and resets name editing - Install / SSH-route dialogs reload SSH hosts when opened - default-host row shows the selector when the default is a WSL host - managed 'Not running' no longer masks connecting/revoked/update states - servers without a dropped transport can be re-checked * test(e2e): WSL host spec matches repo.rm ending a removed project's shells repo.rm now stops the project's terminals on the host (#29964), so the 'orphan left by older builds' setup can no longer be built; use a shell only the host knows of instead. Resolve the project path so macOS /private/var matches what the host reports. * fix(settings): carry 'Orca on <host>' naming and paired-twice warning into the new server list Ports #31099 and #31100 into the redesigned rows, install dialog and SSH host dialogs. * test(e2e): keep the WSL spec's project path as created
ELI5
If the same Orca server got saved twice, every edit to its workspaces failed with a vague "ambiguous" error that refreshing never fixed. Now the error names the two saved entries and says to remove one, and Settings marks both entries.
What Changed
Before: a write to a workspace two saved servers published was refused with "Workspace identity is ambiguous across hosts. Refresh projects and try again." When the two entries were the same machine paired twice, refreshing never helped, and nothing pointed at the real fix: removing one entry.
After:
Mechanism: a new
src/renderer/src/lib/duplicate-paired-servers.tsreads the rows that publish the workspace. These are repo worktree rows, detected worktrees, and folder workspaces (including folders that inherit their host from a project group). It compares the renderer's existing per-serverhostKeyFingerprint, which main already publishes as a digest of the host key the pairing handshake proves. Every throw site that used the generic constant now callsambiguousWorkspaceOwnerMessage.Why
Linked Issue
N/A (internal follow-up from the SSH reliability review)
Visual Proof
Settings > Remote Orca Servers in a hidden renderer (
ORCA_BACKGROUND_LAUNCH=1, CDP screenshot), with an isolated profile seeded with two saved servers sharing one host key:Testing
New tests:
src/renderer/src/lib/duplicate-paired-servers.test.ts: twins named; generic for different servers, a twin plus another host, twins over two SSH targets, a single publishing twin, and unknown keys; folder and project-group inheritance.src/renderer/src/store/slices/worktrees-duplicate-server-removal.test.ts: the removal refusal text through the real store; a named host keeps the generic text.runtime-server-row-unverifiable-host.test.tsx: the Settings marker.New tests fail on origin/main (they expect the new message, marker or module).
Locally:
pnpm tc; the static-analysis job steps;src/renderer/src/lib,src/renderer/src/components/settings,src/renderer/src/store/slicesand the pty-connection folder, single worker.Verified live: the Settings marker, in the hidden-renderer screenshot above. The refusal text is covered only in tests.
I manually tested these changes locally
Automated tests added/updated, or explained why not below