fix(pageFilters): Expand sentinel selection before unchecking a project#110274
Merged
fix(pageFilters): Expand sentinel selection before unchecking a project#110274
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-1was still present, the selection still resolved tokind='all', leaving the checkbox visually checked and suppressing theselection 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 onekind='my'→ expand to member project IDs, then remove the clicked onetoggleOptionpath unchangedAlso 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.