Conversation
What was broken On the Opportunities page, the "All" filter (and the count shown next to it) omitted every active challenge whose open phase was not Submission. Challenges sitting in Review, AI Review, Approval, Screening, Iterative Review, etc. were missing from the list, so a challenge that was clearly visible under "My Challenges" produced "No Live Challenges found" under "All". Root cause The All-bucket request and the total-count request in src/shared/actions/challenge-listing/index.js sent currentPhaseName=Submission (added under PM-5488 to keep not-yet-started challenges out of the live list). The challenge API matches currentPhaseName against a single phase name, so the filter also dropped every active challenge that had already moved past submission. The same over-restriction was removed from "My Challenges" earlier for the same reason, which is why the challenge appeared there but not in "All". What was changed Replaced currentPhaseName=Submission with startDateEnd=<now> in getAllChallengesDone and getTotalChallengesCountDone. The All bucket now requests every started ACTIVE challenge, matching the bucket's original definition (started + Active) and the phase-agnostic My Challenges request, while still excluding challenges whose start date is in the future. Any added/updated tests Updated __tests__/shared/actions/challenge-listing/index.js so the All and total-count regression tests assert the ACTIVE + startDateEnd filter and explicitly assert that no currentPhaseName constraint is sent. Co-Authored-By: Claude Opus 5 (1M context) <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.
What was broken
On the community app Opportunities page, the All filter (and the count badge next to it) omitted every active challenge whose open phase was not
Submission. Challenges in Review, AI Review, Approval, Screening, Iterative Review, etc. were missing, so a challenge that was plainly visible under My Challenges (screenshot 1, "Test ai only" in AI Review) rendered as "No Live Challenges found" under All (screenshot 2).Root cause
getAllChallengesDoneandgetTotalChallengesCountDoneinsrc/shared/actions/challenge-listing/index.jssentcurrentPhaseName=Submission. That parameter was added under PM-5488 to keep not-yet-started challenges out of the live list, but the challenge API matchescurrentPhaseNameagainst a single phase name, so it also dropped every ACTIVE challenge that had already moved past submission. The same over-restriction was removed from the My Challenges request in a PM-5488 follow-up for exactly this reason, which is why the challenge showed up there but not under All.Verified against
api.topcoder-dev.com:status=ACTIVE¤tPhaseName=Submission→ 17 challengesstatus=ACTIVE&startDateEnd=<now>→ 230 challenges, including 54 in Review, 5 in Approval, 3 in AI Screening, 12 in Iterative Reviewstatus=ACTIVE&startDateStart=<now>→ 0, i.e. thestartDateEndguard still excludes anything that has not startedWhat was changed
src/shared/actions/challenge-listing/index.js— replacedcurrentPhaseName: 'Submission'withstartDateEnd: new Date().toISOString()in both the All-bucket request and the total-count request that feeds the All bucket count. The All bucket now requests every started ACTIVE challenge, which matches the bucket's original definition (started: true, status: ['Active']) and the phase-agnostic My Challenges request, while still keeping future-dated challenges out of the live list.Assumption: "All" is meant to list all started active challenges regardless of open phase, consistent with My Challenges. As a side effect, active challenges whose only open phase is a late one (for example Post-Mortem) are now listed too; the alternative would have required a new multi-phase query parameter in challenge-api.
Any added/updated tests
__tests__/shared/actions/challenge-listing/index.js— updated the All and total-count regression tests to assert theACTIVE+startDateEndfilter and to explicitly assert that nocurrentPhaseNameconstraint is sent (the My Challenges test already asserted this).Validation
npx jest --config config/jest/default.js __tests__/shared/actions/challenge-listing→ 2 suites, 4 tests passednpm run lint:js→ exit 0, cleanchallenge-listingsuite in the full jest run passes. The remaining failures in the full run are pre-existing and unrelated to this change (anode-expatnative module compiled for an older Node ABI, and__tests__/shared/reducers/examples/data-fetch.jscrashing with "Tests cannot be nested" on this jest version) — both reproduce without this patch.🤖 Generated with Claude Code