Skip to content

feat(judging): editable-after-submit scores + in-app video review modal#180

Merged
sacha-l merged 1 commit into
developfrom
feat/editable-scores-and-review-modal
Jun 15, 2026
Merged

feat(judging): editable-after-submit scores + in-app video review modal#180
sacha-l merged 1 commit into
developfrom
feat/editable-scores-and-review-modal

Conversation

@sacha-l

@sacha-l sacha-l commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Two judging-flow tweaks for the Bitrefill event.

1. Scores stay editable (removed the hard lock)

Previously, SUBMIT MY SCORES froze a judge's ballot — saveScores/upsertScore 409'd and inputs were disabled. Per request, a judge can now revise and re-save their own scores at any time, including after submitting.

  • Server: dropped the isSubmitted → 409 guard on upsertScore + saveScores (kept claimBatch's — claiming new batches post-submit isn't part of this; submitBallot stays idempotent).
  • Client: score inputs always editable; SAVE BATCH always available; the red "SCORES SUBMITTED · LOCKED" banner becomes a calm "·SUBMITTED — your scores count; you can still revise + save."
  • Global tally: unchanged — the leaderboard still counts submitted ballots only and updates on submit. Because edits to a submitted ballot update submission_scores, the leaderboard reflects a judge's latest values automatically (so "save updates the global scores" holds for submitted judges; drafts stay private).

2. In-app VIDEO review modal

Clicking VIDEO now opens an in-app modal (ProjectReviewModal, reusing demoUtils.getEmbedUrl + the Radix Dialog) with the demo embedded + an "open in new window" button — no more tab pile-up. GITHUB stays a new-tab link (GitHub refuses iframe embedding via X-Frame-Options).

Test plan

  • cd server && npm test397 passed (controller lock tests flipped to assert edit-after-submit succeeds; sim journey updated; SIMULATION_REPORT.md regenerated).
  • cd client && npm run build && npm run lint → clean.
  • stadium-tester (mock + //Alice) → 4/4: VIDEO opens the in-app modal with "open in new window"; after SUBMIT, inputs stay enabled and a re-save succeeds; no console errors.

Out of scope

  • No admin "reopen"/program freeze (editable model makes reopen unnecessary).
  • GitHub inline preview (blocked by X-Frame-Options; stays new-tab).
  • Leaderboard aggregation semantics (submitted-only, on submit) unchanged.

🤖 Generated with Claude Code

…w modal

Two judging-flow tweaks from event prep:

1. Scores are no longer hard-locked on submit. Removed the isSubmitted -> 409
   guard on upsertScore + saveScores so a judge can revise and re-save their own
   scores anytime; the submitted ballot still counts and the leaderboard reflects
   the latest values (leaderboard already counts submitted ballots only, on
   submit — unchanged). Client: score inputs always editable, SAVE BATCH always
   available, the red 'LOCKED' banner becomes a calm 'submitted, you can still
   revise + save' note. claimBatch stays gated after submit (not part of this).

2. Clicking VIDEO opens an in-app review modal (ProjectReviewModal, reusing
   demoUtils embed + the Dialog) with an 'open in new window' button, instead of
   spawning a tab. GITHUB stays a new-tab link (X-Frame-Options blocks framing).

Tests: controller lock tests flipped to assert edit-after-submit succeeds; sim
journey updated likewise; SIMULATION_REPORT regenerated. Server 397 green; client
build + lint clean; stadium-tester 4/4 (video modal opens; edit+re-save after
submit works).
@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stadium Ready Ready Preview, Comment Jun 15, 2026 10:17pm

@sacha-l sacha-l marked this pull request as ready for review June 15, 2026 23:13
@sacha-l sacha-l merged commit 4d15857 into develop Jun 15, 2026
2 checks passed
sacha-l added a commit that referenced this pull request Jun 15, 2026
Resolved SubmitProjectModal conflict: re-applied the verifying-check-in
button label + reassurance line onto #178's restructured submit form
(main form footer, not the terms modal). Verified auto-merged api.ts,
program.controller, program.routes, submission.controller + test keep
BOTH the luma gate and #180's editable-scores logic. 428 server tests +
client build + lint pass.
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