Add a collapse-idle action to the sidebar#1210
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1831722e98
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
faa7eed to
b3123eb
Compare
|
nice touch , hope they merge |
8a5469e to
3480f72
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
1cae3d9 to
217dc7e
Compare

What Changed
Collapse idle projectsaction to the sidebar header.Why
The sidebar can accumulate a lot of expanded projects during normal use. This adds a one-click cleanup path without collapsing the project you are currently in or other projects that still have visible thread activity.
UI Changes
Video:
screenrecording-2026-03-19_16-33-08.mp4
Sorry that the mouse cursor is not visible in the recording.
Screenshot:
Added this tiny icon. Open for suggestions on a more fitting icon.
Checklist
Note
Add a 'Collapse idle projects' button to the sidebar Projects header
FoldVerticalIconbutton in the sidebar Projects header that collapses all expanded projects with no active threads, non-null thread status, or running terminals.collectSidebarNonIdleProjectIdsin Sidebar.logic.ts to compute the set of projects to keep expanded, based on active project, thread status map, and running terminal thread ids.Sidebar.tsxto memoizethreadStatusByIdandrunningTerminalThreadIdsat the component level, replacing per-item recomputation and removing the now-unusedterminalStatusFromRunningIdshelper.Macroscope summarized 5d423b7.
Note
Low Risk
Low risk UI/state update that collapses project panels based on derived “idle” heuristics; main risk is accidentally collapsing projects due to incorrect status/terminal detection.
Overview
Adds a “Collapse idle projects” action to the sidebar Projects header that collapses all expanded projects deemed idle, while keeping the currently active project (and projects with thread status pills or running terminals) expanded.
Introduces
collectSidebarNonIdleProjectIdsto compute the keep-open set, refactorsSidebar.tsxto memoizethreadStatusByIdandrunningTerminalThreadIds, and adds unit tests covering the non-idle project selection logic.Written by Cursor Bugbot for commit 5d423b7. This will update automatically on new commits. Configure here.