Skip to content

Feat/match surface from game - #148

Merged
denis1011101 merged 3 commits into
mainfrom
feat/match-surface-from-game
Aug 18, 2026
Merged

Feat/match surface from game#148
denis1011101 merged 3 commits into
mainfrom
feat/match-surface-from-game

Conversation

@denis1011101

Copy link
Copy Markdown
Owner

No description provided.

denis1011101 and others added 3 commits August 19, 2026 03:05
Match#surface has been on the table with a validation and nothing ever wrote
it, so every one of the 115 rows on production shows "Surface: -" while the
game right next to it knows the answer. Saving stats now copies the game's
surface onto the row, falling back to the court's own when it offers exactly
one and the game left the field empty.

Match::SURFACES gains artificial_grass so the copy cannot fail validation on
a surface a court is allowed to offer; anything it still cannot store leaves
the old value alone rather than breaking the stats save.

A backfill for the existing rows comes with it — 77 of the 115 can be filled
from their game:

    rake player_statistics:backfill_match_surfaces

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Three fixes to the same line on the tennis life statistics page:

The outcome is gone. The score is a single string counting team A first while
"Result" came off the row the card was built from, so on the 14 matches whose
representative sits in team B the two contradicted each other.

The 2v2 badge was printed for every doubles row, which made a two-against-one
look like a card that had lost a player. It now counts the players and guests
actually on each side.

The surface prints its label instead of the raw key, so a Russian page stops
saying "hard".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A match is one against one or two against two, but the form let a block
through with two players on one side and one on the other: nothing checked the
sizes, so a forgotten player was saved as a game nobody played. Production
carries exactly one such row (13.08, Denis + Катерина against Максим).

Blocks that do not add up are now left unsaved and the alert says why, instead
of the silent skip the other guards use — the rest of the form still saves.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@denis1011101
denis1011101 merged commit f7e9ba1 into main Aug 18, 2026
4 checks passed
@denis1011101
denis1011101 deleted the feat/match-surface-from-game branch September 4, 2026 21:37
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