Uh oh!
There was an error while loading. Please reload this page.
feat(sidebar): group threads by environment - #9213
Conversation
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 629525f. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR introduces an opt-in environment-grouping capability across web and mobile, changing sidebar layout, project identity keys, sorting, and pinned drag-and-drop behavior across multiple production paths. Its default-off setting preserves existing startup behavior, but the breadth of the new runtime logic and cross-platform interaction changes warrants human review. You can add or adjust custom eligibility rules. Learn more. |
There was a problem hiding this comment.
Environment grouping is threaded consistently through the settings surface and both web sidebars, but the legacy sidebar's env-scoped projectKey leaks into a cross-surface route contract, which breaks the "Project settings" entry point while the toggle is on. Remaining comments are scoped to accessible naming, section ordering parity between the two sidebars, and the repeated heading treatment.
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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
shivamhwp
commented
Sep 2, 2026
Note: GPT-5.6 Sol on behalf of shivam (@shivamhwp). Thanks for putting this together. The PR itself is well done, but we are going to close it in favor of #8530. Environment grouping moves navigation toward the older project-tree style. With many threads, it adds more sections without reducing the list, so users still have to scroll through everything. #8530 addresses the same need with an environment filter in the current sidebar, letting users narrow the list to the environments they want. We appreciate the work and thought that went into this. |

Users connected to multiple computers could identify a thread's environment, but could not section the sidebar by where work runs.
Add a client-local environment grouping preference across web, desktop, and mobile. The default sidebar keeps its pinned, active, snoozed, and settled structure while adding environment headings; the project-tree sidebar nests projects under environment sections and scopes repository grouping within each environment.
Tests:
vp test run packages/contracts/src/settings.test.ts apps/web/src/environmentGrouping.test.ts apps/web/src/components/Sidebar.logic.test.ts apps/mobile/src/features/home/homeThreadList.test.ts apps/mobile/src/features/home/homeListItems.test.tsvp run typecheckinapps/web,apps/mobile, andpackages/contractsModel: GPT-5.6 Sol
Harness: OpenCode
Section headers look like this:
Enable in Settings / General:
Note
Medium Risk
Touches sidebar ordering, grouping keys, and pinned reorder semantics across web and mobile; incorrect scoping could mis-filter threads or merge projects across environments, but changes are gated behind an opt-in default-off setting.
Overview
Adds a client-local “group by environment” preference (
sidebarEnvironmentGroupingEnabledon web,environmentGroupingEnabledon mobile) so multi-machine workspaces can section the sidebar by where work runs.On web, the default sidebar inserts environment headings inside pinned, active, snoozed, and settled areas; pinned drag-reorder is limited to threads in the same environment, with helpers to keep optimistic pinned order in sync when toggling the mode. The legacy project-tree sidebar nests projects under environment sections via
buildSidebarProjectGrouping, keeps repository grouping within each environment (no cross-environment merge), disables manual project sort while grouping is on, and routes project settings usinglogicalProjectKey.On mobile (legacy grouped list only, when viewing all environments), scopes and thread groups are built per environment, the list gains environment-header rows, and project filters show
title · environmentlabels. The toggle lives under Settings → Project Grouping.Settings surfaces the control on web General settings (search + restore-defaults) and persist it in mobile preferences. Tests and user docs cover the new behavior.
Reviewed by Cursor Bugbot for commit a181428. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Group sidebar threads and projects by environment
sidebarEnvironmentGroupingEnabledclient setting (defaultfalse) with toggle UI in web General settings and the mobile Project Grouping screen, plus settings-search support.SidebarandLegacySidebarrender active, pinned, snoozed, and settled threads under environment headings when enabled; pinned drag-and-drop is scoped to the active thread's environment, and manual project sort is disabled in that mode.HomeScreenandThreadNavigationSidebarbuild environment-separated project scopes and thread groups, inserting environment-header list rows; grouping applies only when no specific environment filter is selected.buildSidebarProjectGrouping, which partitions projects by environment and addslogicalProjectKeyto each snapshot.projectKeys and no manual sort; switching the setting clears pinned optimistic order. TheselectPinnedReorderSectionandshouldApplyOptimisticPinnedOrderhelpers in Sidebar.logic.ts enforce the environment-mode match.Macroscope summarized a181428.