Skip to content

PM-5897: Show later-phase challenges under the All filter - #7267

Merged
jmgasper merged 1 commit into
developfrom
PM-5897
Aug 21, 2026
Merged

PM-5897: Show later-phase challenges under the All filter#7267
jmgasper merged 1 commit into
developfrom
PM-5897

Conversation

@jmgasper

Copy link
Copy Markdown
Collaborator

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

getAllChallengesDone and getTotalChallengesCountDone in src/shared/actions/challenge-listing/index.js sent currentPhaseName=Submission. That parameter was added under PM-5488 to keep not-yet-started challenges out of the live list, but the challenge API matches currentPhaseName against 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&currentPhaseName=Submission → 17 challenges
  • status=ACTIVE&startDateEnd=<now> → 230 challenges, including 54 in Review, 5 in Approval, 3 in AI Screening, 12 in Iterative Review
  • status=ACTIVE&startDateStart=<now> → 0, i.e. the startDateEnd guard still excludes anything that has not started

What was changed

src/shared/actions/challenge-listing/index.js — replaced currentPhaseName: 'Submission' with startDateEnd: 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 the ACTIVE + startDateEnd filter and to explicitly assert that no currentPhaseName constraint 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 passed
  • npm run lint:js → exit 0, clean
  • Every challenge-listing suite in the full jest run passes. The remaining failures in the full run are pre-existing and unrelated to this change (a node-expat native module compiled for an older Node ABI, and __tests__/shared/reducers/examples/data-fetch.js crashing with "Tests cannot be nested" on this jest version) — both reproduce without this patch.

🤖 Generated with Claude Code

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>
@jmgasper
jmgasper requested a review from kkartunov as a code owner August 20, 2026 06:40
@jmgasper
jmgasper merged commit 251474e into develop Aug 21, 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