You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(sidebar): fold from the row menu what the row folds, and skip the prefetch on a fold press - #4962
Part of #3884 (sidebar agent fold follow-ups from #3845's review). Each case below was reproduced on main by a test that fails there and passes here.
Item 2: a press on a row that only folds its agents no longer starts that pane's conversation prefetch (pressPane is skipped for foldable rows).
Item 3: a repository row's aria-expanded follows whether its agents are shown, so under a filter that shows the row's own agents while its worktrees stay folded it reads true, not false.
Comment items (pinned repository, only the worktree pinned, a filter that keeps the main row without its worktrees): the row menu decided its fold from every worktree in the snapshot, while the row decides from the worktrees it actually draws. When those are drawn apart (pinned) or filtered out, the row folds its agents but the menu's Collapse/Expand and New tab with agent... worked the worktree fold, so a new agent stayed hidden. The menu now uses the worktrees of the row's drawn group, the same as the row.
No new control, setting or contract; the menu items keep their labels and only act on the fold the row itself works.
How it was checked
New tests in Sidebar.agentTree.test.tsx and Sidebar.appLayout.test.tsx: 5 fail on main, all pass with the fix.
bun test of Sidebar., MachineSidebar, AgentSidebar and RowMenu tests: 100 pass, 0 fail.
bun run check fast: typecheck and build pass; the unit step failed only in scripts/winvm-runner.test.ts, scripts/self-hosted-runner.test.ts, server/prompt.test.ts and scripts/plugin.test.ts (timeouts under local load, files this change does not touch); CI runs them clean.
Auto incremental reviews are disabled on this repository.
Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Summary
Summary by CodeRabbit
Bug Fixes
Workspace menus now fold or unfold the agents shown for pinned or filtered repositories, consistent with clicking the repository row.
Creating a new tab keeps its agent visible without changing the repository’s saved worktree-group fold state.
Under filters, repository rows and left/right arrow keys now reflect the expansion state of the agents that are visible.
Folding agents no longer starts a conversation load, and workspace-row presses do not select an agent pane.
Repository-row fold actions and new-tab behavior now use visible worktree groups. Row expansion, pointer presses, and arrow keys reflect agent visibility.
Changes: Sidebar agent folding
Layer / File(s)
Summary
Visible worktree group actions src/components/Sidebar.tsx, src/components/Sidebar.appLayout.test.tsx
The menu offers worktree folding when a visible worktree group has children. Otherwise, it can offer agent folding. New-tab creation unfolds worktrees only when a visible worktree group is folded or persisted as collapsed. Tests cover pinned and filtered repository rows.
Repository-row agent state src/components/Sidebar.tsx, src/components/Sidebar.agentTree.test.tsx, src/components/Sidebar.appLayout.test.tsx, changelog.d/sidebar-agent-fold-menu.md
aria-expanded reflects whether agents are hidden. Pointer presses do not start a conversation load when agent folding is available. Arrow keys change agent visibility, and tests cover these interactions and filtered rows.
Issue 3884: The changes address fold-triggered conversation loading and filtered-row expansion state. The new-tab behavior changes for visible worktree groups, but the summary does not show that it handles every saved fold when no agents remain.
Possibly related PRs
devswha/ovis#3845: This PR changes the repository-row agent folding and new-tab behavior introduced by that PR.
devswha/ovis#3069: This PR adjusts row behavior for the workspace agent tree and setting introduced by that PR.
Suggested reviewers:jpcarranza94
Merge Risk: Minimal · previous review 12f47
This change fixes sidebar folding behavior and avoids unnecessary conversation loads. No merge-blocking risk was identified.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: the sidebar row menu now folds the same things the row folds, and a fold press skips the conversation prefetch. It is specific and matches the changeset (Sidebar.tsx f…
Description check
The description follows the template's Change and Validation sections. Change describes the problem (menu decided fold from all snapshot worktrees, row uses drawn worktrees), the three behavior fixes,…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: the sidebar row menu now folds the same things the row folds, and a fold press skips the conversation prefetch. It is specific and matches the changeset (Sidebar.tsx fold/arrow logic, pane-press suppression, and tests).
Full details: Description check
Explanation
The description follows the template's Change and Validation sections. Change describes the problem (menu decided fold from all snapshot worktrees, row uses drawn worktrees), the three behavior fixes, and the absence of new controls or contracts. Validation lists the test runs, their results, and the failing unrelated checks. It does not link an issue for a feature, but this is a fix, and it references #3884 and #3845 for context. The template's HTTP/WS contract-test note does not apply, since no HTTP/WS changes are described.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
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.
Reviewing files that changed from the base of the PR and between bcfc30b and 12f4739.
Files selected for processing: 4
changelog.d/sidebar-agent-fold-menu.md
src/components/Sidebar.agentTree.test.tsx
src/components/Sidebar.appLayout.test.tsx
src/components/Sidebar.tsx
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 4 remain after this review.
Merged through pr-merge at head baaca6cca. Seen before the merge was asked for: required checks green, no unresolved thread, no conflict, no hold, main not red, no release in progress. CodeRabbit said it did not review (a limit or a skip) since this head.
main moved but untouched: merged without update. Its new commits up to 01ebb402b change no file of this pull request, none imported by one, nothing that decides which checks run, and no core path.
Reviews: omo gate (BLOCK only for the missing changelog fragment, added at 12f4739), omo-native-code-reviewer CLEAR with one MEDIUM (arrow keys vs aria-expanded under a filter) fixed in the same round with a test that fails on the previous head. Codex via axwith did not finish in 35 min.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Part of #3884 (sidebar agent fold follow-ups from #3845's review). Each case below was reproduced on
mainby a test that fails there and passes here.pressPaneis skipped for foldable rows).aria-expandedfollows whether its agents are shown, so under a filter that shows the row's own agents while its worktrees stay folded it readstrue, notfalse.No new control, setting or contract; the menu items keep their labels and only act on the fold the row itself works.
How it was checked
Sidebar.agentTree.test.tsxandSidebar.appLayout.test.tsx: 5 fail onmain, all pass with the fix.bun testof Sidebar., MachineSidebar, AgentSidebar and RowMenu tests: 100 pass, 0 fail.bun run check fast: typecheck and build pass; the unit step failed only inscripts/winvm-runner.test.ts,scripts/self-hosted-runner.test.ts,server/prompt.test.tsandscripts/plugin.test.ts(timeouts under local load, files this change does not touch); CI runs them clean.