Skip to content

feat(sidebar): organize and nest client project groups - #19125

Open
sousaakira wants to merge 17 commits into
stablyai:mainfrom
sousaakira:feat/sidebar-client-groups-nesting
Open

sousaakira wants to merge 17 commits into
stablyai:mainfrom
sousaakira:feat/sidebar-client-groups-nesting

Conversation

@sousaakira

Copy link
Copy Markdown

Summary

  • Add a client focus switcher and empty client folders so the sidebar can show one company's projects at a time.
  • Allow nesting clients under other clients (parentGroupId): create inside from the group menu / focused switcher, and Move into another client (including Top level) from the group ⋯ menu.
  • Persist/API updates accept optional parentGroupId with cycle guards; menus show hierarchy when moving projects or groups.

Test plan

  • Create two root clients (e.g. Akira, Data Lake) via the building icon
  • On Data Lake ⋯, choose Move into another client → Akira and confirm nesting + indentation
  • From Akira ⋯, use New client inside… and confirm the child appears under Akira
  • Focus Akira and confirm the subtree (nested clients + projects) is shown; clear focus to see all
  • Move a repo into a nested client via Move to group
  • Move a nested client back to Top level
  • Confirm rename/delete still work; deleting a parent removes the nested subtree from groups (repos ungroup)

Made with Cursor

sousaakira and others added 2 commits September 6, 2026 17:54
Add empty client folders and a persisted focus filter so multi-client
workflows can show one company's projects at a time in the sidebar.

Co-authored-by: Cursor <[email protected]>
Allow creating and moving project groups into a parent client so multi-client trees (e.g. Akira → Data Lake) can be organized from the group menu and focus switcher.

Co-authored-by: Cursor <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview 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
📝 Walkthrough

Walkthrough

Adds nested project-group creation, reparenting, cycle prevention, sibling ordering, and API support. Adds persisted, pairing-local project-group focus with subtree filtering across the sidebar. Adds menus and dialogs for selecting, creating, moving, and assigning projects to nested groups. Updates sidebar headers, labels, filters, viewport wiring, and localization. Adds tests for hierarchy, focus, routing, and assignment. Updates packaged runtime detection for node:sqlite.

Priority: ➖ Normal

Merge Risk: 🟡 Moderate · up to 2da65

Nested client organization can prevent moving clients or projects to valid destinations outside the current client scope and can show an incorrect non-empty sidebar under filters. Additionally, rolling release tags may identify a different commit than the uploaded binaries, creating a release integrity risk that should be resolved before merge.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the main behavior and provides a relevant test plan, but it omits most required template sections. It has no ELI5, Why, Linked Issue, Visual Proof, Testing checklist, Review, … Complete the repository template. Add an ELI5 explanation, detailed What Changed and Why sections, a linked issue after Fixes #, visual proof or N/A with a reason, testing details and checked test items, AI disclosure details if applica…
Docstring Coverage ⚠️ Warning Docstring coverage is 40.91% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 44 functions across 49 files. (1 skipped:… 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 summarizes the main changes: sidebar client organization and nested project groups.
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.
Full details: Description check

Explanation

The description explains the main behavior and provides a relevant test plan, but it omits most required template sections. It has no ELI5, Why, Linked Issue, Visual Proof, Testing checklist, Review, Notes, or repository checklist content.

Resolution

Complete the repository template. Add an ELI5 explanation, detailed What Changed and Why sections, a linked issue after Fixes #, visual proof or N/A with a reason, testing details and checked test items, AI disclosure details if applicable, Review, Agent skill upstream boundary, Notes, and the required checklist confirmations.

Full details: Docstring Coverage

Explanation

Docstring coverage is 40.91% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 44 functions across 49 files. (1 skipped: 1 unsupported.)


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

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: d6b550e5-4c38-4dc0-8701-b8cc46912a2e

📥 Commits

Reviewing files that changed from the base of the PR and between 59fe826 and 4ee7083.

📒 Files selected for processing (43)
  • src/main/ipc/repos/repo-ipc-arg-schemas.ts
  • src/main/persistence-repo-lifecycle.test.ts
  • src/main/persistence/tracking-repos/project-group-operations.ts
  • src/main/runtime/rpc/methods/client-ui-pairing-local-fields.test.ts
  • src/main/runtime/rpc/methods/client-ui-schemas.ts
  • src/main/runtime/rpc/methods/repo.ts
  • src/main/runtime/runtime-project-group-controller.ts
  • src/preload/api/repository-api.ts
  • src/renderer/src/components/sidebar/SidebarClientScopeSwitcher.tsx
  • src/renderer/src/components/sidebar/SidebarHeader.tsx
  • src/renderer/src/components/sidebar/WorktreeList.tsx
  • src/renderer/src/components/sidebar/project-group-menu-labels.test.ts
  • src/renderer/src/components/sidebar/project-group-menu-labels.ts
  • src/renderer/src/components/sidebar/sidebar-filter-actions.ts
  • src/renderer/src/components/sidebar/sidebar-filter-state.test.ts
  • src/renderer/src/components/sidebar/sidebar-header-actions.tsx
  • src/renderer/src/components/sidebar/visible-worktree-kinds.ts
  • src/renderer/src/components/sidebar/worktree-list/listing/use-filters.ts
  • src/renderer/src/components/sidebar/worktree-list/listing/use-host-visible-scope.ts
  • src/renderer/src/components/sidebar/worktree-list/listing/use-visible-worktrees.test.tsx
  • src/renderer/src/components/sidebar/worktree-list/rows/ProjectGroupDialogs.tsx
  • src/renderer/src/components/sidebar/worktree-list/rows/SectionHeader.tsx
  • src/renderer/src/components/sidebar/worktree-list/rows/project-group-header-actions.tsx
  • src/renderer/src/components/sidebar/worktree-list/rows/repo-header-project-actions.tsx
  • src/renderer/src/components/sidebar/worktree-list/rows/use-project-group-dialogs.ts
  • src/renderer/src/components/sidebar/worktree-list/viewport/viewport-props.ts
  • src/renderer/src/components/sidebar/worktree-list/viewport/virtual-row-context.ts
  • src/renderer/src/store/project-groups/project-group-mutations.ts
  • src/renderer/src/store/repos/repo-state.ts
  • src/renderer/src/store/slices/repos-project-groups.test.ts
  • src/renderer/src/store/slices/ui/ui-slice-contract-preferences.ts
  • src/renderer/src/store/slices/ui/ui-slice-hydration-actions.ts
  • src/renderer/src/store/slices/ui/ui-slice-preference-actions.ts
  • src/renderer/src/web/preload-api/web-preference-normalization.ts
  • src/renderer/src/web/web-preload-api-ui.test.ts
  • src/shared/constants.ts
  • src/shared/pairing-local-ui-fields.test.ts
  • src/shared/pairing-local-ui-fields.ts
  • src/shared/persisted-ui-state-types.ts
  • src/shared/project-group-focus.test.ts
  • src/shared/project-group-focus.ts
  • src/shared/project-groups.test.ts
  • src/shared/project-groups.ts

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

Comment on lines +67 to +69
/** Sidebar client/group focus; null = show every project group. */
focusedProjectGroupId: string | null
setFocusedProjectGroupId: (groupId: string | null) => void

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.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

rg -n -C 5 \
  'setFocusedProjectGroupId|focusedProjectGroupId|PersistedUIWriteBaseline|capturePersistedUIWriteBaseline|diffPersistedUIWriteFields|ui\.set' \
  src/renderer/src/store src/shared

Repository: stablyai/orca

Length of output: 50370


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- persisted baseline ---'
cat -n src/renderer/src/store/slices/ui/persisted-ui-write-baseline.ts

printf '%s\n' '--- focused setter and writer references ---'
rg -n -C 12 \
  'setFocusedProjectGroupId|focusedProjectGroupId|diffPersistedUIWriteFields|persistedUIWriteBaseline' \
  src/renderer/src/store/slices/ui src/renderer/src/App.tsx

Repository: stablyai/orca

Length of output: 274


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

baseline_file="$(git ls-files | awk -F/ '$NF == "persisted-ui-write-baseline.ts" {print; exit}')"
printf 'baseline=%s\n' "$baseline_file"
cat -n "$baseline_file"

printf '%s\n' '--- writer and baseline references ---'
rg -n -C 10 \
  'focusedProjectGroupId|diffPersistedUIWriteFields|capturePersistedUIWriteBaseline|persistedUIWriteBaseline' \
  src/renderer/src/store src/renderer/src/App.tsx 2>/dev/null

Repository: stablyai/orca

Length of output: 155


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

baseline_file="$(git ls-files | awk -F/ '
  $NF == "persisted-ui-write-baseline.ts" {
    if (!found) { print; found=1 }
  }
')"
printf 'baseline=%s\n' "$baseline_file"
cat -n "$baseline_file"

printf '%s\n' '--- writer and baseline references ---'
rg -n -C 10 \
  'focusedProjectGroupId|diffPersistedUIWriteFields|capturePersistedUIWriteBaseline|persistedUIWriteBaseline' \
  src/renderer/src/store src/renderer/src/App.tsx 2>/dev/null

Repository: stablyai/orca

Length of output: 50369


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

rg -n -C 14 \
  'PERSISTED_UI_WRITE_BASELINE_FIELDS|persistedUIWriteFieldsToWireUpdate|diffPersistedUIWriteFields|persistedUIWriteBaseline|ui\.set' \
  src/renderer/src/App.tsx

Repository: stablyai/orca

Length of output: 151


Include focusedProjectGroupId in the persisted UI write baseline.

setFocusedProjectGroupId writes through window.api.ui.set, but PersistedUIWriteBaseline and its field set omit focusedProjectGroupId. Hydration therefore cannot preserve a local focus change when a synchronization update arrives, because the diff does not include this field. Add it to the baseline and field set.

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

Important

This PR adds 22 new translate() keys under the auto.* namespace but never seeds en.json, so the verify:localization-catalog step of pnpm lint fails in CI (confirmed by running the script). The keys also use readable suffixes (allClients, newClientInside, …) instead of the 10-char hash ids every other auto.* key uses. Seed the catalog with hashed keys before merge.

Reviewed changes

  • Client focus switcher — a new SidebarClientScopeSwitcher dropdown in the sidebar header focuses one client's subtree; an effect clears stale focus after a focused client is deleted.
  • Nested clients (parentGroupId) — New client inside… and Move into another client / Top level flows wired through store → persistence → RPC, with cycle guards and per-sibling tab-order placement.
  • Focus filtering — useSidebarHostVisibleScope narrows repos/groups/folder-workspaces to the focused subtree; focusedProjectGroupId is persisted as a pairing-local UI preference and reset by Clear Filters.
  • Hierarchy in menus — flattenProjectGroupsForMenu + formatProjectGroupMenuLabel indent nested client names in the Move-to-group / Move-into menus.

⚠️ Missing localization catalog entries

22 new translate() calls reference keys that are absent from src/renderer/src/i18n/locales/en.json, which fails pnpm lint at the verify:localization-catalog step. They also diverge from the auto.* key convention (auto.<path>.<sha1(filePath:text)[0:10]>), so they need to be regenerated, not just added verbatim.

Technical details
# Missing localization catalog entries

## Affected sites
- 22 keys across `SidebarClientScopeSwitcher.tsx`, `worktree-list/rows/ProjectGroupDialogs.tsx`,
  `worktree-list/rows/project-group-header-actions.tsx`, `worktree-list/rows/use-project-group-dialogs.ts`.
- `config/scripts/verify-localization-catalog.mjs` (run without `--fix`) reports all 22 as missing from
  `src/renderer/src/i18n/locales/en.json`.

## Required outcome
- `pnpm lint` → `verify:localization-catalog` passes.
- Keys use the hashed form `auto.<path>.<sha1(filePath:text)[0:10]>` and live in `en.json`.
  Non-English locales may lag (i18next falls back to English) per the verify script's design.

## Suggested approach
- `config/scripts/localize-renderer-strings.mjs` wraps raw strings and generates hashed keys + catalog
  entries; re-run it (or the equivalent sync path) so the 22 keys land in `en.json` with hashed ids.

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

sousaakira and others added 3 commits September 8, 2026 08:14
Assign newly added repos to the focused/nested client, surface group header
nesting actions, and add a personal fork workflow for Linux/Windows/macOS arm64 builds.

Co-authored-by: Cursor <[email protected]>
Unquoted colons in description strings prevented GitHub from registering workflow_dispatch.

Co-authored-by: Cursor <[email protected]>
computer-use-macos requires swift-tools-version 6.0; macos-14 only ships 5.10.

Co-authored-by: Cursor <[email protected]>

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

Important

The localization catalog is still unseeded, so pnpm lint still fails at verify:localization-catalog — now 24 missing auto.* keys, up from the 22 flagged in the prior review (this commit added addProjectToClient and addProjectToClientNamed). Seed en.json before merge, and drop the personal fork build workflow that came along with this commit.

Reviewed changes

  • Add-project-on-client affordance — a + button and Add project… menu item on each client header open the add-repo flow pre-targeting that client, so a newly added project lands inside it.
  • Post-add assignment helper — assign-added-repo-to-target-client.ts reads the target from modalData at completion time and moves an ungrouped repo into the client, or re-parents a nested "import as group" result under it.
  • Header-actions refactor — SectionHeaderRowContext was extracted to section-header-row-context.ts, and the menu/+/create-workspace buttons were consolidated into ProjectGroupHeaderTrailingActions.
  • Move-to-group menu hierarchy — RepoHeaderProjectActionsMenu now indents nested clients via flattenProjectGroupsForMenu/formatProjectGroupMenuLabel.
  • Wire schema + misc — ProjectGroupUpdateArgs gained an optional parentGroupId; node:sqlite/sqlite were marked builtin in the packaged runtime.

⚠️ Localization catalog still unseeded — now 24 keys

The verify:localization-catalog step of pnpm lint is still failing. Running config/scripts/verify-localization-catalog.mjs reports 24 missing keys; this commit added two more (addProjectToClient, addProjectToClientNamed) without seeding en.json, and the keys still use readable suffixes instead of the hashed auto.<path>.<sha1(filePath:text)[0:10]> convention.

Technical details
# Localization catalog still unseeded

## Affected sites
- 24 `auto.*` keys across `SidebarClientScopeSwitcher.tsx`, `worktree-list/rows/ProjectGroupDialogs.tsx`,
  `worktree-list/rows/project-group-header-actions.tsx`, `worktree-list/rows/use-project-group-dialogs.ts`.
- `config/scripts/verify-localization-catalog.mjs` reports all 24 missing from `src/renderer/src/i18n/locales/en.json`.

## Required outcome
- `pnpm lint` → `verify:localization-catalog` passes.
- Keys use the hashed form `auto.<path>.<sha1(filePath:text)[0:10]>` and live in `en.json`.

## Suggested approach
- Run `pnpm run sync:localization-catalog` so all 24 keys land in `en.json` with hashed ids.

⚠️ Personal fork build workflow committed to this PR

.github/workflows/personal-desktop-build.yml is a 240-line fork-only desktop builder for sousaakira/orca that does nothing on stablyai/orca. It is unrelated to the sidebar-nesting feature and, along with the unrelated node:sqlite builtins change in config/packaged-runtime-node-modules.cjs, looks like a stray commit that should be dropped before merge.

Technical details
# Personal fork build workflow in upstream PR

## Affected sites
- `.github/workflows/personal-desktop-build.yml` — fork-only builder (guarded by `if: github.repository == 'sousaakira/orca'`).
- `config/packaged-runtime-node-modules.cjs` — adds `sqlite` / `node:sqlite` to `NODE_BUILTINS`.

## Required outcome
- Confirm with a maintainer whether these belong in `stablyai/orca`, or remove them from the PR.

## Open questions for the human
- Is the workflow intentionally part of this change, or a stray commit?
- Is the `node:sqlite` packaging fix required for this PR, or does it belong in a separate change?

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

@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 (1)
src/renderer/src/components/sidebar/WorktreeList.tsx (1)

167-167: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Scope viewport inputs to the focused collections.

usePendingSidebarReveal passes these collections to expandGroupsForWorktreeReveal. That helper can toggle collapsed groups for a worktree or folder workspace outside the focused subtree before it finds a rendered row. The same unfiltered folderWorkspaces also refreshes path status for hidden workspaces. Pass the focused collections to the viewport; keep drag and selection row-derived.

🧹 Nitpick comments (1)
config/packaged-runtime-node-modules.cjs (1)

73-73: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Drop the bare 'sqlite' entry and keep only 'node:sqlite'.

builtinModules contains node:sqlite, not sqlite. The bare specifier resolves to the npm package sqlite. Keeping it in NODE_BUILTINS causes isPackagedExternalSpecifier('sqlite') to skip that package during runtime dependency discovery.

♻️ Proposed change
   // Why: Electron 43+ ships node:sqlite; packaging hosts on Node 22 omit it from builtinModules.
-  'sqlite',
   'node:sqlite'

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 873c8b43-55de-4b16-975c-5d8f060e97cd

📥 Commits

Reviewing files that changed from the base of the PR and between 4ee7083 and cc75a2e.

📒 Files selected for processing (13)
  • .github/workflows/personal-desktop-build.yml
  • config/packaged-runtime-node-modules.cjs
  • src/renderer/src/components/sidebar/SidebarClientScopeSwitcher.tsx
  • src/renderer/src/components/sidebar/WorktreeList.tsx
  • src/renderer/src/components/sidebar/assign-added-repo-to-target-client.test.ts
  • src/renderer/src/components/sidebar/assign-added-repo-to-target-client.ts
  • src/renderer/src/components/sidebar/use-complete-git-repo-add.ts
  • src/renderer/src/components/sidebar/useAddRepoNestedImportFlow.ts
  • src/renderer/src/components/sidebar/worktree-list/rows/SectionHeader.tsx
  • src/renderer/src/components/sidebar/worktree-list/rows/project-group-header-actions.tsx
  • src/renderer/src/components/sidebar/worktree-list/rows/section-header-row-context.ts
  • src/renderer/src/components/sidebar/worktree-list/viewport/viewport-props.ts
  • src/renderer/src/components/sidebar/worktree-list/viewport/virtual-row-context.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/renderer/src/components/sidebar/SidebarClientScopeSwitcher.tsx

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

Comment on lines +237 to +240
gh release create "$RELEASE_TAG" "${assets[@]}" \
--repo "$GH_REPO" \
--title "Personal Desktop (${version} / ${sha})" \
--notes "$notes"

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.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Pass the full build commit to gh release create with --target.

--cleanup-tag removes the existing personal-desktop tag. Without --target, the subsequent gh release create recreates the tag at the repository default branch. The publish job checks out the requested ref again and records only its short SHA, so it does not have the immutable commit that produced the artifacts. Record the full SHA in the build job, pass it to publish, and use it for both the publish checkout and --target.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
gh release create "$RELEASE_TAG" "${assets[@]}" \
--repo "$GH_REPO" \
--title "Personal Desktop (${version} / ${sha})" \
--notes "$notes"
gh release create "$RELEASE_TAG" "${assets[@]}" \
--repo "$GH_REPO" \
--target "$sha" \
--title "Personal Desktop (${version} / ${sha})" \
--notes "$notes"

Bring Orca updates through current main (v1.4.198 line and later). Keep client
scope switcher / focused title and adopt upstream create-menu header actions.

Co-authored-by: Cursor <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

Seed hashed localization keys, drop the fork-only desktop workflow from the
PR, list nested clients in the focus switcher, clear focus when leaving repo
grouping, scope viewport inputs to the focused subtree, and keep only
node:sqlite in packaged builtins.

Co-authored-by: Cursor <[email protected]>

@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 — this increment is a review-address commit that resolves every previously flagged concern.

  • Dropped the personal fork build workflow — removed .github/workflows/personal-desktop-build.yml, the fork-only desktop builder, clearing the scope-creep flag.
  • Trimmed the packaged runtime builtins — removed the stray bare 'sqlite' entry, keeping only 'node:sqlite' in config/packaged-runtime-node-modules.cjs.
  • Regenerated and seeded localization keys — all 24 auto.* keys now use the hashed sha1(filePath:text)[0:10] convention and live in en.json; verify:localization-catalog passes (exit 0), resolving the CI blocker.
  • Hierarchical focus switcher — SidebarClientScopeSwitcher now lists the full client tree via flattenProjectGroupsForMenu, so nested clients appear and the checkmark keys off resolvedFocusId === group.id.
  • Cleared focus on leaving repo grouping — setGroupBy now nulls focusedProjectGroupId when switching away from repo, so the hidden subtree filter can't silently persist.
  • Scoped viewport inputs to the focused subtree — WorktreeList feeds focusedVisibleWorktrees, visibleFolderWorkspacesForRows, and visibleProjectGroupsForRows into the viewport, so reveal/collapse and path-status work can't leak to rows outside focus.

Prior Pullfrog threads were addressed and retired this run.

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

@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 (1)
src/renderer/src/components/sidebar/WorktreeList.tsx (1)

277-277: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use the focused worktree count for the empty-state check.

When a client focus is active, the row model and viewport use focusedVisibleWorktrees, but shouldFiltersHideAllRows still receives visibleWorktrees.length. If a filter matches a worktree outside the focused client and matches none inside it, the global count stays non-zero. The sidebar can then keep rendering client headers instead of the “Clear Filters” empty state. Pass focusedVisibleWorktrees.length here.

Suggested fix
   const filtersHideAllRows = shouldFiltersHideAllRows({
     hasFilters,
-    visibleWorktreeCount: visibleWorktrees.length,
+    visibleWorktreeCount: focusedVisibleWorktrees.length,

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: e6241fa5-a824-45da-a7fb-50945403c9ec

📥 Commits

Reviewing files that changed from the base of the PR and between 15c8841 and 2da6532.

📒 Files selected for processing (9)
  • config/packaged-runtime-node-modules.cjs
  • src/renderer/src/components/sidebar/SidebarClientScopeSwitcher.tsx
  • src/renderer/src/components/sidebar/WorktreeList.tsx
  • src/renderer/src/components/sidebar/sidebar-header-actions.tsx
  • src/renderer/src/components/sidebar/worktree-list/rows/ProjectGroupDialogs.tsx
  • src/renderer/src/components/sidebar/worktree-list/rows/project-group-header-actions.tsx
  • src/renderer/src/components/sidebar/worktree-list/rows/use-project-group-dialogs.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/store/slices/ui/ui-slice-preference-actions.ts
💤 Files with no reviewable changes (1)
  • config/packaged-runtime-node-modules.cjs
🚧 Files skipped from review as they are similar to previous changes (4)
  • src/renderer/src/components/sidebar/worktree-list/rows/use-project-group-dialogs.ts
  • src/renderer/src/components/sidebar/worktree-list/rows/ProjectGroupDialogs.tsx
  • src/renderer/src/components/sidebar/sidebar-header-actions.tsx
  • src/renderer/src/components/sidebar/worktree-list/rows/project-group-header-actions.tsx

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

sousaakira and others added 2 commits September 8, 2026 18:27
Use focused worktree count for the Clear Filters empty state, but pass the
full project-group catalog to header menus so reparent targets outside the
focused subtree stay available.

Co-authored-by: Cursor <[email protected]>
Focused row rendering stays scoped; header reparent/move menus need every
client so destinations outside the current focus remain available.

Co-authored-by: Cursor <[email protected]>

@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 minor suggestion inline.

Reviewed changes

  • Focused-empty-state count — shouldFiltersHideAllRows now receives focusedVisibleWorktrees.length instead of visibleWorktrees.length, so an active client focus plus a filter that only matches out-of-focus worktrees correctly falls through to the Clear Filters empty state.
  • Full project-group catalog for move/reparent menus — the viewport's projectGroups prop reverted from visibleProjectGroupsForRows back to the full catalog (with a comment), so reparent destinations outside the focused subtree stay available while row rendering remains scoped.

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

projectGrouping={projectGrouping}
// Why full catalog: move/reparent menus need destinations outside the focused subtree;
// row rendering already scopes via visibleProjectGroupsForRows above.
projectGroups={projectGroups}

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.

Passing the full projectGroups catalog reaches more than the move/reparent menus — VirtualizedWorktreeViewport also feeds it into useFolderWorkspacePathStatusRows, which force-probes fetchFolderWorkspacePathStatus for every folder-backed group (use-folder-path-statuses.ts:84). With a client focused, each focus change re-runs that effect and re-probes every other client's hidden groups, re-opening the group-side of the viewport leak 2da6532 scoped away. Consider keeping the viewport prop scoped and letting the menu components pull the full catalog from the store (they already have useAppStore access), or threading a separately-scoped group list to the path-status hook.

Technical details
# Full project-group catalog leaks into path-status probes

## Affected sites
- src/renderer/src/components/sidebar/WorktreeList.tsx:374 — `projectGroups={projectGroups}` reverted from the scoped `visibleProjectGroupsForRows`.
- src/renderer/src/components/sidebar/worktree-list/viewport/VirtualizedWorktreeViewport.tsx:122 — passes `projectGroups` to `useFolderWorkspacePathStatusRows`.
- src/renderer/src/components/sidebar/worktree-list/listing/use-folder-path-statuses.ts:84 — loops `for (const group of projectGroups)` and `force: true`-probes every group with `parentPath`.

## Required outcome
- Focusing a client does not re-probe folder path status for project groups outside the focused subtree.
- The move/reparent menus keep access to the full catalog.

## Suggested approach
- The menu components (`ProjectGroupHeaderTrailingActions`, `RepoHeaderProjectActionsMenu`) already sit under a global `useAppStore`; have them read `s.projectGroups` directly and keep the viewport prop scoped to `visibleProjectGroupsForRows`, or pass a second scoped list to the path-status hook.

sousaakira and others added 5 commits September 9, 2026 11:10
Bring latest Orca main (~77 commits) onto the client-nesting branch.
Linux users can place the custom minimize/maximize/close cluster on the left (macOS-style) via Appearance settings, without changing the default right-side layout.

Co-authored-by: Cursor <[email protected]>
Align the chrome-side test with navigator-based platform detection, gate Appearance search on an explicit Linux flag, and stop rewriting document CSS vars on every render from a fresh insets object.

Co-authored-by: Cursor <[email protected]>
Keep client scope switcher with upstream's split create/add header actions.

Co-authored-by: Cursor <[email protected]>

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

Important

This increment pushes an unrelated feature — Linux window-controls positioning — onto the sidebar client-groups branch. It shares no files with the PR's stated scope; confirm it belongs here or split it into its own PR before merging.

Reviewed changes

  • Linux window-controls position setting — a new windowControlsPosition global setting (default right) and normalizeWindowControlsPosition/resolveWindowControlsSide helpers in src/shared/window-controls-position.ts; Windows and macOS are forced back to the right-side convention.
  • Side-aware chrome rendering — WindowControls gained a side prop (GNOME close/min/max order on the left, Windows order on the right), and the CSS vars split into --window-controls-left/--window-controls-right/--window-controls-right-edge-height so every formerly right-anchored inset (titlebar spacer, right-sidebar header, artifacts header, tab-group panel, automations top bar) follows the preference.
  • Settings UI + search index — a Linux-only segmented control on the Appearance pane, wired into appearance-search.ts behind showWindowControlsPosition, with en.json seeded.
  • Tests — new window-controls-position.test.ts and app-window-chrome.test.ts cover normalization, platform gating, and inset placement.

⚠️ Unrelated window-controls feature stacked on the sidebar PR

The three commits in this increment (beb4799ea9, 5c2912c544, 69b8db2316) build a complete Linux window-controls-positioning feature across 27 files, none of which overlap the sidebar client-groups work the PR title and body describe. 5c2912c544 ("address window-controls PR review feedback") even references a separate review loop, which strongly suggests this belongs to its own PR and was pushed here by accident — or the branch is now tracking two independent efforts. Merging as-is would land an unannounced feature under a misleading title and couple two unrelated changes' revert granularity. Split the window-controls work into its own PR, or confirm with a maintainer that both are intended to land together.

Technical details
# Unrelated window-controls feature in PR #19125

## Affected sites
- `3d90decebe..69b8db23` — 3 commits, 27 files (app-shell / settings / shared window-controls files).
- Zero overlap with the sidebar feature files (`src/renderer/src/components/sidebar/**`, `src/shared/project-groups.ts`, etc.).

## Required outcome
- Confirm whether the window-controls work is intended to be part of PR #19125, and if not, move it to its own branch/PR before merge.

## Open questions for the human
- Is the window-controls feature intentionally landing with the sidebar nesting work, or was it committed to the wrong branch?

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

@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 in this increment — the upstream merge integrates cleanly with the sidebar client-groups work.

Reviewed changes

  • Merged upstream/main — c1c0ce1 pulls in main's sidebar-header-actions.tsx refactor (the "unify create actions" split into NewWorkspaceButton / AddProjectButton, plus agentsViewActive gating) and resolves it against the PR's SidebarClientScopeSwitcher, which stays wired into the workspaces view and is hidden in the agents view.
  • Header threading — SidebarHeader.tsx now derives agentsViewActive = sidebarBody === 'agents' and passes it down, so the scope switcher and workspace actions correctly disappear in the activity view.
  • Cosmetic merge adjustments — repo-header-project-actions.tsx swaps the "New group from project" icon FolderPlus → FolderTree; en.json (and sibling locales) drop the retired createMenu key and adopt main's 5c9c7c16aa string while keeping the PR's addProject key.
  • Brought-along upstream changes — main's worktree-creation-* refactors and its e2e updates (golden-core-flows.spec.ts, sidebar-project-dialog.ts) land unchanged, outside the PR's scope.

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

@sebastianarena

Copy link
Copy Markdown

I was about to start building exactly this — group nesting plus a "move into group" action on the group menu — and stumbled onto this PR first. Glad it exists, and the approach looks right to me. Two bits of feedback as a would-be user of it.

The indentation in the move menu is good enough. The thing I'd been worried about was the flat target list: once groups nest, names repeat across subtrees and there's no way to tell which parent a given entry belongs to. Since flattenProjectGroupsForMenu walks parents-then-children in tabOrder, the parent sits directly above its children, so the › indent reads fine in practice. I don't think full breadcrumbs are needed.

I'd reconsider the Group → Client rename. That's the part most likely to slow this down. It turns a scoped feature into a product-naming decision, which needs a different and slower kind of sign-off than "unlock parentGroupId on the update path." The nesting itself is uncontroversial — the model already has parentGroupId, folder import already produces nested groups, and the sidebar already renders them indented. This PR is mostly just adding the write path that's missing.

My suggestion would be to keep "Group" for now and land the nesting. What the levels mean is the user's call — mine happen to be clients, but for someone else they're areas, departments, teams, or products. Baking "client" into the UI copy picks one of those for everybody. If a rename is still wanted afterwards it's a cheap follow-up, and it can be argued on its own merits instead of holding up the feature.

Might also be worth adding Fixes #8785 to the description — it's the same request, and linking it would give this a bit more visibility.

Bring Orca updates through the v1.4.199 release line onto the personalized branch.

@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 in this increment — the upstream merge integrates cleanly with the sidebar client-groups work.

Reviewed changes

  • Merged upstream/main — 4b4e84b0 pulls in 13 upstream commits (134 files, ~5.8k insertions) of native-chat / agent-status / terminal / mobile / cloud-push work. None of it touches the sidebar client-groups feature surface: git diff c1c0ce1f..4b4e84b0 shows zero changes under components/sidebar/** or any other projectGroups file.
  • Localization intact — the only shared file is en.json, and its delta is upstream native-chat background-task strings in a separate namespace; the PR's auto.* keys are untouched, so verify:localization-catalog is unaffected.
  • No conflict resolution — the PR's feature files needed no merge resolution and the diff carries no leftover conflict markers.

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

Bring in Orca v1.4.200+ while keeping client nesting focus and Linux window-controls search.

Co-authored-by: Cursor <[email protected]>
Keep the post-merge max-lines shrink without the ReadonlyArray lint failure.

Co-authored-by: Cursor <[email protected]>

@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 in this increment — the upstream merge integrates cleanly with the sidebar client-groups work.

Reviewed changes

  • Merged upstream/main (Orca v1.4.200+) — 6a44bef868 pulls in ~300 upstream files. The load-bearing integration point is upstream's RPC-params refactor (c84007c541), which moved the params schemas out of src/main/runtime/rpc/methods/{client-ui-schemas,repo}.ts into src/shared/rpc-contract/{client-ui-params,repo-params}.ts. The PR's fields were carried into the new shared schemas (focusedProjectGroupId at client-ui-params.ts:146, parentGroupId at repo-params.ts:47), and the old files now re-export/import from the shared location, so runtime validation and the RuntimeProjectGroupController still accept them.
  • Status-bar hydrate lint fix — 11b319572f drops the invalid satisfies readonly (readonly [keyof PersistedUIState, StatusBarItem])[] clause on the hydrateStatusBarItems defaults (a ReadonlyArray lint failure). The clause was redundant: the five _*StatusBarDefaultAdded flags are all PersistedUIState keys, so as const alone preserves the literal-tuple typing and ui[flag] indexing.
  • Cycle guards intact — wouldCreateProjectGroupCycle / resolveProjectGroupParentGroupId / getNextProjectGroupSiblingTabOrder and the project-group-operations.ts persistence path survive the merge unchanged.

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

This branch has not been deployed

No deployments
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