Skip to content

Show judges only seated projects, and time each pair - #239

Merged
pradhamk merged 2 commits into
mainfrom
judge-only-seated
Oct 4, 2026
Merged

pradhamk merged 2 commits into
mainfrom
judge-only-seated

Conversation

@pradhamk

@pradhamk pradhamk commented Oct 4, 2026

Copy link
Copy Markdown
Member

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

  • MDredd now draws only projects that have a table number. Before each judge's pair request, syncTablesIfStale re-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.
  • The "nothing left to judge" message, the judging page and docs/judging.md now say that projects without a table are skipped.

2. A timer on every pair

  • /judge shows 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 respects prefers-reduced-motion.
  • At zero, the page skips the pair in MDredd: no vote, no strike, and both projects get their counted appearance back so they still reach the minimum. Then it loads the next pair with a "Time's up" toast. If a vote is on its way, it finishes first. A failed skip can be retried from the error banner.
  • The clock comes from MDredd's assigned_at and server_time. The server returns time remaining, so refreshing, switching devices, or a judge's phone clock being off makes no difference.
  • Minutes per pair on /admin/teams/judging (default 5, range 1–30) is stored in a new judging_settings.pair_seconds column (migration 20261004015332_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 and next build pass.
  • Migration: applied to a throwaway local Supabase (repo migrations and seeds). The existing row got 300, and the range check rejects 30.
  • Against a local MDredd from Improve error messages #34 (Devpost stubbed), using the real lib/judging modules and the settings query:
    • Only seated projects are drawn.
    • Giving a project a table makes it drawable.
    • Unchanged syncs are skipped: 5 calls sent 3 updates.
    • Remaining time counts down across a reload (297.9 s after 2.1 s).
    • A skip returns a fresh pair with a full timer and no strikes, and a retried skip is harmless.
  • I haven't clicked through /judge or 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

pradhamk and others added 2 commits October 3, 2026 21:50
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>
@pradhamk
pradhamk merged commit fd02db8 into main Oct 4, 2026
1 check passed
@pradhamk
pradhamk deleted the judge-only-seated branch October 4, 2026 02:03
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