Skip to content

fix(sidebar): keep project groups under their execution host - #19642

Closed
nolouch wants to merge 1 commit into
stablyai:mainfrom
nolouch:nolouch/fix-by-host
Closed

nolouch wants to merge 1 commit into
stablyai:mainfrom
nolouch:nolouch/fix-by-host

Conversation

@nolouch

@nolouch nolouch commented Sep 8, 2026 •

Copy link
Copy Markdown

ELI5

In “filter host” view, project groups now stay under their own host. Local groups no longer appear above Local Mac when collapsed or repeat under a remote host when expanded.

What Changed

Resolve project-group header ownership with the existing sidebar host resolver before bucketing rows into host sections. Folder-workspace bucketing, lane counts, and reveal now reuse the executionHostId-aware filter resolver, keeping runtime-owned folder children with their group. Add regression coverage for empty and collapsed groups, host collapse, nested groups, SSH/runtime ownership, and folder workspaces.

Why

Project-group headers were treated as generic lane headers: unused headers escaped to the top of the list, while expanded headers were copied into subsequent host sections. A project group has its own host identity and should be routed directly.

Linked Issue

Fixes #19643

Visual Proof

Before: see the annotated screenshot in #19643 (remote host name redacted). After: pending Electron capture. No rendered UI validation was performed because the required Electron skill was unavailable in the development environment.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated

On macOS, 71 tests passed across eight related sidebar suites with ORCA_BACKGROUND_LAUNCH=1, covering host sections, project groups, folder-workspace lane counts and IDs, host filtering, and reveal. New regressions reproduce runtime-owned folder groups splitting from their children before the fix, both with explicitly stamped workspaces and with ownership inherited from the group. They also verify collapse and reveal use the same host.

Frontend typecheck (tsc --noEmit -p config/tsconfig.tc.web.json), changed-file oxlint, formatting, and git diff --check passed. SSH/runtime ownership is covered with fixtures; no live remote or Windows/Linux app testing was performed. Full lint, typecheck, test suite, and build remain for CI.

AI Disclosure

Implemented with OpenAI Codex assistance.

Review

Reuses the sidebar host resolver, including explicit runtime ownership and SSH/default-host fallback. No RPC or wire-format changes.

Agent skill upstream boundary

  • Not applicable; no agent skill source changes.

Checklist

  • This PR is small and focused
  • I explained what changed and why (including ELI5)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered
  • Full lint, typecheck, tests, and build pass (CI pending)

@coderabbitai

coderabbitai Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview 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: b97b85f4-912a-4f33-8151-be1b8d7be6c8

📥 Commits

Reviewing files that changed from the base of the PR and between f00a936a4969dbfd366cb3a673b974ca5a2d4b52 and d6ec6dc.

📒 Files selected for processing (3)
  • src/renderer/src/components/sidebar/folder-workspace-host-id.ts
  • src/renderer/src/components/sidebar/host-section-project-groups.test.ts
  • src/renderer/src/components/sidebar/host-section-rows.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The sidebar now resolves project-group headers through project-group host identity. Folder-workspace host resolution uses the shared host-filtering helper and supports executionHostId. Tests cover local and remote placement, collapsed hosts, nested and empty groups, default runtime routing, and folder-workspace ordering.

Priority: ➖ Normal

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to d6ec6

The sidebar host-routing change includes coverage for the affected local, remote, nested, collapsed, and folder-workspace paths. No current merge-blocking risk is identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Issue #19643 requires project groups to remain under the owning host, appear once, and preserve this hierarchy for expansion and collapse states. host-section-rows.ts now resolves project-group head…
Out of Scope Changes check ✅ Passed The changed files support issue #19643. The resolver alignment prevents project groups and folder-workspace children from being placed in the wrong host section. The added tests verify the required ho…
Title check ✅ Passed The title clearly and concisely describes the primary change: keeping project groups under their owning execution host in the sidebar.
Description check ✅ Passed The description covers the required sections, explains the problem and solution, links issue #19643, documents automated testing, and records remaining CI and platform-testing limits. Visual proof is …
  • Fix all pre-merge checks with AI

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.

@pullfrog pullfrog 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.

ℹ️ No critical issues — one edge case worth confirming before merge.

Reviewed changes

  • Project-group header host routing — getRowHostId (host-section-rows.ts) now resolves a header row's host from row.projectGroup via getProjectGroupExecutionHostIdForRows instead of falling through to row.repo / null, so project-group headers bucket into their own host section rather than escaping to the top when unused or duplicating into subsequent sections when expanded. The id != null guard correctly leaves the Ungrouped pseudo-group on the existing path.
  • Regression coverage — the new host-section-project-groups.test.ts pins local/collapsed groups, empty nested groups with runtime/SSH/default ownership, folder workspaces, and collapsed-host behavior with exact (toEqual/toMatchObject/length) assertions.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@nolouch
nolouch force-pushed the nolouch/fix-by-host branch from f00a936 to d6ec6dc Compare September 16, 2026 03:28

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes

  • Folder-workspace render host now matches the filter resolver — getFolderWorkspaceHostId (folder-workspace-host-id.ts) delegates to getFolderWorkspaceExecutionHostIdForRows, so a folder workspace row buckets by executionHostId before connectionId/defaultHostId. This resolves the prior finding: a runtime-owned folder group's header and its folder children now land under the same host section. Param Pick types widened to require executionHostId.
  • getRowHostId doc — added a JSDoc noting that a null return marks lane headers that get distributed across their children's hosts.
  • Regression coverage expanded — the single folder-workspace case became a three-way it.each (unstamped → local, runtime-stamped workspace, runtime group without a workspace stamp) asserting header/child colocation, host counts, lane IDs, reveal keys, and collapse. The pre-fix behaviour fails these assertions, so they are load-bearing.

Verified locally: 6 tests in the new suite, 30 across the host-section suites, 32 repos-project-groups, and 25 worktree-list-groups/runtime/folder-catalog tests pass; frontend typecheck is clean.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@nolouch

nolouch commented Oct 7, 2026

Copy link
Copy Markdown
Author

close by #25737

@nolouch nolouch closed this Oct 7, 2026
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]: Host grouping duplicates project groups and leaves local groups outside Local Mac

1 participant