Open
Conversation
03eeb00 to
94c84d3
Compare
97cf930 to
61b729f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ref: #99
Summary
Adds live voting support for compos, replacing the old time-window-based voting mechanism. During a compo presentation, an admin reveals entries one by one (in
order_indexorder), and the audience votes in real time.Key changes
LiveVotingState(one-to-one withCompo) tracks voting state, current on-screen entry, and last-updated timestamplive_voting_revealedonEntrycontrols visibility during live votingvoting_startandis_votablefromCompo(migration 0025)is_voting_open()checks bothLiveVotingState.voting_openandvoting_end, so voting is hard-blocked after the deadline even if an admin forgets to close itshow_voting_resultsis enabled on the compo, OR the entry has been individually revealed via live votingPublic API
GET /api/v2/public/event/{event_id}/kompomaatti/live_voting/{compo_id}/Supports
If-Modified-Sincefor efficient polling. Returns 304 when unchanged.{ "compo": 3, "voting_open": true, "current_entry": 21, "updated_at": "2026-03-08T17:06:29.199433+00:00", "revealed_entries": [20, 21] }revealed_entries— entry IDs inorder_indexordercurrent_entry— the entry currently being presented (nullable)voting_open— whether voting is accepting submissionsAdmin API
All admin endpoints require staff permissions and return the full state with entry list.
.../live_voting/{compo_id}/GET.../live_voting/{compo_id}/PATCHvoting_open/current_entry.../live_voting/{compo_id}/reveal_entry/POST{"entry_id": N}.../live_voting/{compo_id}/hide_entry/POST{"entry_id": N}.../live_voting/{compo_id}/reveal_all/POST.../live_voting/{compo_id}/hide_all/POST.../live_voting/{compo_id}/reset/POSTNotes
order_index) can be revealed individually