Skip to content

fix(pagefilters): Show 'My Projects' instead of 'All Projects' when user is member of all projects#115890

Open
jameskeane wants to merge 7 commits into
masterfrom
jameskeane/fix-dashboard-project-filter-display-6e67
Open

fix(pagefilters): Show 'My Projects' instead of 'All Projects' when user is member of all projects#115890
jameskeane wants to merge 7 commits into
masterfrom
jameskeane/fix-dashboard-project-filter-display-6e67

Conversation

@jameskeane
Copy link
Copy Markdown
Contributor

Problem

The dashboard project filter was displaying "All Projects" in the UI even when that option wasn't actually selected. This happened when:

  • The URL had no project selection (projects=undefined)
  • The user was a member of all projects in the organization

This was misleading because "All Projects" implies the -1 sentinel 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:

  1. Added selectionIntentKind prop to ProjectPageFilterTrigger
  2. Updated trigger logic to check selectionIntentKind === 'all' instead of comparing IDs
  3. Added test case to verify "My Projects" is shown when user is member of all projects

Testing

  • ✅ TypeScript compilation passes
  • ✅ ESLint passes
  • ✅ Added test: "shows My Projects (not All Projects) when user is member of all projects and URL is empty"
  • ✅ Existing tests continue to pass

Linear Issue: DAIN-1643

Open in Web Open in Cursor 

…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>
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 20, 2026
Co-authored-by: James Keane <james.keane.github@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

📊 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>
@jameskeane jameskeane marked this pull request as ready for review May 25, 2026 14:50
@jameskeane jameskeane requested a review from a team as a code owner May 25, 2026 14:50
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c5bff9c. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants