Skip to content

fix: scope host previousRoundMachinations to a single round - #202

Merged
Garemat merged 1 commit into
mainfrom
fix/previous-round-machinations-scope
Jul 14, 2026
Merged

fix: scope host previousRoundMachinations to a single round#202
Garemat merged 1 commit into
mainfrom
fix/previous-round-machinations-scope

Conversation

@Garemat

@Garemat Garemat commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Description

Backend PR #15 in lunachron-backend changed the host-only previousRoundMachinations query to return every past round's submissions (tagged with a new roundNumber field) instead of just the previous round. The app never picked up the new field, so PreviousRoundMachinationsSection flattened all past rounds together, inflating "Supported by" lists with duplicate names for hosts only — member responses stayed correctly scoped server-side and were unaffected.

This adds roundNumber: Int? to OnlineMachinationEntry (null when absent, i.e. for member responses) and filters entries by roundNumber == previousRound before aggregating supporters/sabotages, so hosts see the same single-round data as everyone else.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have added tests that prove my fix is effective or that my feature works (N/A for now)
  • New and existing unit tests pass locally with my changes (N/A for now)

Backend PR #15 changed the host-only previousRoundMachinations query
to return every past round's submissions tagged with a roundNumber
field, instead of just the previous round. The app never picked up
the new field, so PreviousRoundMachinationsSection flattened all past
rounds together, showing inflated/duplicated "Supported by" lists for
hosts only (members' responses are still correctly scoped server-side
and were unaffected).
@Garemat
Garemat force-pushed the fix/previous-round-machinations-scope branch from 856f638 to 1f7a306 Compare July 14, 2026 14:32
@Garemat
Garemat merged commit e456cea into main Jul 14, 2026
6 checks passed
@Garemat
Garemat deleted the fix/previous-round-machinations-scope branch July 14, 2026 14:42
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