Skip to content

PM-5393: Restrict challenge type filters#7221

Merged
jmgasper merged 1 commit into
developfrom
PM-5393
Jun 19, 2026
Merged

PM-5393: Restrict challenge type filters#7221
jmgasper merged 1 commit into
developfrom
PM-5393

Conversation

@jmgasper

Copy link
Copy Markdown
Collaborator

What was broken
The community challenge listing Type filter displayed unsupported challenge types such as AI, AI Engineering, generated test types, and duplicate Marathon Match entries.

Root cause
The filter panel rendered the raw challenge type list returned by the API, with only a single excluded type name. New, duplicated, or generated API type records were therefore exposed as listing filters and could remain in the selected type query state.

What was changed
Added a visible challenge type whitelist for Challenge, First2Finish, Marathon Match, and Task. The filter panel now derives visible types from that whitelist, keeps the expected order, removes duplicate type records, and sanitizes selected type values before updating filter state or query handling.

Any added/updated tests
Added unit coverage for visible challenge type derivation and selected type sanitization, including AI, AI Engineering, generated type values, and duplicate Marathon Match values.

What was broken
The community challenge listing Type filter displayed challenge types that should not be selectable, including AI, AI Engineering, test/generated types, and duplicate Marathon Match entries.

Root cause
The filter panel used the raw challenge type list returned by the API, only excluding Topgear Task by name. New or duplicated API challenge type records were therefore rendered directly and persisted in the selected type query state.

What was changed
Added a visible challenge type whitelist for Challenge, First2Finish, Marathon Match, and Task. The listing filter panel now derives its visible type list from that whitelist, preserves the expected order, removes duplicate type records, and sanitizes selected type values before they reach filter state or query handling.

Any added/updated tests
Added coverage for visible challenge type derivation and selected type sanitization, including AI, AI Engineering, generated type values, and duplicate Marathon Match values.
@jmgasper jmgasper marked this pull request as ready for review June 19, 2026 00:17
@jmgasper jmgasper requested a review from kkartunov as a code owner June 19, 2026 00:17
@jmgasper jmgasper merged commit 6d11ec2 into develop Jun 19, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant