Load a judge's assignments when approved for another edition - #429
Merged
Merged
Conversation
/judge only fetched getMyAssignments when judge.isJudge was true, and isJudge answers for the current edition only. Assignments span every edition, so a judge approved for an edition other than the resolved current one never loaded them: the card said "Application pending review" with no "Ready to Judge" link. The query now also runs when any of the caller's applications is approved.
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.
/judgeonly fetchedgetMyAssignmentswhenjudge.isJudgewas true, andisJudgeanswers for the current edition only. Assignments span every edition, so a judge approved for an edition other than the resolved current one never loaded them: the card said "Application pending review" with no "Ready to Judge" link.The query now also runs when any of the caller's applications (
judge.myApplications, already fetched on the page) is approved. Typecheck and lint pass.Note
Low Risk
Single client-side change to when a tRPC query runs; no auth or API behavior changes.
Overview
Fixes the judge portal so assignments load for users approved on any hackathon, not only when
judge.isJudgeis true for the resolved current edition.getMyAssignmentsis now enabled when the session exists and eitherisJudgeis true or any row from the already-fetchedmyApplicationsis approved. That lets cross-edition judges get assignment data so hackathon cards show Ready to Judge instead of stuck Application pending review.Reviewed by Cursor Bugbot for commit c9d3aa6. Bugbot is set up for automated code reviews on this repo. Configure here.