add sidebar environment visibility toggles#3629
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 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 |
ApprovabilityVerdict: Needs human review This PR introduces a new user-facing feature allowing users to toggle environment visibility in the sidebar, with new UI components, state management, and filtering logic that changes what projects/threads are displayed. New features with runtime behavior changes warrant human review. You can customize Macroscope's approvability policy. Learn more. |
What Changed
Add sidebar environment visibility toggles.
Why
Keeps the sidebar usable when many environments are configured.
UI Changes
Added small dropdown that allows toggling on/off environments (affects project and thread visibility in the sidebar):
_20260701_095028.webm
Checklist
Note
Add environment visibility toggles to the sidebar
sidebarEnvironmentHiddenByIdin uiStateStore.ts and persisted across sessions.Macroscope summarized 01da174.
Note
Low Risk
Client-only UI and localStorage preferences; no auth or server changes. Main edge case is navigation when the active thread belongs to a hidden environment.
Overview
Adds per-environment show/hide in the sidebar when more than one environment is configured, via a globe Environments menu with switch checkboxes (labels and project counts). Hiding an environment removes its projects and threads from sidebar lists, shortcuts, and grouping; at least one environment must stay visible.
Preferences live in
sidebarEnvironmentHiddenByIdinuiStateStore, sanitized and persisted to localStorage. Manual project drag-reorder still uses the full project order map so hidden environments do not break reorder semantics.MenuPopupgains an optionalcollisionAvoidanceprop for menu positioning.resolveAdjacentThreadIdnow returns null when the current thread id is not in the visible list (e.g. active thread in a hidden environment).Reviewed by Cursor Bugbot for commit 01da174. Bugbot is set up for automated code reviews on this repo. Configure here.