Repository navigation
Show setup-needed hosts in workspace run picker - #7835
Conversation
Co-authored-by: Orca <[email protected]>
|
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:
📝 WalkthroughWalkthroughThis change extends the workspace run target picker to accept setup-needed hosts, render them as disabled rows, and show the picker when ready hosts, setup-needed hosts, or ephemeral recipes exist. Host availability now uses host health before runtime capability checks. It also adds add-host actions from the picker and wires new settings navigation intents through SshPane and RuntimeEnvironmentsPane. Tests were updated for picker behavior and host availability cases. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
Co-authored-by: Orca <[email protected]>
|
Follow-up from screenshot review: setup-needed run target rows now respect host health before setup state. Disconnected hosts show Latest validation:
|
Co-authored-by: Orca <[email protected]>
|
Added the follow-up affordance from review: the Run on picker now includes an Details:
Latest validation:
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/renderer/src/components/settings/RuntimeEnvironmentsPane.tsx (1)
273-273: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDuplicate intent-signal logic — reuse the existing hook instead of reimplementing it.
This effect reimplements the exact same "consume a numeric intent signal once" pattern that
useSshAddTargetIntentalready extracts inSshPane.tsx/use-ssh-add-target-intent.ts(seeconsumedAddTargetIntentSignalRef+ effect there). Consider generalizing that hook (e.g. rename touseAddIntentSignaland drop the SSH-specific name) and reuse it here instead of duplicating the ref + effect logic.♻️ Proposed refactor
- const consumedAddServerIntentSignalRef = useRef(0) + // reuse a generalized version of useSshAddTargetIntent, e.g.: + // useAddIntentSignal(addServerIntentSignal, () => setAddServerFormOpen(true))- useEffect(() => { - if ( - !addServerIntentSignal || - consumedAddServerIntentSignalRef.current === addServerIntentSignal - ) { - return - } - consumedAddServerIntentSignalRef.current = addServerIntentSignal - // Why: composer deep-links should land on the existing pairing form, not just - // the server list. - setAddServerFormOpen(true) - }, [addServerIntentSignal]) + // Why: composer deep-links should land on the existing pairing form, not just + // the server list. + useAddIntentSignal(addServerIntentSignal, () => setAddServerFormOpen(true))Also applies to: 384-396
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 6b84ab0d-7557-419c-b16b-a696725a4868
📒 Files selected for processing (7)
src/renderer/src/components/NewWorkspaceComposerCard.test.tsxsrc/renderer/src/components/NewWorkspaceComposerCard.tsxsrc/renderer/src/components/settings/RuntimeEnvironmentsPane.tsxsrc/renderer/src/components/settings/Settings.tsxsrc/renderer/src/components/settings/SshPane.tsxsrc/renderer/src/components/settings/use-ssh-add-target-intent.tssrc/renderer/src/store/slices/ui.ts
✅ Files skipped from review due to trivial changes (1)
- src/renderer/src/components/settings/use-ssh-add-target-intent.ts
Co-authored-by: Orca <[email protected]>
|
Follow-up update:
Checks on this commit:
No new screenshots attached from this follow-up; I did not run the dev app after the styling tweaks. |
Co-authored-by: Orca <[email protected]>
|
Small UI follow-up from screenshot review:
Checks:
|
Run-target picker: - Group not-connected hosts under a separator (no "Not connected" heading); reserve the alarm icon for genuine health:'error', neutral icon otherwise. - Make not-connected rows hoverable and open the recipe/add-host submenus on hover; add a separator before the environment/add-host actions. - Disable only the in-flight host's Connect button (Set of connecting ids) and add a UI connect timeout so one stalled connect can't lock out the others. Add-host from the composer: - Open SSH / remote-server add as an inline dialog layered over the composer instead of navigating to Settings, so the in-progress form is preserved; the new host flows back into the picker via the store. - Fix a close-animation flicker where the dialog briefly showed the SSH form. - Expose the full SSH advanced options (proxy, jump host, connection reuse, terminal persistence) under one combined Advanced disclosure, shared with the Settings SSH form via a new SshHostAdvancedFields; remove the now-orphaned Settings section components. Setup-script section: - Neutral (non-green) code preview, single orca.yaml source chip, consistent rounded-md corners, run-setup as a toggle, combined into one box; disable the wait-for-setup toggle when setup won't run. - Fix the whole setup section vanishing on toggle by keying the yaml-hooks load effect on the runtime-env id instead of the churny selectedRepoSettings object, and stop the wait-for-setup toggle flicker by syncing on the persisted value. Sparse checkout dropdown: - Rebuild the list on cmdk Command/CommandItem to match the other pickers, and give the preset draft form the app's standard inputs + opaque bg-popover. Advanced disclosure: fix the highlight clipping / left-alignment in the scroll container.
Clicking Connect on a not-connected host no longer closes the dropdown and snaps back to the previous selection. The picker stays open, the row's icon becomes a spinner, and the button shows "Connecting…" while the connect is in flight — the row then updates in place from store SSH state once it resolves (or the button returns to "Connect" on failure so the user can retry).
The run-picker Connect spinner never stopped when a connect failed. Root cause: the `mountedRef` guard around the clearing setState. The ref's effect only set it false on cleanup and never back to true on mount, so StrictMode's dev mount→unmount→remount left it stuck false — the connect `finally` then skipped clearing connectingHostIds and the row spun forever even after the error toast. Remove the unnecessary mounted-guard entirely (a stale setState is a harmless no-op in React 18) so the in-flight id is always cleared when the connect settles. Add a regression test for the failed-connect path.
…pace-host-2 # Conflicts: # src/renderer/src/components/NewWorkspaceComposerCard.tsx # src/renderer/src/components/settings/SshPane.tsx
Co-authored-by: Orca <[email protected]> Co-authored-by: OrcaWin <[email protected]>
Summary
Context
Slack feedback: a user with an SSH target could not find a way to choose an SSH machine during worktree creation because the project only existed locally. This makes that SSH host discoverable as needing project setup before it can be selected.
Screenshots
Validation
pnpm typecheckpassed. This shell prints an unsupported-engine warning because it is on Node 26 and the repo wants Node 24.pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lib/project-host-setup-options.test.ts src/renderer/src/components/NewWorkspaceComposerCard.test.tsxpassed.pnpm exec oxlint src/renderer/src/components/NewWorkspaceComposerCard.tsx src/renderer/src/components/NewWorkspaceComposerCard.test.tsx src/renderer/src/lib/project-host-setup-options.test.tspassed.pnpm check:max-lines-ratchetpassed. Same Node 26 unsupported-engine warning.pnpm exec vitest run --config config/vitest.config.tsfailed in unrelated localStorage-dependent happy-dom tests under this Node 26 shell:pr-comment-presentation.test.ts,pr-comments-list-selection.test.tsx,LinearAgentSkillSetupPrompt.reminder-toast.test.tsx, andSidebarToolbar.test.tsx.Made with Orca 🐋