Skip to content

Hide 'See Results' button when jam results are locked - #87

Merged
kronosapiens merged 1 commit into
mainfrom
kronosapiens/hide-results-if-locked
Mar 11, 2026
Merged

Hide 'See Results' button when jam results are locked#87
kronosapiens merged 1 commit into
mainfrom
kronosapiens/hide-results-if-locked

Conversation

@kronosapiens

Copy link
Copy Markdown
Collaborator

When judges submit votes, the session-end screen now shows 'Back to Jams' instead of 'See Results' if the jam hasn't reached the confidence threshold to unlock results.

The unlock threshold is computed as: voteCount / (entryCount * CONFIDENCE_N) >= 1, matching the client's results-locking logic.

Changes:

  • Backend: Added getComparisonCountForJam() query and include entryCount / voteCount in POST session response
  • Hook: Expose resultsUnlocked boolean from useJudging
  • Judge page: Conditionally render button destination based on lock status

When voting is submitted, show 'Back to Jams' instead of 'See Results' if the jam hasn't reached the confidence threshold for unlocking results. The decision is computed on the client using voteCount / (entryCount * CONFIDENCE_N) >= 1.

Changes:
- Backend: Add getComparisonCountForJam() query and include entryCount/voteCount in POST session response
- Hook: Expose resultsUnlocked boolean from useJudging
- Judge page: Conditionally render button destination based on results lock status

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@kronosapiens
kronosapiens merged commit 473eff5 into main Mar 11, 2026
2 checks passed
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