Skip to content

506 show sponsored tracks not sending judges#508

Merged
michelleyeoh merged 4 commits intomainfrom
506-show-sponsored-tracks-not-sending-judges
Apr 28, 2026
Merged

506 show sponsored tracks not sending judges#508
michelleyeoh merged 4 commits intomainfrom
506-show-sponsored-tracks-not-sending-judges

Conversation

@ReehalS
Copy link
Copy Markdown
Member

@ReehalS ReehalS commented Apr 27, 2026

Closes #506

Changes:

  1. tracks.ts: Added sponsoredNotSendingJudges and judgeVisibleTracks (union of optedHDTracks + sponsoredNotSendingJudges). Centralizes which tracks judges should see.
  2. ScoringForm.tsx: Replaced use of optedHDTracks with judgeVisibleTracks so scoring questions show for sponsored judge-visible tracks.
  3. rankTeams.ts: Aggregation/filtering now uses judgeVisibleTracks so ranking includes those sponsored tracks.
  4. createPanels.ts: Panel creation/validation uses judgeVisibleTracks allowing panels for sponsored judge-visible tracks.
  5. assignJudgesToPanels.ts: Panel initialization now driven from judgeVisibleTracks.
  6. judgesToTeamsAlgorithm.ts: Matching logic switched to map domains from judgeVisibleTracks; added filtering so truly non-judge sponsor tracks (if any) remain excluded.
  7. Deleted old duplicate: in /grouping/matchingAlgorithm.ts .
  8. Added tests for all this functionality.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses #506 by centralizing the set of tracks judges should see (including sponsored tracks that are not sending judges) and wiring that unified set through judge scoring UI, ranking, panel creation, and judge-team matching logic.

Changes:

  • Added sponsoredNotSendingJudges and judgeVisibleTracks in tracks.ts and updated displayNameToDomainMap to be based on the judge-visible set.
  • Replaced optedHDTracks usage with judgeVisibleTracks across scoring, ranking, panels, and matching to ensure sponsored judge-visible tracks are included.
  • Removed a duplicate matching algorithm file and added focused Jest tests covering the new judge-visible behavior.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
app/_data/tracks.ts Introduces sponsoredNotSendingJudges + judgeVisibleTracks and bases displayNameToDomainMap on judge-visible tracks.
app/(pages)/judges/(app)/_components/ScoringForm/ScoringForm.tsx Uses judgeVisibleTracks so scoring questions render for judge-visible sponsored tracks.
app/(api)/_utils/scoring/rankTeams.ts Filters/aggregates using judgeVisibleTracks so rankings include judge-visible sponsored tracks.
app/(api)/_utils/matching/judgesToTeamsAlgorithm.ts Builds domain mapping from judgeVisibleTracks and refines non-judge track filtering to keep judge-visible sponsored tracks.
app/(api)/_utils/grouping/matchingAlgorithm.ts Deletes duplicated/obsolete matching algorithm implementation.
app/(api)/_datalib/panels/createPanels.ts Validates/creates panels against judgeVisibleTracks and uses its domain metadata.
app/(api)/_actions/logic/assignJudgesToPanels.ts Initializes empty panels from judgeVisibleTracks rather than only opted-in HD tracks.
tests/rankTeams.sponsoredTrack.test.ts Adds test coverage for ranking inclusion/exclusion based on judge-visible track set.
tests/judgesToTeamsAlgorithm.test.ts Adds test verifying sponsored judge-visible tracks are kept while non-judge sponsor tracks are removed in matching.
tests/datalib/panels/createPanels.test.ts Adds tests ensuring panel creation accepts judge-visible sponsored tracks and rejects non-judge-visible tracks.
mocks/tracks.ts Updates tracks mock to include the new judge-visible exports and updated mapping behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ReehalS
Copy link
Copy Markdown
Member Author

ReehalS commented Apr 28, 2026

NO COMMENTS WOOOO

@michelleyeoh michelleyeoh self-requested a review April 28, 2026 02:16
Copy link
Copy Markdown
Contributor

@michelleyeoh michelleyeoh left a comment

Choose a reason for hiding this comment

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

LGTM

@michelleyeoh michelleyeoh merged commit 1c05264 into main Apr 28, 2026
2 checks passed
@michelleyeoh michelleyeoh deleted the 506-show-sponsored-tracks-not-sending-judges branch April 28, 2026 02:18
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.

Show sponsored tracks that are not sending judges to HD provided judges

3 participants