Skip to content

feat(standings): show W-D-L in matches column when draws are enabled - #8178

Merged
Rathoz merged 4 commits into
mainfrom
claude/match-column-w-d-l-draws-044e20
Oct 7, 2026
Merged

Rathoz merged 4 commits into
mainfrom
claude/match-column-w-d-l-draws-044e20

Conversation

@Rathoz

@Rathoz Rathoz commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Matches column (matchdiff) shows W - D - L instead of W - L when draws are enabled
  • Draws are enabled automatically if any match in the table is a draw. Can be overridenby the |matchdraws=true/false
  • Legacy SwissTableLeague maps ties to matchdraws (auto input = auto-detect)
  • Tiebreakers get a per-level draw config (match/game/round), so game/round level can follow independently
  • Stored hasdraw now reflects match draws instead of always false

How did you test this change?

busted

The matchdiff tiebreaker always displayed W - L, hiding draws. Draws are
now resolved once per standings table in the parser: the `matchdraws`
wikicode toggle wins when set, otherwise draws are enabled if any match
in the table is a draw. Resolving per table (not per round) keeps the
format consistent across all rounds.

Tiebreakers now receive options with a per-level draw config
(match/game/round) via the factory, so game and round level can opt in
independently later. Only match level is wired up for now.

The stored `hasdraw` flag now reflects the resolved match-level value
instead of a hardcoded false. Legacy SwissTableLeague maps `ties` to
`matchdraws`, with `auto` meaning auto-detect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 7, 2026 14:10
@Rathoz
Rathoz requested review from a team as code owners October 7, 2026 14:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The legacy Swiss mapping drops boolean ties = false, allowing auto-detection to override an explicit disable.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds draw-aware match records to standings, using explicit toggles or table-wide auto-detection.

Changes:

  • Displays W-D-L when match draws are enabled.
  • Passes per-level draw options through tiebreakers and updates stored hasdraw.
  • Maps legacy Swiss ties and adds parser/display tests.
File Description
lua/​wikis/​commons/​Standings/​Tiebreaker/​Match/​Diff.lua Displays match draws when enabled.
lua/​wikis/​commons/​Standings/​Tiebreaker/​Interface.lua Defines per-level draw options.
lua/​wikis/​commons/​Standings/​Tiebreaker/​Factory.lua Passes options to tiebreakers.
lua/​wikis/​commons/​Standings/​Table/​Legacy/​Swiss.lua Maps legacy ties input.
lua/​wikis/​commons/​Standings/​Table.lua Forwards parsed draw configuration.
lua/​wikis/​commons/​Standings/​Parser.lua Resolves table-wide draw settings and stores hasdraw.
lua/​wikis/​commons/​Standings/​Parse/​Wiki.lua Parses the matchdraws toggle.
lua/​spec/​standings_tiebreaker_spec.lua Tests draw-aware match display.
lua/​spec/​standings_parser_spec.lua Tests toggles and cross-round auto-detection.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lua/wikis/commons/Standings/Table/Legacy/Swiss.lua Outdated

@hjpalpha hjpalpha left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm on phone

Same result for all wikicode string inputs ('auto' still means
auto-detect), consistent with how `exclusive` is read and keeps a
boolean false intact for any future Lua caller.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Rathoz
Rathoz requested a review from hjpalpha October 7, 2026 14:24
@Rathoz
Rathoz merged commit cac50b3 into main Oct 7, 2026
8 checks passed
@Rathoz
Rathoz deleted the claude/match-column-w-d-l-draws-044e20 branch October 7, 2026 15:47
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.

3 participants