fix(pagefilters): Show 'My Projects' instead of 'All Projects' when user is member of all projects#115890
fix(pagefilters): Show 'My Projects' instead of 'All Projects' when user is member of all projects#115890jameskeane wants to merge 7 commits into
Conversation
…ser is member of all projects The dashboard project filter was incorrectly showing 'All Projects' when the URL had no project selection (projects=undefined) and the user happened to be a member of all projects. This was misleading because 'All Projects' implies the -1 sentinel value, but the filter was actually using 'My Projects' behavior. The fix passes the selection intent kind (all/my/custom/none) to the trigger component, so it can accurately display the correct label based on the actual URL state, not just whether the selected project IDs happen to match all projects. Fixes DAIN-1643 Co-authored-by: James Keane <james.keane.github@gmail.com>
Co-authored-by: James Keane <james.keane.github@gmail.com>
📊 Type Coverage Diff✅ No new type safety issues introduced. Coverage: 93.58% |
…ject orgs When there's only one project, the trigger should always show the project name, not 'All Projects' or 'My Projects', regardless of the selection intent kind. Updated the trigger logic to require for showing 'All Projects', and updated tests to reflect the correct behavior. Co-authored-by: James Keane <james.keane.github@gmail.com>
The test was failing because it didn't explicitly initialize the PageFiltersStore with the project selection. Updated to match the pattern of other single-project tests by calling PageFiltersStore.onInitializeUrlState before rendering. Co-authored-by: James Keane <james.keane.github@gmail.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes 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 c5bff9c. Configure here.
| selectionIntentKind === 'my' && memberProjects.length > 0 && totalProjects > 1; | ||
|
|
||
| const isAllProjectsSelected = | ||
| value.length === 0 || (totalProjects > 1 && containsAllProjects); |
There was a problem hiding this comment.
Blank project filter label
Low Severity
For a multi-project org with an empty project URL, urlSelectionToIntent commits selectionIntentKind of my and an empty value when the user is not a member of any project. The trigger no longer maps empty value to “All Projects”, and “My Projects” is gated on memberProjects.length > 0, so neither aggregate label applies and the button shows an empty enumeratedLabel.
Reviewed by Cursor Bugbot for commit c5bff9c. Configure here.


Problem
The dashboard project filter was displaying "All Projects" in the UI even when that option wasn't actually selected. This happened when:
projects=undefined)This was misleading because "All Projects" implies the
-1sentinel value, but the filter was actually using "My Projects" behavior (empty URL = default to member projects).Solution
The fix updates the project filter trigger to use the selection intent kind (
'all','my','custom', or'none') instead of inferring the label based on whether the selected project IDs happen to match all projects.Changes:
selectionIntentKindprop toProjectPageFilterTriggerselectionIntentKind === 'all'instead of comparing IDsTesting
Linear Issue: DAIN-1643