fix: juror round listing shows wrong rounds#571
Open
lgelauff wants to merge 4 commits into
Open
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The juror round listing was filtering on campaign status only, so finalized and cancelled rounds inside active campaigns still appeared. Jurors clicking them got a confusing 400 "round not active" error. Now only active and paused rounds are shown in the active view. Suspected cause: e3069dd (PR #350, merged 2025-10-23) added a finalize_round endpoint that can finalize individual rounds without advancing, creating a state the juror listing never filtered for. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Paused rounds were still appearing in the juror round list because the only_active filter allowed both ACTIVE_STATUS and PAUSED_STATUS. However confirm_active() only permits ACTIVE_STATUS, so clicking a paused round always produced a 400 "round not active" error. Fix restricts the juror index to strictly active rounds only. Suspected introduced by e3069dd (#350). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
get_index() accepted an only_active parameter but hard-coded True when calling get_all_rounds_task_counts, so get_all_campaigns() (the archive endpoint at /juror/campaigns/all) was always returning an empty list instead of finalized rounds. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Collaborator
Author
|
Extracted from #564 |
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.
Summary
status IN (active, paused)in the first pass, then narrows toactiveonly (open question: should paused rounds be visible to jurors in read-only mode? see discussion)get_index()passthrough bug whereonly_active=Falsewas ignored when callingget_all_rounds_task_counts, causing/juror/campaigns/allto always return an empty listrouterimport inRoundEdit.vueRoot cause:
e3069dd(#350) addedfinalize_roundwhich can finalize individual rounds without advancing the campaign, creating a state the juror listing never filtered for.Open question
Should paused rounds appear in the juror active view (read-only / greyed out) or be hidden entirely? Currently hidden (
== ACTIVE_STATUS). Showing them (IN (active, paused)) matches howCampaign.active_roundtreats pause state, but jurors clicking a paused round get a 400 — that would need a frontend affordance or a dedicated endpoint.Test plan
/juror/campaigns/allreturns finalized rounds correctlypytest montage/tests/passes🤖 Generated with Claude Code