Skip to content

Keep migrated folder workspaces under their Remote host - #26535

Merged
OrcaWin merged 1 commit into
mainfrom
nwparker/remote-folder-host-grouping
Oct 9, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
nwparker/remote-folder-host-grouping

Conversation

@nwparker

@nwparker nwparker commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​121 $\color{#cf222e}{\Huge{\mathbf{−}}}$​79 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​42
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​6 $\color{#cf222e}{\Huge{\mathbf{−}}}$​14 $\color{#cf222e}{\Huge{\mathbf{−}}}$​8

ELI5

After an SSH machine moves to Remote, its folders should still appear under that machine. Orca's host filter knew their new owner, but the sidebar heading and reveal code still looked only at the old SSH connection. They could put a remote folder under “Local Mac” and collapse or reveal the wrong section.

What Changed

Use the existing folder host resolver for headings, counts and reveal as well as filtering. It respects the folder's explicit execution host, then its project group's host, before the existing SSH/default fallbacks.

Why

Keeping one ownership rule fixes the disagreement at its source. Patching only the label would leave collapse and reveal wrong. No migration or file-operation routing changes are needed: the folder already carries the correct Remote owner.

Linked Issue

Follow-up to the SSH → Remote rollout in #26483. This PR is based directly on OrcaWin/phase35; it does not depend on #26531.

Visual Proof

A normal first-launch upgrade from a relay-era profile, with a real local project and a real Linux SSH repository plus folder workspace. No injected failures.

Before: the migrated folder is incorrectly under Local Mac.

Before

After: the folder sits beside its repository under the named Remote machine.

After

Testing

  • I manually tested these changes locally

  • Automated tests added/updated

  • Real macOS arm64 Electron client, hidden renderer, Debian arm64 SSH container, packaged Phase 3.5 server template. All launches use ORCA_BACKGROUND_LAUNCH=1.

  • The unchanged integration build fails the DOM assertion: the migrated folder's preceding machine header is local, when its owner is runtime:<managed host>.

  • The same upgrade journey passes 3 consecutive runs with this fix, including clicking the Remote header to collapse and expand its folder.

  • 50 affected tests pass. Six new runtime-host collapse/reveal cases fail without the fix; the six equivalent SSH cases continue to pass.

  • pnpm tc, pnpm lint, the changed-code quality gate and electron-vite build --mode e2e pass.

  • Full typecheck:e2e still has existing errors in unrelated fixtures; none are reported in this PR's files. Windows execution was not performed locally. No OS-specific production behavior was added.

ORCA_BACKGROUND_LAUNCH=1 SKIP_BUILD=1 ORCA_E2E_SSH_DOCKER=1 \
ORCA_E2E_ORCAD_CONVERT_HOST=docker \
ORCA_E2E_ORCAD_CONVERT_TEMPLATE=/absolute/path/to/orcad-template \
pnpm run test:e2e tests/e2e/ssh-orcad-auto-convert.spec.ts \
--workers=1 -g 'first connect after upgrading' --repeat-each=3

The rendered assertion extends the existing Linux conversion CI test.

Unfixed failure log · Three passing upgrade runs

AI Disclosure

Review

Self-reviewed explicit host precedence, legacy SSH fallback, header counts, collapse/reveal and unchanged file-operation ownership.

Agent skill upstream boundary

  • Not applicable; no upstream skill source copied.

Notes

No remote wire or persisted-data changes. No new colors, component styles or keyboard behavior. Git and provider-specific behavior are unchanged. Folder workspaces are exercised directly.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • Before/after screenshots attached
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered
  • Local lint, typecheck, affected tests and Electron build pass; CI covers the broader suite

@OrcaWin
OrcaWin force-pushed the nwparker/remote-folder-host-grouping branch from dd6322e to c3b7217 Compare October 9, 2026 02:04
@OrcaWin
OrcaWin changed the base branch from OrcaWin/phase35 to main October 9, 2026 02:04
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8e28afe1-7d45-462e-b4ff-fc95f2b8677c
📥 Commits

Reviewing files that changed from the base of the PR and between 37833ce and c3b7217.

📒 Files selected for processing (3)
  • src/renderer/src/components/sidebar/folder-workspace-host-id.ts
  • src/renderer/src/components/sidebar/host-section-collapse-folders.test.ts
  • tests/e2e/ssh-orcad-auto-convert.spec.ts

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


📝 Walkthrough

Walkthrough

The folder workspace host ID helper now accepts execution host IDs for both the workspace and project group, and delegates host resolution to a shared helper. Sidebar tests cover collapse and reveal-key behavior for SSH and managed runtime hosts across three grouping modes. The end-to-end conversion test registers a repository path before seeding relay-era rows, then verifies that the converted runtime host appears in the sidebar and that its header hides and restores the folder.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to c3b72

No actionable issue remains; the change is ready to merge after normal checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files.
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.
Title check Passed The title clearly summarizes the primary change: keeping migrated folder workspaces grouped under their Remote host.
Description check Passed The description is complete and addresses the required sections. It explains the user impact, implementation, rationale, linked issue, visual proof, testing, review notes, scope, and checklist status.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autopilot · 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.

@OrcaWin
OrcaWin merged commit 978c32b into main Oct 9, 2026
48 of 72 checks passed
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.

2 participants