feat(web): add environment filter to the sidebar - #6294
Conversation
|
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 Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
ApprovabilityVerdict: Needs human review This PR adds a new user-facing feature (environment filtering in sidebar) with new state management, filtering logic, and UI components. New features introducing new capability warrant human review. You can customize Macroscope's approvability policy. Learn more. |
6b27ba9 to
7116aaa
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7116aaa. Configure here.
7116aaa to
783ad2c
Compare

Fixes #6229
What Changed
Added a single-select environment filter to the sidebar alongside the existing project filter in
apps/web/src/components/Sidebar.tsx(used by desktop).The new filter lets users narrow the thread list to a single connected environment while keeping all configured environments available.
Files Changed
apps/web/src/components/Sidebar.tsxapps/web/src/components/Sidebar.logic.tsbuildSidebarEnvironmentFilterOptionsprojectScopeKeptUnderEnvironmentScopehelpersapps/web/src/components/Sidebar.logic.test.tsWhy
Previously, the thread list could only be narrowed by project, not by environment.
For users with multiple connected environments, this made it difficult to focus on threads belonging to a specific environment without losing access to the others.
The new environment filter works alongside the existing project filter:
UI Changes
Before
Only a project filter was available:
After
Both filters are available in the same row:
Environment options are sorted by label, with the primary environment indicated using the existing
MonitorIcon/CloudIcon.The two filters can be combined in either order:
When switching environments, the project filter is reset if the selected project has no member in the new environment. Removing the environment selection resets the filter to All environments.
Checklist
Note
Medium Risk
Touches core sidebar filtering and selection-clearing behavior with non-trivial cross-filter reset rules, so incorrect scope handling could hide threads or clear filters unexpectedly.
Overview
Adds a single-select environment filter beside the existing project filter so users with multiple connected environments can narrow threads and drafts to one environment.
The filter appears only when more than one environment is connected. It filters the thread list, draft rows, and project menu options; selecting an environment that the current project does not span resets the project filter. Scope also clears when the environment disconnects or only one remains.
Empty-state copy now mentions the active environment when scoped. New helpers in
Sidebar.logiccover option building, project-menu filtering, and reset rules, with matching unit tests.Reviewed by Cursor Bugbot for commit 783ad2c. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add environment filter to the sidebar to scope threads, drafts, and projects
Macroscope summarized 783ad2c.