Repository navigation
Show judges only seated projects, and time each pair - #239
Merged
Merged
Conversation
MDredd now draws only projects with a table. Before each judge's pair request, resend the table mapping when it changed or was last sent over a minute ago, so a team that gets a table becomes judgeable right away. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
/judge shows a countdown for the open pair, amber with under a minute left and red, pulsing, in the last 15 seconds. At zero it skips the pair in MDredd (no vote, no strike) and loads the next one. MDredd's own record of when the pair was handed out drives the clock, so a refresh or another device can't reset it. Organizers set minutes per pair on /admin/teams/judging (default 5, 1 to 30), stored in a new judging_settings.pair_seconds column and recorded in the audit log. Co-Authored-By: Claude Opus 5.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.
Summary
Two judge-flow changes, one commit each. Depends on mhacks/MDredd#34, which has to be deployed first.
1. Judges only see projects with a table
syncTablesIfStalere-sends the table mapping if it changed since this server last sent it, or if that was over a minute ago (MDredd may have restarted or been archived). A team that gets a table, whether an organizer assigns it or the team reserves one, becomes judgeable on the next pair request. Nobody has to press Sync.docs/judging.mdnow say that projects without a table are skipped.2. A timer on every pair
/judgeshows a countdown bar with mm:ss above the pair. With under a minute left it turns amber ("Less than a minute left. Vote before time runs out."). In the last 15 seconds it turns red and pulses ("Vote now, or you'll move to a new pair."). Screen readers hear each stage once, through a polite live region. The pulse respectsprefers-reduced-motion.assigned_atandserver_time. The server returns time remaining, so refreshing, switching devices, or a judge's phone clock being off makes no difference./admin/teams/judging(default 5, range 1–30) is stored in a newjudging_settings.pair_secondscolumn (migration20261004015332_judging_pair_seconds) and recorded in the audit log. A change also applies to pairs already in progress, counted from when each was handed out.Testing
tsc, eslint, prettier andnext buildpass.lib/judgingmodules and the settings query:/judgeor the new admin field in a browser. Please check the timer stages on a preview, for example by setting Minutes per pair to 1.🤖 Generated with Claude Code