Skip to content

fix: juror round listing shows wrong rounds#571

Open
lgelauff wants to merge 4 commits into
masterfrom
fix/juror-round-visibility
Open

fix: juror round listing shows wrong rounds#571
lgelauff wants to merge 4 commits into
masterfrom
fix/juror-round-visibility

Conversation

@lgelauff
Copy link
Copy Markdown
Collaborator

Summary

  • Fixes juror round listing to filter by round status, not just campaign status — finalized and cancelled rounds inside active campaigns were showing up and producing a confusing 400 "round not active" error when clicked
  • Restricts the active view to rounds with status IN (active, paused) in the first pass, then narrows to active only (open question: should paused rounds be visible to jurors in read-only mode? see discussion)
  • Fixes get_index() passthrough bug where only_active=False was ignored when calling get_all_rounds_task_counts, causing /juror/campaigns/all to always return an empty list
  • Removes unused router import in RoundEdit.vue

Root cause: e3069dd (#350) added finalize_round which 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 how Campaign.active_round treats pause state, but jurors clicking a paused round get a 400 — that would need a frontend affordance or a dedicated endpoint.

Test plan

  • Juror index does not show finalized or cancelled rounds from active campaigns
  • Juror index does not show paused rounds (current behaviour — revisit after discussion above)
  • /juror/campaigns/all returns finalized rounds correctly
  • pytest montage/tests/ passes

🤖 Generated with Claude Code

lgelauff and others added 4 commits May 23, 2026 23:41
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>
@lgelauff
Copy link
Copy Markdown
Collaborator Author

Extracted from #564

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant