Uh oh!
There was an error while loading. Please reload this page.
feat(web): filter sidebar threads by environment - #8530
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:
Comment |
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — Adds a production sidebar environment checklist and threads the selected environments through thread, draft, search, project-scope, selection, and pagination behavior. The session-only default preserves the existing all-environments view, but the breadth of the new interactive path and its cross-cutting state effects merits review. You can add or adjust custom eligibility rules. Learn more. |
258c853 to
8983e13CompareDismissing prior approval to re-evaluate 8983e13
There was a problem hiding this comment.
One consistency finding on the new environment-filter trigger: it is the only icon SidebarMenuButton in this header row without the coarse-pointer hit-target overlay its neighbors use. Everything else (Menu/MenuPopup/MenuCheckboxItem composition, width-class contract on MenuPopup, active-filter dot matching PullRequestListFilters) matches the shared component system.
Posted via Macroscope — UI Consistency
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
8983e13 to
14ed67bCompareAdd an icon button next to the sidebar's project scope menu (visible only when more than one environment is connected) that opens a checklist to enable and disable which environments' threads the list shows. The filter composes with the project scope, draft rows, search, and the settled-tail pagination reset; the project menu narrows to projects with a presence in an enabled environment. State is the disabled set, so newly connected environments are visible by default. The last enabled environment cannot be unchecked, and a catalog change that would leave nothing enabled resets the filter instead of hiding every thread behind a control that no longer renders. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
14ed67b to
72c948dCompareThere was a problem hiding this comment.
Two consistency findings on the new environment filter control in apps/web/src/components/Sidebar.tsx. Everything else (dot indicator matching PullRequestListFilters, MenuPopup width contract, SidebarMenuButton icon-color indirection) lines up with the existing system.
Posted via Macroscope — UI Consistency
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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 d80e30b. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
One finding on the new commit: the locked environment row explains its constraint with a native title attribute instead of the shared Tooltip primitive. Details inline.
Posted via Macroscope — UI Consistency
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
One finding on the newest commit: the environment checkbox rows now pin data-highlighted text colors, which overrides MenuCheckboxItem's accent-surface foreground contract.
Posted via Macroscope — UI Consistency
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.

Problem
When the client connects to more than one environment, the sidebar interleaves threads from every machine. The existing project scope cannot isolate one environment because a logical project can exist in several environments.
Fix
The web sidebar now shows an environment checklist beside the project picker when at least two environments are connected.
The selected environments filter:
The client stores disabled environment IDs, so new connections remain visible by default. It prevents disabling the last enabled environment and removes stale disabled IDs when connections disappear. The filter is session-only, like the project scope.
This shared sidebar ships to web and desktop. Mobile has a separate thread list and is unchanged. Providers, server events, and wire contracts are also unchanged.
Validation
Refreshed onto current
mainat0681d854994ec0ceed0562ae74549ccf8ef2ec41. Current PR head is2cf51227bff7e5bf8b8b65bade27c343c2f2787c.CI=true pnpm vp test run src/components/Sidebar.logic.test.ts: 120 tests passedCI=true pnpm --filter @t3tools/web typecheck: passedgit diff --check origin/main...HEAD: passedEvidence
Before filtering
After selecting one environment
Interaction
WebM recording\n\n## Limits
The control is hidden when the client knows about only one environment. Relay and tunnel transports were not retested because the change only filters the client-side environment catalog.
Implemented by GPT-5.6 Sol using Codex in T3 Code.
Note
Add environment filter checklist to sidebar thread list in
SidebartoggleDisabledEnvironmentIdto toggle individual environments andpruneDisabledEnvironmentIdsto remove disabled IDs that disconnect from the catalog and reset to all-enabled when no enabled environment remainsSidebar, so consumers relying on preserved scroll position or selected thread across filter changes will see both clearedMacroscope summarized 2cf5122.
Note
Low Risk
Client-only sidebar filtering with guarded edge cases; no auth, server, or persistence changes. Minor UX risk when project scope resets automatically after environment toggles.
Overview
Adds a session-only environment filter to the web sidebar when two or more environments are connected, alongside the existing project scope.
Filter state is stored as disabled environment IDs (new connections stay visible; “all environments” is an empty set).
Sidebar.logicgainstoggleDisabledEnvironmentIdandpruneDisabledEnvironmentIdsto enforce at least one enabled environment, no-op on redundant toggles, and safe cleanup when the connected catalog shrinks.The sidebar wires this through thread/draft lists, project-scope combobox options, multi-select clearing, settled-tail pagination reset, and a server-icon Environments menu with checkboxes and an “All environments” reset. Project scope auto-clears if every environment for the scoped project is disabled; empty states mention when the filter hides everything.
Reviewed by Cursor Bugbot for commit 2cf5122. Bugbot is set up for automated code reviews on this repo. Configure here.