Skip to content

fix(pageFilters): Expand sentinel selection before unchecking a project#110274

Merged
JonasBa merged 2 commits intomasterfrom
jb/pagefilters/uncheck
Mar 10, 2026
Merged

fix(pageFilters): Expand sentinel selection before unchecking a project#110274
JonasBa merged 2 commits intomasterfrom
jb/pagefilters/uncheck

Conversation

@JonasBa
Copy link
Member

@JonasBa JonasBa commented Mar 9, 2026

When All Projects or My Projects was staged (not yet committed) and the
user clicked an individual project checkbox to uncheck it, the toggle
logic would add the project ID alongside the sentinel value (e.g. [-1, 1]). Because -1 was still present, the selection still resolved to
kind='all', leaving the checkbox visually checked and suppressing the
selection limit warning.

The fix expands the sentinel to explicit IDs before removing the clicked
project:

  • kind='all' → expand to all project IDs, then remove the clicked one
  • kind='my' → expand to member project IDs, then remove the clicked one
  • anything else → existing toggleOption path unchanged

Also adds three new tests covering the selection limit warning for the
flows that exposed this bug: clicking All Projects then unchecking a
project, and the parametrized My/All Projects active + uncheck cases.

JonasBa and others added 2 commits March 9, 2026 16:10
…cts sentinels

Add a parametrized test verifying that unchecking a single project when
My Projects or All Projects is active (with >50 total projects) shows the
selection limit warning and disables the Apply button.

Co-Authored-By: Claude <noreply@anthropic.com>
When All Projects or My Projects was staged, clicking an individual
project checkbox added the project ID alongside the sentinel (e.g.
[-1, 1]) which still resolved to kind='all', leaving the checkbox
visually checked and suppressing the selection limit warning.

Fix by expanding the sentinel to explicit IDs first and then removing
the clicked project, so the staged value correctly reflects the new
explicit selection and the limit warning appears when >50 are selected.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 9, 2026
@JonasBa JonasBa marked this pull request as ready for review March 9, 2026 23:19
@JonasBa JonasBa requested a review from a team as a code owner March 9, 2026 23:19
Copy link
Member

@scttcper scttcper left a comment

Choose a reason for hiding this comment

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

sentinel

@JonasBa JonasBa merged commit 2a2d0fd into master Mar 10, 2026
61 checks passed
@JonasBa JonasBa deleted the jb/pagefilters/uncheck branch March 10, 2026 16:09
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.

2 participants