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

lgelauff added a commit that referenced this pull request Jul 6, 2026
Removes the juror active-view round-status filtering and the RoundEdit.vue
unused-import cleanup from this infra PR. Both are behavioral/app-logic changes
unrelated to the buildservice migration and are owned by #571
("fix: juror round listing shows wrong rounds"), where the paused-round
visibility question is still under discussion.

Reverts the rdb.py `get_all_rounds_task_counts` status filter (introduced in
6b68758, narrowed in 9b2ceae), the associated test_web_basic.py assertion, and
the RoundEdit.vue router-import removal (f210c91).

Refs #571

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
lgelauff added a commit that referenced this pull request Jul 6, 2026
Removes the juror active-view round-status filtering and the RoundEdit.vue
unused-import cleanup from this infra PR. Both are behavioral/app-logic changes
unrelated to the buildservice migration and are owned by #571
("fix: juror round listing shows wrong rounds"), where the paused-round
visibility question is still under discussion.

Reverts the rdb.py `get_all_rounds_task_counts` status filter (introduced in
6b68758, narrowed in 9b2ceae), the associated test_web_basic.py assertion, and
the RoundEdit.vue router-import removal (f210c91).

Refs #571

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
lgelauff added a commit that referenced this pull request Jul 6, 2026
This behavioral fix belongs to #571 (juror round listing), not the buildservice
migration. Restores master's only_active=True to keep #564 infra-only.

Refs #571
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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