Skip to content

add sidebar environment visibility toggles#3629

Open
tarik02 wants to merge 9 commits into
pingdotgg:mainfrom
tarik02:upstream/environment-sidebar-toggle
Open

add sidebar environment visibility toggles#3629
tarik02 wants to merge 9 commits into
pingdotgg:mainfrom
tarik02:upstream/environment-sidebar-toggle

Conversation

@tarik02

@tarik02 tarik02 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

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):

image
_20260701_095028.webm

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Add environment visibility toggles to the sidebar

  • Adds a globe-icon menu in the sidebar that lists environments as toggleable checkboxes; the menu only appears when more than one environment exists.
  • Projects and threads in the sidebar are filtered to exclude hidden environments, while drag-to-reorder still operates on the full project ordering context.
  • Visibility state is stored in sidebarEnvironmentHiddenById in uiStateStore.ts and persisted across sessions.
  • Prevents hiding the last remaining visible environment to avoid an empty sidebar state.

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 sidebarEnvironmentHiddenById in uiStateStore, sanitized and persisted to localStorage. Manual project drag-reorder still uses the full project order map so hidden environments do not break reorder semantics.

MenuPopup gains an optional collisionAvoidance prop for menu positioning. resolveAdjacentThreadId now 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.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Important

Review skipped

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

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 1d2da15d-9921-4ef3-821a-f8d16a488717

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Jul 1, 2026
@tarik02 tarik02 marked this pull request as ready for review July 1, 2026 06:56
Comment thread apps/web/src/components/Sidebar.tsx
Comment thread apps/web/src/components/Sidebar.tsx
Comment thread apps/web/src/components/Sidebar.tsx
Comment thread apps/web/src/components/Sidebar.tsx
Comment thread apps/web/src/components/Sidebar.tsx
@macroscopeapp

macroscopeapp Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

Comment thread apps/web/src/components/Sidebar.tsx Outdated
Comment thread apps/web/src/components/Sidebar.tsx
Comment thread apps/web/src/components/Sidebar.logic.ts Outdated
Comment thread apps/web/src/components/Sidebar.tsx Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant