Skip to content

Add SSH config host picker to add-host dialog - #12334

Merged
AmethystLiang merged 7 commits into
mainfrom
import-ssh-config-does-nothing
Aug 4, 2026
Merged

AmethystLiang merged 7 commits into
mainfrom
import-ssh-config-does-nothing

Conversation

@AmethystLiang

Copy link
Copy Markdown
Contributor

Summary

Adds an in-dialog picker for ~/.ssh/config hosts when adding a new SSH target. Instead of a separate bulk-import flow, users can now browse and select a single config host to prefill the add-host form, completing the import workflow.

Changes

Backend

  • New IPC handlers ssh:listConfigHosts and ssh:resolveConfigHost for querying and resolving config entries
  • SshConnectionStore.listSuppressedSshConfigAliases() to track deleted/suppressed config aliases
  • Config host search and resolution logic with deduplication and pagination (100-host limit per query)

UI

  • Split AddRemoteHostDialog into form view and config-picker view (same dialog shell, no resize jitter)
  • New AddRemoteHostSshConfigPicker component with search, filtering, and "In Orca" badges
  • New AddRemoteHostSshFormPanel and AddRemoteHostServerFormPanel to encapsulate each mode
  • Form prefilling via getEditingTargetFromSshConfigHost, preserving all config identity fields (identity files, GSSAPI, proxy settings)

Workspace creation

  • Filter out project setups and folder groups configured only on removed/disconnected hosts
  • Fall back to an actionable sibling setup when the draft host becomes unavailable

Validation

  • Duplicate detection: prevent re-adding a host whose alias/label is already in Orca
  • Config suppression: deleted manual targets suppress their aliases from config re-discovery

Testing

  • Unit tests: config host search, resolution, duplicate detection, legacy array normalization
  • UI flow: form ↔ picker transitions, prefilling from config, validation on save
  • Cross-platform: shell API contracts (macOS/Linux/Windows SSH binary compatibility via ssh -G)
  • Workspace creation: actionable host filtering and fallback scenarios

Users can now click 'Fill from ~/.ssh/config…' to browse available SSH
config hosts in a picker, select one, and have the form automatically
prefill with resolved connection details (hostname, port, username, auth).

Previously, an 'import' button provided bulk sync on this form—confusing
and unhelpful when everything was already synced. That action is now
available as a secondary 'Add all' option in the picker.
@coderabbitai

coderabbitai Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 40f5bc71-662a-4e62-b62c-7868bbb62edd

📥 Commits

Reviewing files that changed from the base of the PR and between 25aedbd and b5fd128.

📒 Files selected for processing (11)
  • src/main/ssh/ssh-config-host-picker.test.ts
  • src/main/ssh/ssh-config-host-picker.ts
  • src/main/ssh/ssh-connection-store.ts
  • src/main/ssh/ssh-g-config-resolution.test.ts
  • src/main/ssh/ssh-g-config-resolution.ts
  • src/renderer/src/components/sidebar/AddRemoteHostDialog.config-picker.test.tsx
  • src/renderer/src/components/sidebar/AddRemoteHostSshConfigPicker.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/lib/project-host-workspace-target.test.ts
  • src/renderer/src/lib/project-host-workspace-target.ts
  • src/shared/ssh-types.ts
🚧 Files skipped from review as they are similar to previous changes (7)
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/lib/project-host-workspace-target.test.ts
  • src/main/ssh/ssh-connection-store.ts
  • src/renderer/src/lib/project-host-workspace-target.ts
  • src/main/ssh/ssh-config-host-picker.test.ts
  • src/main/ssh/ssh-config-host-picker.ts
  • src/shared/ssh-types.ts

📝 Walkthrough

Walkthrough

Added SSH config host listing and alias resolution across the main process, IPC, preload, web fallback, and renderer. Added cached search, suppression handling, duplicate detection, resolution mapping, form prefilling, bulk import, and picker UI states. Added case-insensitive alias reclamation and deletion suppression. Added GSSAPI and resolved identity handling. Added configured-only execution-host filtering for project, setup, group, workspace, and composer selection.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the main changes and testing scope but omits the required Screenshots, AI Review Report, Security Audit, and Notes sections. Add all required template sections, complete the testing checklist, and document screenshots or “No visual change,” AI review findings, security risks, and platform-specific notes.
Docstring Coverage ⚠️ Warning Docstring coverage is 15.38% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: adding an SSH config host picker to the add-host dialog.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

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.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/renderer/src/components/settings/ssh-target-draft.test.ts (1)

316-327: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add gssapiAuthentication to the dirty-field table.

This PR adds gssapiAuthentication to EditingTarget and to isSshTargetFormDirty. The table comment states that every editable field must be covered. The new field is not in the table, so a future regression in that comparison would not fail any test.

💚 Proposed test addition
     { identityFile: '~/.ssh/id_ed25519' },
+    { gssapiAuthentication: true },
     { proxyCommand: 'nc %h %p' },
🧹 Nitpick comments (3)
src/renderer/src/components/sidebar/AddRemoteHostSshConfigPicker.tsx (1)

177-184: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Avoid hardcoding the result limit in the truncation message.

The text states "first 100 matches" as a literal string, but the actual limit lives in SSH_CONFIG_HOST_RESULT_LIMIT in src/main/ssh/ssh-config-host-picker.ts. If that constant changes, this message will not match the real limit.

Pass the limit value as a prop and interpolate it, the same way sshConfigPickerAddAll interpolates newHostCount.

src/renderer/src/components/sidebar/add-remote-host-ssh-actions.ts (1)

235-249: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider sharing the host-limit constant instead of hardcoding 100.

This legacy-array fallback hardcodes 100 as the page size. SSH_CONFIG_HOST_RESULT_LIMIT already exists in src/main/ssh/ssh-config-host-picker.ts for the same purpose, but it lives in main-process code and cannot be imported here directly.

Move the constant to src/shared/ssh-types.ts (same pattern as MAX_SSH_RELAY_GRACE_PERIOD_SECONDS) so both the main-process picker and this renderer fallback stay in sync.

src/renderer/src/components/sidebar/AddRemoteHostSshFormPanel.tsx (1)

47-57: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use the shadcn Button primitive for the config link action.

This control is a raw <button> with hand-written link styling. The shared Button primitive supplies the focus-visible ring, disabled handling, and token-based colors. Without it, keyboard users get no visible focus indicator on this action.

As per coding guidelines: "All UI work must follow docs/STYLEGUIDE.md, use tokens from src/renderer/src/assets/main.css, and use shadcn primitives from src/renderer/src/components/ui/".

♻️ Proposed refactor
-        <button
-          type="button"
-          className="self-center text-left text-xs text-muted-foreground underline-offset-2 hover:text-foreground hover:underline disabled:cursor-not-allowed disabled:opacity-50"
-          onClick={onFillFromConfig}
-          disabled={disabled}
-        >
+        <Button
+          type="button"
+          variant="link"
+          className="h-auto self-center p-0 text-xs text-muted-foreground hover:text-foreground"
+          onClick={onFillFromConfig}
+          disabled={disabled}
+        >
           {translate(
             'auto.components.sidebar.AddRemoteHostDialog.fillFromSshConfig',
             'Fill from ~/.ssh/config…'
           )}
-        </button>
+        </Button>

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 26a1dbd9-9139-47d3-8474-7ecf94b5753f

📥 Commits

Reviewing files that changed from the base of the PR and between cd68a8b and bd0b594.

📒 Files selected for processing (43)
  • src/main/ipc/ssh.test.ts
  • src/main/ipc/ssh.ts
  • src/main/ssh/ssh-config-host-picker.test.ts
  • src/main/ssh/ssh-config-host-picker.ts
  • src/main/ssh/ssh-config-parser.test.ts
  • src/main/ssh/ssh-connection-store.test.ts
  • src/main/ssh/ssh-connection-store.ts
  • src/main/ssh/ssh-connection.test.ts
  • src/main/ssh/ssh-multi-key-authentication.test.ts
  • src/preload/api-types.ts
  • src/preload/index.ts
  • src/renderer/src/components/NewWorkspaceComposerCard.test.tsx
  • src/renderer/src/components/new-workspace/ProjectHostSetupCombobox.test.tsx
  • src/renderer/src/components/settings/RepositoryHostSetupsSection.tsx
  • src/renderer/src/components/settings/ssh-target-draft.test.ts
  • src/renderer/src/components/settings/ssh-target-draft.ts
  • src/renderer/src/components/settings/ssh-target-save-payload.ts
  • src/renderer/src/components/sidebar/AddRemoteHostDialog.tsx
  • src/renderer/src/components/sidebar/AddRemoteHostFields.tsx
  • src/renderer/src/components/sidebar/AddRemoteHostServerFormPanel.tsx
  • src/renderer/src/components/sidebar/AddRemoteHostSshConfigPicker.tsx
  • src/renderer/src/components/sidebar/AddRemoteHostSshFormPanel.tsx
  • src/renderer/src/components/sidebar/add-remote-host-ssh-actions.test.ts
  • src/renderer/src/components/sidebar/add-remote-host-ssh-actions.ts
  • src/renderer/src/components/sidebar/ssh-target-duplicate.test.ts
  • src/renderer/src/components/sidebar/ssh-target-duplicate.ts
  • src/renderer/src/hooks/useComposerState.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/new-workspace-project-options.test.ts
  • src/renderer/src/lib/new-workspace-project-options.ts
  • src/renderer/src/lib/project-host-setup-options.test.ts
  • src/renderer/src/lib/project-host-setup-options.ts
  • src/renderer/src/lib/project-host-workspace-target.test.ts
  • src/renderer/src/lib/project-host-workspace-target.ts
  • src/renderer/src/web/web-preload-api.ts
  • src/shared/execution-host-registry.test.ts
  • src/shared/execution-host-registry.ts
  • src/shared/ssh-types.ts
  • ssh-import-ux-mock.html
💤 Files with no reviewable changes (4)
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json

Comment thread ssh-import-ux-mock.html Resolved
Comment thread ssh-import-ux-mock.html Resolved
- Reuse search loader on import completion to preserve active filter inside generation guard
- Fall back to hostname when manual host has no label, not empty string
- Make alias duplicate detection case-insensitive to match config picker behavior
- Validate host availability when restoring project group selection
- Add aria-selected attribute to picker options for accessibility

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/renderer/src/hooks/useComposerState-host-context-boundaries.test.ts (1)

514-528: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

Test the restoration behavior instead of the source text.

sourceBetween(...).toContain(...) can pass while the hook still restores an unavailable group. It also couples the test to dependency-array formatting. Render useComposerState with an unavailable actionableHostIds set and assert that selectedProjectGroupId remains unset. Then make the host actionable and assert that restoration occurs.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8f494ff3-6f2b-4fd7-aa09-528567f9f914

📥 Commits

Reviewing files that changed from the base of the PR and between bd0b594 and dc83393.

📒 Files selected for processing (8)
  • src/renderer/src/components/sidebar/AddRemoteHostDialog.tsx
  • src/renderer/src/components/sidebar/AddRemoteHostSshConfigPicker.tsx
  • src/renderer/src/components/sidebar/add-remote-host-ssh-actions.test.ts
  • src/renderer/src/components/sidebar/add-remote-host-ssh-actions.ts
  • src/renderer/src/components/sidebar/ssh-target-duplicate.test.ts
  • src/renderer/src/components/sidebar/ssh-target-duplicate.ts
  • src/renderer/src/hooks/useComposerState-host-context-boundaries.test.ts
  • src/renderer/src/hooks/useComposerState.ts
🚧 Files skipped from review as they are similar to previous changes (6)
  • src/renderer/src/components/sidebar/ssh-target-duplicate.test.ts
  • src/renderer/src/components/sidebar/ssh-target-duplicate.ts
  • src/renderer/src/components/sidebar/add-remote-host-ssh-actions.ts
  • src/renderer/src/components/sidebar/AddRemoteHostSshConfigPicker.tsx
  • src/renderer/src/hooks/useComposerState.ts
  • src/renderer/src/components/sidebar/AddRemoteHostDialog.tsx

Review findings on the ~/.ssh/config picker + bulk add:

- Guard config-host resolution with a generation counter so a late resolve
  cannot overwrite a later pick or a form the user backed out of; freeze the
  other rows while a pick resolves.
- Stop "Add all N" from re-adopting deleted hosts — it now imports without
  reAdopt, matching the new-host count it advertises. Settings → Import keeps
  the explicit re-adopt path.
- Fold SSH aliases through a shared normalizeSshConfigAlias for import
  ownership, delete tombstones, reclaim, picker search, and the save-time
  duplicate check, which now occupies configHost *and* label like the picker.
- Persist GSSAPIAuthentication only when a parsed Host entry asks for it, not
  when `ssh -G` merely echoes the /etc/ssh system default.
- Fail closed with unavailable/setup-not-found when an explicit
  projectHostSetupId names a non-actionable host instead of silently creating
  the workspace on a sibling host.
- Cache the parsed config for the picker session (refresh on open/retry) so
  filter keystrokes no longer reparse and Include-expand the file, keep the
  filter usable during loads, add a Retry on load errors, explain an empty
  Identity file after a config fill, and drop the always-false aria-selected.
Move SSH_CONFIG_HOST_RESULT_LIMIT to shared types so the renderer's limit message
cannot drift from the host's query limit. Extract findActionableFolderProjectGroup
to avoid repeating the folder-host-availability check across the composer hook.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/main/ssh/ssh-config-host-picker.ts (1)

96-99: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Reject aliases that are no longer in the SSH configuration.

Line 96 resolves the alias before confirming that it is still a configured host. ssh -G can return default settings for an unknown alias, including a hostname. A stale picker item can then create a target instead of returning null.

Validate the normalized alias against a current configuration snapshot before resolving it. Add a test where the resolver returns defaults but loadConfigHosts has no matching host.

src/renderer/src/lib/project-host-workspace-target.ts (1)

201-229: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Do not fall back from an explicit hostId.

When Line 202 finds no target, execution continues to the legacy fallback. Lines 224-229 can return a ready target on another actionable host. This creates the workspace on a host that the caller did not select.

If hostId is present and no target exists on that host, return an unavailable result. Add a test with an unavailable selected host and a ready setup on another host.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a8bfec6d-0381-42c6-a239-7f29ce77c588

📥 Commits

Reviewing files that changed from the base of the PR and between dc83393 and 5cfb636.

📒 Files selected for processing (24)
  • src/main/ipc/ssh.test.ts
  • src/main/ipc/ssh.ts
  • src/main/ssh/ssh-config-host-picker.test.ts
  • src/main/ssh/ssh-config-host-picker.ts
  • src/main/ssh/ssh-connection-store.test.ts
  • src/main/ssh/ssh-connection-store.ts
  • src/renderer/src/components/settings/ssh-target-draft.test.ts
  • src/renderer/src/components/sidebar/AddRemoteHostDialog.config-picker.test.tsx
  • src/renderer/src/components/sidebar/AddRemoteHostDialog.tsx
  • src/renderer/src/components/sidebar/AddRemoteHostFields.tsx
  • src/renderer/src/components/sidebar/AddRemoteHostSshConfigPicker.tsx
  • src/renderer/src/components/sidebar/AddRemoteHostSshFormPanel.tsx
  • src/renderer/src/components/sidebar/add-remote-host-ssh-actions.test.ts
  • src/renderer/src/components/sidebar/add-remote-host-ssh-actions.ts
  • src/renderer/src/components/sidebar/ssh-target-duplicate.test.ts
  • src/renderer/src/components/sidebar/ssh-target-duplicate.ts
  • src/renderer/src/hooks/useComposerState.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/lib/new-workspace-project-options.test.ts
  • src/renderer/src/lib/new-workspace-project-options.ts
  • src/renderer/src/lib/project-host-workspace-target.test.ts
  • src/renderer/src/lib/project-host-workspace-target.ts
  • src/shared/ssh-config-alias.ts
  • src/shared/ssh-types.ts
🚧 Files skipped from review as they are similar to previous changes (10)
  • src/shared/ssh-types.ts
  • src/renderer/src/components/sidebar/ssh-target-duplicate.ts
  • src/main/ipc/ssh.ts
  • src/renderer/src/components/sidebar/ssh-target-duplicate.test.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/components/sidebar/AddRemoteHostSshFormPanel.tsx
  • src/renderer/src/components/sidebar/AddRemoteHostFields.tsx
  • src/renderer/src/hooks/useComposerState.ts
  • src/main/ipc/ssh.test.ts
  • src/renderer/src/components/settings/ssh-target-draft.test.ts

In E2E tests and sandboxes, isolated HOME can differ from the system
passwd home. OpenSSH resolves the default config via getpwuid (passwd),
while Node's loadUserSshConfig uses os.homedir() (HOME-aware). Pass -F
to explicitly specify the config path when they diverge, so ssh -G and
the picker resolve the same file.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 005b200f-28f6-4ead-8b35-5fa07c16d73f

📥 Commits

Reviewing files that changed from the base of the PR and between 5cfb636 and 25aedbd.

📒 Files selected for processing (5)
  • src/main/ssh/ssh-g-config-resolution.ts
  • tests/e2e/helpers/ssh-config-host-picker.ts
  • tests/e2e/ssh-config-host-import.spec.ts
  • tests/e2e/ssh-config-host-picker.PLAN.md
  • tests/e2e/ssh-config-host-picker.spec.ts

Comment thread src/main/ssh/ssh-g-config-resolution.ts Resolved
@AmethystLiang

Copy link
Copy Markdown
Contributor Author

@coderabbitai[bot] fixed

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@AmethystLiang Confirmed. Thank you for the fix.


If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

You are interacting with an AI system.

When a user edits ~/.ssh/config and removes a host, the import picker
should not fall back to ssh -G's echoed response (which treats any alias
as valid). Check the reloaded config file before resolving.

- Force reload config on each resolve to catch user edits post-open
- Reject aliases not in the current config before calling ssh -G
- Add test for deleted alias edge case
- Fix workspace-target fallback to honor explicit host selection
Allow users to reclaim a deleted SSH host by re-picking it from ~/.ssh/config. Tombstoned aliases now appear in the picker with a "Removed from Orca" badge and remain pickable, but don't count toward "Add all" operations — ensuring passive import never resurrects a deleted alias while still giving the user a recovery path.
@AmethystLiang
AmethystLiang merged commit 637c7e9 into main Aug 4, 2026
43 of 44 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* feat(ssh): add SSH config host picker for add-host form

Users can now click 'Fill from ~/.ssh/config…' to browse available SSH
config hosts in a picker, select one, and have the form automatically
prefill with resolved connection details (hostname, port, username, auth).

Previously, an 'import' button provided bulk sync on this form—confusing
and unhelpful when everything was already synced. That action is now
available as a secondary 'Add all' option in the picker.

* fix(ssh): import filter preservation and label fallback

- Reuse search loader on import completion to preserve active filter inside generation guard
- Fall back to hostname when manual host has no label, not empty string
- Make alias duplicate detection case-insensitive to match config picker behavior
- Validate host availability when restoring project group selection
- Add aria-selected attribute to picker options for accessibility

* fix(ssh): harden config picker import, alias folding, and host targeting

Review findings on the ~/.ssh/config picker + bulk add:

- Guard config-host resolution with a generation counter so a late resolve
  cannot overwrite a later pick or a form the user backed out of; freeze the
  other rows while a pick resolves.
- Stop "Add all N" from re-adopting deleted hosts — it now imports without
  reAdopt, matching the new-host count it advertises. Settings → Import keeps
  the explicit re-adopt path.
- Fold SSH aliases through a shared normalizeSshConfigAlias for import
  ownership, delete tombstones, reclaim, picker search, and the save-time
  duplicate check, which now occupies configHost *and* label like the picker.
- Persist GSSAPIAuthentication only when a parsed Host entry asks for it, not
  when `ssh -G` merely echoes the /etc/ssh system default.
- Fail closed with unavailable/setup-not-found when an explicit
  projectHostSetupId names a non-actionable host instead of silently creating
  the workspace on a sibling host.
- Cache the parsed config for the picker session (refresh on open/retry) so
  filter keystrokes no longer reparse and Include-expand the file, keep the
  filter usable during loads, add a Retry on load errors, explain an empty
  Identity file after a config fill, and drop the always-false aria-selected.

* refactor(ssh): centralize host result limit and extract folder group val

Move SSH_CONFIG_HOST_RESULT_LIMIT to shared types so the renderer's limit message
cannot drift from the host's query limit. Extract findActionableFolderProjectGroup
to avoid repeating the folder-host-availability check across the composer hook.

* fix(ssh): pass -F to ssh -G when HOME differs from passwd home

In E2E tests and sandboxes, isolated HOME can differ from the system
passwd home. OpenSSH resolves the default config via getpwuid (passwd),
while Node's loadUserSshConfig uses os.homedir() (HOME-aware). Pass -F
to explicitly specify the config path when they diverge, so ssh -G and
the picker resolve the same file.

* fix(ssh): verify config host exists before resolving with ssh -G

When a user edits ~/.ssh/config and removes a host, the import picker
should not fall back to ssh -G's echoed response (which treats any alias
as valid). Check the reloaded config file before resolving.

- Force reload config on each resolve to catch user edits post-open
- Reject aliases not in the current config before calling ssh -G
- Add test for deleted alias edge case
- Fix workspace-target fallback to honor explicit host selection

* fix(ssh): let tombstoned aliases be re-picked in the config picker

Allow users to reclaim a deleted SSH host by re-picking it from ~/.ssh/config. Tombstoned aliases now appear in the picker with a "Removed from Orca" badge and remain pickable, but don't count toward "Add all" operations — ensuring passive import never resurrects a deleted alias while still giving the user a recovery path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant