Skip to content

Refuse unsupported SSH project setup before local API dispatch - #33225

Closed
MokiMeow wants to merge 1 commit into
stablyai:mainfrom
MokiMeow:fix/refuse-unsupported-ssh-project-setup
Closed

MokiMeow wants to merge 1 commit into
stablyai:mainfrom
MokiMeow:fix/refuse-unsupported-ssh-project-setup

Conversation

@MokiMeow

Copy link
Copy Markdown
Contributor

ELI5

Adding a project on a paired server's SSH host should explain that this setup is unsupported. It currently reports a TypeError or incorrectly says the SSH host is disconnected.

What Changed

Reject SSH existing-folder setup and cloning before local API dispatch. Reuse the existing unsupported-setup message across renderer, runtime controller and IPC. Preserve typed SSH refusal and connection identity.

Why

Implement the issue's explicit unsupported-operation fallback. Replace a stale mocked-success test with regressions using the real web fallback producer. Nested SSH setup is not implemented.

Linked Issue

Fixes #33124.

Visual Proof

Automated before/after: four folder/git and focused/unfocused-runtime cases fail on original production with "Cannot read properties of undefined (reading 'repo')". With this fix, they return the existing clear unsupported message before local API/RPC calls or catalog mutation.

No rendered screenshot is attached. No live paired-client -> Electron server -> SSH topology was exercised locally.

Testing

Linux x86-64, Node 24.22.1, pinned dependencies:

  • Affected tests: 1,550 passed, 3 existing skips.

  • All four new real-fallback regressions fail on original production.

  • Full lint, type checking, changed-code quality and production build pass, including native protocol and glibc checks. Native dependency fetching needed transport retries; sources/checks were unchanged.

  • Eight additional Electron tests pass with isolated Xvfb.

  • Broad Node validation remains INCOMPLETE and has additional failures. Direct upstream comparisons reproduce 31 failing process tests across 10 unchanged suites. Other broad failures have not all been attributed. No whole-suite success is claimed.

  • No local macOS, Windows or live paired SSH validation.

  • I manually tested these changes locally (live paired SSH topology untested)

  • Automated tests added/updated

AI Disclosure

Implemented and reviewed with OpenAI Codex (GPT-6). Author X: @smohiths.

Review

Considered local/runtime/SSH routing, folder/git setup, mixed client/server versions, mobile server-error reuse, catalog mutation, cross-platform behavior, security and performance scope.

Agent skill upstream boundary

  • Not applicable; no upstream skill-installer material copied or translated.

Notes

Existing legacy SSH project import flows are unchanged.

Checklist

  • Small and focused
  • Explained the user-facing change and mechanism
  • Before/after rendered screenshots or videos attached
  • Self-reviewed correctness, security and performance scope
  • Cross-platform and remote impact considered
  • All broad tests pass (validation remains incomplete)

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Walkthrough

The change adds a shared message for project setup attempts on an Orca server’s SSH hosts. The IPC handler, runtime controller, and renderer use this message instead of connection-state errors. Renderer tests check that folder and Git setup return null, make no setup API calls, and preserve the relevant state references. Backend and renderer test expectations now cover the shared message and runtime error details.

Priority: Normal

Severity of issue fixed: Medium

Merge Risk: Low · up to 9f6c2

Non-English users see an English setup error; localize the renderer-facing message before merging.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 8 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: rejecting unsupported SSH project setup before local API dispatch.
Description check Passed The description is complete and directly matches the changes. It includes the user impact, implementation, rationale, linked issue, testing results, limitations, AI disclosure, and scope notes. It doe…
Linked Issues check Passed The PR addresses the unsupported-operation option in issue #33124. The renderer rejects existing-folder and clone setup for SSH targets before local API or runtime RPC dispatch. The runtime controller…
Out of Scope Changes check Passed The changes stay within issue #33124. The shared message, renderer guards, runtime and IPC behavior, and updated regression tests directly support the unsupported SSH project-setup behavior. The evide…
Full details: Description check

Explanation

The description is complete and directly matches the changes. It includes the user impact, implementation, rationale, linked issue, testing results, limitations, AI disclosure, and scope notes. It does not include rendered screenshots or videos, but it documents why live SSH validation was not performed and provides automated before-and-after evidence.

Full details: Linked Issues check

Explanation

The PR addresses the unsupported-operation option in issue #33124. The renderer rejects existing-folder and clone setup for SSH targets before local API or runtime RPC dispatch. The runtime controller and IPC handler return the shared SERVER_SSH_PROJECT_ADD_UNAVAILABLE_MESSAGE. The tests cover folder and Git setup with focused and unfocused runtimes, and they verify no setup call or catalog mutation. The tests also verify typed SSH refusal and connection identity. These changes replace the reported TypeError and misleading disconnected message with a clear unsupported-operation message. The broader managed-runtime mapping is not required when the unsupported-operation option is implemented.

Full details: Out of Scope Changes check

Explanation

The changes stay within issue #33124. The shared message, renderer guards, runtime and IPC behavior, and updated regression tests directly support the unsupported SSH project-setup behavior. The evidence states that nested SSH setup and legacy SSH project import flows remain unchanged. No unrelated product behavior is identified.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fdb0c87b-ec67-4c4f-a4e4-61bc9c53e2ac
Commits

Reviewing files that changed from the base of the PR and between 13db649 and 9f6c249.

Files selected for processing: 8
  • src/main/ipc/repos-local-add-and-project-setup.test.ts
  • src/main/ipc/repos/project-host-setup-handlers.ts
  • src/main/runtime/orca-runtime-tests/repository-project-operations.spec.ts
  • src/main/runtime/runtime-project-host-setup-controller.test.ts
  • src/main/runtime/runtime-project-host-setup-controller.ts
  • src/renderer/src/store/projects/project-host-setup-actions.ts
  • src/renderer/src/store/slices/repos.test.ts
  • src/shared/project-host-setup-target.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.

Comment on lines +3 to +4
export const SERVER_SSH_PROJECT_ADD_UNAVAILABLE_MESSAGE =
"This Orca server can't add projects on its SSH hosts. Add the SSH host on your computer to open its projects."

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.

Minor · Functional Correctness · Quick win

Localize the new SSH setup message before display.

The renderer places this English message directly in the failure toast. Users of other languages receive no localized instruction. Keep the shared error message for backend callers, but use an intent-named localization ID when the renderer displays it.

Based on learnings, newly added user-facing strings in stablyai/orca TypeScript files use intent-named localization IDs with named interpolation placeholders.

Source: Learnings

@nwparker

Copy link
Copy Markdown
Contributor

Thank you @MokiMeow for this fix and the thorough testing notes! You were right on both counts: a paired client can't route project setup to its server's SSH host today, and refusing before anything is dispatched is the honest answer. Using the real web fallback in your regression test was a great call, since that's exactly what produced the TypeError. Your commit is in #33284 unchanged and with your authorship. On top of it we added a few things: a standalone desktop's own SSH host keeps its previous "not connected" wording, so it isn't told to "add the SSH host on your computer"; the desktop's local IPC message is left as it was; a re-export is dropped; and a headless paired e2e now covers it. Closing this in favour of #33284, which carries your work. Really appreciate the contribution!

@nwparker nwparker closed this Oct 25, 2026
@MokiMeow
MokiMeow deleted the fix/refuse-unsupported-ssh-project-setup branch November 6, 2026 17:16
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.

[Bug]: Headless server (Electron host): projects cannot be set up on its SSH hosts from a paired client

2 participants