[#567] Fix pre-event judging setup and access - #568
Conversation
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Codex <codex@openai.com>
📝 WalkthroughWalkthroughThe change updates judging to select the active or nearest upcoming hackathon, support historical read-only browsing for authenticated judges, and keep guests bound to their room hackathon. It adds judge hackathon listing and access checks, uses the configured public redirect URL, and adds regression coverage. Schedule generation now includes configured rooms without current judge staffing. Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: 🔵 Low · up to Historical browsing can show operational data from the wrong event, and legacy MLH room configuration can leak into saved schedules. These bounded issues should be corrected before production use. 🚥 Pre-merge checks | ✅ 6 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (6 passed)
Full details: Linked Issues checkExplanation The summary supports schedule capacity from configured rooms, active/upcoming selection, judge history access, read-only historical views, guest room binding, public URL redirects, presence retention, and regression coverage for issue Full details: Docstring CoverageExplanation Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 16 functions across 13 files. (12 skipped: 12 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 ESLint
apps/blade/src/app/_components/projects/judge-project-workspace.tsxESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox. apps/blade/src/app/judge/activate/[linkId]/route.tsESLint skipped: the matched ESLint configuration already failed (missing-dependency). apps/blade/src/app/judge/projects/page.tsxESLint skipped: the matched ESLint configuration already failed (missing-dependency).
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Note
Quiet mode is enabled, so only the most important comments were posted inline. Other review comments are grouped below.
🟡 Other comments (3)
packages/api/src/utils/judging-schedule/source.ts-114-114 (1)
114-114: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winExclude MLH rooms from scheduled-room selection.
isScheduledis mutable, and imports retain legacy challenge rows, so a root challenge labeledMLHcan remain scheduled. Its building-backed room enterseligibleRooms, reaches the solver, and can appear in a saved appointment. Apply a case-insensitivechallengeLabelexclusion here and inappointmentMoveChoices.packages/api/src/routers/judging.ts-205-213 (1)
205-213: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winKeep operational context on the current judging event.
When
hackathonIdis supplied,getContextandlistAnnouncementsuse it for rooms, presence, and announcements. A historical or future ID can therefore return stale or future operational state. Resolve those queries with the active or nearest-upcoming hackathon, and use the requested ID only for workspace data..forge/features/project-judging-scheduler/spec.md-125-125 (1)
125-125: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winAlign the scope requirement with AC02.
Replace “in a room with judges for that challenge” with “in a scheduled room for that challenge.” The current wording conflicts with the defined rule that judge presence is operational status, not scheduling capacity.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: QUIET
Plan: Advanced
Run ID: b345e1dc-824f-4fbb-843c-6b5aebf25687
⛔ Files ignored due to path filters (1)
packages/api/src/tests/root/__snapshots__/api-surface.test.ts.snapis excluded by!**/*.snap
📒 Files selected for processing (25)
.forge/features/judging-magic-access/spec.md.forge/features/judging-magic-access/srd.md.forge/features/judging-magic-access/status.md.forge/features/judging-magic-access/test-cases.md.forge/features/project-judging-scheduler/spec.md.forge/features/project-judging-scheduler/srd.md.forge/features/project-judging-scheduler/status.md.forge/features/project-judging-scheduler/test-cases.md.forge/features/project-judging/spec.md.forge/features/project-judging/srd.md.forge/features/project-judging/status.md.forge/features/project-judging/test-cases.mdapps/blade/src/app/_components/projects/judge-project-workspace.tsxapps/blade/src/app/judge/activate/[linkId]/route.tsapps/blade/src/app/judge/projects/page.tsxapps/blade/src/tests/judging/prod-flow-regressions.test.tsxapps/blade/src/tests/projects/project-judge-privacy.test.tsxpackages/api/src/routers/judging.tspackages/api/src/routers/projects.tspackages/api/src/tests/integration/judging-access.test.tspackages/api/src/tests/integration/judging-schedule.test.tspackages/api/src/tests/judging-schedule/solver.test.tspackages/api/src/utils/judging-schedule/solver.tspackages/api/src/utils/judging-schedule/source.tspackages/api/src/utils/judging/scope.ts
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.
|
I tested out each feature implemented it all works just small UI issues in certain places but thats OOS for this PR 👍🏽 |
Why
The production KH IX judging flow could not be prepared before judges entered rooms. Schedule capacity was derived from live room presence, the judge project page failed when KH IX was upcoming, and room activation redirected to the container origin.
What
Closes: #567
Test Plan
pnpm --filter=@forge/blade exec vitest run src/tests/judging/prod-flow-regressions.test.tsx src/tests/projects/project-judge-privacy.test.tsx— 30 passed.pnpm verify:precommit— passed.pnpm build— passed (21 tasks).Checklist
pnpm db:generateand committed the generated files inpackages/db/drizzle/