[#570] Improve pre-hack judging operations - #571
Conversation
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Codex <codex@openai.com>
|
Warning Review limit reachedNext included review available in 25 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: QUIET Plan: Advanced Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe pull request adds officer-only judging reset and room-deletion workflows with typed confirmations, audit events, readiness data, and a reorganized command center. It also adds Checked-In filtering and bulk transitions, permanent individual and bulk hacker application deletion, blacklist safeguards, and no-email handling. UI components, validators, API procedures, audit coverage, and integration tests are updated for both feature areas. Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: 🔵 Low · up to The remaining issues are limited to bulk-operation documentation accuracy and singular deletion wording. They do not affect reset, deletion, authorization, or scheduler behavior. 🚥 Pre-merge checks | ✅ 7 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (7 passed)
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 48 functions across 34 files. (6 skipped: 6 unsupported.) ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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.
Actionable comments posted: 2
Note
Quiet mode is enabled, so only the most important comments were posted inline. Other review comments are grouped below.
🟡 Other comments (6)
apps/blade/src/tests/admin/bulk-confirm-dialog.test.ts-96-96 (1)
96-96: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winHandle the singular application label.
This assertion preserves the user-facing text
Delete 1 applications. Pluralize the noun inbulkActionCopyand expectDelete 1 applicationhere.apps/blade/src/app/_components/judging/judging-reset-panel.tsx-255-255 (1)
255-255: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick winInvalidate judging queries after a reset.
JudgingResetPanel.confirmcallsrouter.refresh(), which refreshes server components but does not invalidate the tRPC cache.JudgingControlPanelandJudgingSchedulePaneltherefore keep stalejudging.listAdminandjudging.listScheduleAdmindata until their polling intervals run.+ const utils = api.useUtils(); ... setAction(null); + await Promise.all([ + utils.judging.listAdmin.invalidate({ hackathonId: data.hackathon.id }), + utils.judging.listScheduleAdmin.invalidate({ + hackathonId: data.hackathon.id, + }), + ]); router.refresh();apps/blade/src/app/_components/judging/judging-schedule-panel.tsx-552-552 (1)
552-552: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winReset dismissal after refresh recovery.
dismissedAlertretainsrefresh:${message}afterquery.errorclears. A later failure with the same message does not reopen the dialog. CleardismissedAlertwhenalertKeybecomesnull.Proposed fix
const diagnostics = (failedJob?.diagnostics ?? []).map((message) => data.source.tasks.reduce( // ... ), ); + + useEffect(() => { + if (alertKey === null) setDismissedAlert(null); + }, [alertKey]);apps/blade/src/app/_components/admin/hackathon/hackers/bulk-confirm-dialog.tsx-121-127 (1)
121-127: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winUse the submitted status in the success callback.
Canceland the dialog close button remain enabled whilestatusConfirmis pending. Closing clearsaction, butBulkConfirmDialogremains mounted. The success callback can then seeaction === nulland report that email is queued for a submittedcheckedinrequest. Use the mutation variables.- onSuccess: (result) => { + onSuccess: (result, variables) => { ... - if (action === "checkedin") { + if (variables.status === "checkedin") {.forge/features/hacker-management/srd.md-204-205 (1)
204-205: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winCorrect the documented procedure shapes.
hackerRosterListSchemadefinesfilter,cursor, andlimitat the top level.hackerRosterCountsSchemadefinesfilterat the top level. Documentsearchandstatusinsidefilter, and include the list cursor:
listForHackathon:query({hackathonId, filter?, cursor?, limit?})→ page
statusCounts:query({hackathonId, filter?})→ count per status.forge/features/judging-command-center-reset/status.md-24-24 (1)
24-24: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winComplete the owner screenshot approval.
The feature checklist requires desktop/mobile screenshots to be shown before opening the PR.
status.mdalso requires current task and phase tracking. Show the captures to the owner, record the approval, and then update the checklist and phase.
🧹 Nitpick comments (1)
.forge/features/judging-command-center-reset/srd.md (1)
27-32: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd
judging.resetProjectsto the tRPC behavior list.The router adds
resetProjectsinpackages/api/src/routers/judging.ts. It deletes deliberation entries, claims, projects, and non-group challenges, and it blocks while schedule, job, room, or evaluation data exists. The SRD list omits it.📝 Proposed addition
- `judging.dropRooms`: deletes all rooms and room-scoped access data after the schedule is gone. +- `judging.resetProjects`: deletes deliberation entries, claims, projects, and non-group challenges, and clears inventory-lock metadata after schedules, jobs, rooms, and evaluations are gone. - `judging.resetSetup`: restores starter groups and clears the rubric after downstream rooms, schedules, and feedback are gone.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: QUIET
Plan: Advanced
Run ID: ea42e46f-6c95-43ba-9414-2e53b293da33
⛔ 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 (42)
.forge/features/hacker-management/spec.md.forge/features/hacker-management/srd.md.forge/features/hacker-management/status.md.forge/features/hacker-management/test-cases.md.forge/features/judging-command-center-reset/spec.md.forge/features/judging-command-center-reset/srd.md.forge/features/judging-command-center-reset/status.md.forge/features/judging-command-center-reset/test-cases.mdapps/blade/src/app/_components/admin/hackathon/hackers/bulk-confirm-dialog.tsxapps/blade/src/app/_components/admin/hackathon/hackers/hacker-detail-dialog.tsxapps/blade/src/app/_components/admin/hackathon/hackers/hacker-filters.tsxapps/blade/src/app/_components/admin/hackathon/hackers/hacker-roster.tsxapps/blade/src/app/_components/admin/hackathon/hackers/hacker-table.tsxapps/blade/src/app/_components/judging/judging-announcements.tsxapps/blade/src/app/_components/judging/judging-configuration-panel.tsxapps/blade/src/app/_components/judging/judging-control-panel.tsxapps/blade/src/app/_components/judging/judging-launch-checklist.tsxapps/blade/src/app/_components/judging/judging-reset-panel.tsxapps/blade/src/app/_components/judging/judging-schedule-panel.tsxapps/blade/src/app/_components/judging/project-command-center.tsxapps/blade/src/app/_components/projects/admin-project-workspace.tsxapps/blade/src/app/_components/projects/project-directory.tsxapps/blade/src/app/admin/judging/page.tsxapps/blade/src/tests/admin/bulk-confirm-dialog.test.tsapps/blade/src/tests/admin/hacker-detail-dialog.test.tsxapps/blade/src/tests/admin/hacker-filter-facets.test.tsapps/blade/src/tests/admin/hacker-roster-actions.test.tsxapps/blade/src/tests/projects/challenge-configuration-panel.test.tsxapps/blade/src/tests/projects/judging-announcement-editor.test.tsxapps/blade/src/tests/projects/judging-reset-panel.test.tsxpackages/api/src/routers/hacker.tspackages/api/src/routers/judging-schedule.tspackages/api/src/routers/judging.tspackages/api/src/tests/hacker/access.test.tspackages/api/src/tests/integration/hacker-guards.test.tspackages/api/src/tests/integration/judging-reset.test.tspackages/api/src/utils/audit/coverage.tspackages/api/src/utils/hacker/access.tspackages/validators/src/audit.tspackages/validators/src/hackers.tspackages/validators/src/judging.tspackages/validators/src/tests/hackers.test.ts
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.
Co-authored-by: Codex <codex@openai.com>
|
@coderabbitai review Review follow-up in 541016b:
Validation: 170 focused API tests, 29 focused Blade tests, 22 validator tests, the full pre-commit gate, and all 21 builds passed. |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
git show --stat --oneline 541016bf
git diff 541016bf^ 541016bf -- \
packages/api/src/routers/hacker.ts \
packages/api/src/routers/judging.ts \
apps/blade/src/app/_components/admin/hackathon/hackers \
apps/blade/src/app/_components/judging \
apps/blade/src/tests/judging/prod-flow-regressions.test.tsx \
packages/api/src/tests/integration/hacker-guards.test.ts \
packages/api/src/tests/integration/judging-reset.test.ts
for f in \
packages/api/src/routers/hacker.ts \
apps/blade/src/app/_components/admin/hackathon/hackers/hacker-roster.tsx \
apps/blade/src/app/_components/admin/hackathon/hackers/hacker-filters.tsx \
apps/blade/src/app/_components/judging/judging-reset-panel.tsx \
apps/blade/src/app/_components/judging/judging-schedule-panel.tsx \
apps/blade/src/tests/judging/prod-flow-regressions.test.tsx
do
if [ -f "$f" ]; then
echo "=== OUTLINE: $f ==="
ast-grep outline "$f" --items all || true
fi
done
echo "=== CHECKED-IN / BULK DELETE REFS ==="
rg -n -C 4 -P 'checkedin|previewBulkDelete|confirmBulkDelete|eligibility drift|eligible' \
packages/api/src/routers/hacker.ts \
apps/blade/src/app/_components/admin/hackathon/hackers \
packages/api/src/tests/integration/hacker-guards.test.ts
echo "=== RESET INVALIDATION / SCHEDULER ALERT REFS ==="
rg -n -C 4 -P 'invalidate|dismissedAlert|alertKey|failedJob|dropSchedule|resetProjects' \
apps/blade/src/app/_components/judging \
packages/api/src/routers/judging.ts \
packages/api/src/tests/integration/judging-reset.test.ts
echo "=== JUDGE SELECTOR TEST REFS ==="
rg -n -C 4 -F 'lets an authenticated judge select a past hackathon' apps/blade/src/tests/judging/prod-flow-regressions.test.tsxLength of output: 80025
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
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.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
⚠️ Outside diff range comments (1)
apps/blade/src/app/_components/admin/hackathon/hackers/bulk-confirm-dialog.tsx (1)
226-226: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winUse the singular noun for one deleted application.
When one application is affected, this renders
Delete 1 applicants. Useapplicationwhendeletingis true and the count is one.
🟡 Other comments (1)
.forge/features/hacker-management/srd.md-207-208 (1)
207-208: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winRemove the stale
previewVersionclaim from the bulk-status prose.
hackerBulkPreviewSchemacontains onlyattendeeIds,hackathonId, andstatus, and bothpreviewBulkandconfirmBulkuse it. The router does not use or returnpreviewVersion;confirmBulkre-resolves the selected rows. Update the SRD prose to describe this intentional distinction instead of addingpreviewVersionto both procedures.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: QUIET
Plan: Advanced
Run ID: 82eea738-d044-4f7a-933a-56686944d507
📒 Files selected for processing (19)
.forge/features/hacker-management/spec.md.forge/features/hacker-management/srd.md.forge/features/hacker-management/status.md.forge/features/hacker-management/test-cases.md.forge/features/judging-command-center-reset/srd.md.forge/features/judging-command-center-reset/status.mdapps/blade/src/app/_components/admin/hackathon/hackers/bulk-confirm-dialog.tsxapps/blade/src/app/_components/admin/hackathon/hackers/hacker-filters.tsxapps/blade/src/app/_components/admin/hackathon/hackers/hacker-roster.tsxapps/blade/src/app/_components/judging/judging-reset-panel.tsxapps/blade/src/app/_components/judging/judging-schedule-panel.tsxapps/blade/src/tests/admin/bulk-confirm-dialog.test.tsapps/blade/src/tests/admin/hacker-filter-facets.test.tsapps/blade/src/tests/projects/judging-reset-panel.test.tsxpackages/api/src/routers/hacker.tspackages/api/src/tests/hacker/access.test.tspackages/api/src/tests/integration/hacker-guards.test.tspackages/validators/src/hackers.tspackages/validators/src/tests/hackers.test.ts
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.
Co-authored-by: Codex <codex@openai.com>
|
Addressed the two final review notes in 2034640: the delete dialog now uses singular/plural application wording and the SRD now documents the actual bulk-status and stricter bulk-deletion confirmation behavior. Added a heading regression assertion; focused Blade tests, pnpm verify:precommit, and pnpm build pass. |















Why
KH IX judging needed a setup and recovery workflow that officers could use before judges entered rooms. The existing command center mixed configuration order, occupied space with persistent warning cards, and lacked complete cleanup controls for rehearsal data. Hacker management also lacked a Checked-In view and safe bulk deletion.
What
Closes: #570
Command center flow
Cleanup and recovery
Hacker operations
Operator feedback
No database schema, dependency, environment variable, or production deployment changes are included.
Test Plan
pnpm verify:precommitpassed: React analysis, formatting, lint, and all 33 workspace typecheck tasks.pnpm buildpassed: all 21 workspace build tasks.Visual evidence
Screenshots are attached in the PR discussion so they remain outside the repository.
Checklist
pnpm db:generateand committed the generated files inpackages/db/drizzle/