Skip to content

Full date and round in game lists; engine evals from White's side - #292

Merged
jozef2svrcek merged 3 commits into
mainfrom
game-list-date-round
Sep 21, 2026
Merged

jozef2svrcek merged 3 commits into
mainfrom
game-list-date-round

Conversation

@jozef2svrcek

@jozef2svrcek jozef2svrcek commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Summary

The Players page (and the Games page, which shares the list) showed only the year, and games played on the same day came back in no particular order.

  • Date column replaces Year. It shows the known part: 2026-03-15, 2026-03 or 2026.
  • Round column is new. It's blank when the round is unknown (? or -).
  • Order: newest date first, then latest round first, so a tournament's games read in playing order. Rounds are compared as numbers on their round and sub-round parts, so 10 sorts before 9 and 3.2 before 3.1. Game id breaks any remaining ties, so infinite-scroll paging never skips or repeats a game.
  • Partial dates (2026-??-??) now sort below that year's fully dated games. Before, they sorted above them, because ? sorts after digits.
  • Saved column widths are merged with the new defaults, so existing layouts keep working.

Also in this PR: engine panel and Analysis rail

  • chessdb evals are shown from White's side, like Lichess. chessdb scores moves for the side to move, so with Black to move a good move was positive there and negative in Lichess. Now negative always means Black is better.
  • Lichess evals are colour-coded like chessdb's. In both lists green/red means good/bad for the player to move, matching the !/? marks, not the displayed sign.
  • Scrollbar no longer covers the close ✕ in the Analysis page's column of open games. WebKitGTK draws the scrollbar over the content, so the column now has right padding.

Cost

With no filter, the Games page sorts every game. On a synthetic 14M-row table each page takes about 125 ms instead of about 6 ms: the round expressions are computed for every row. A player's list is a few hundred games, so the change is negligible there.

Test plan

  • cargo test -p chess-db: 107 passed
  • Client typechecks and vite build succeeds
  • Test database with same-day games in rounds 7–11, 3.1/3.2 and a year-only date: order is 03-15 R11 → 03-14 R10, R9 → 03-13 R8, R7, 3.2, 3.1 → 2026-??-?? → 2025. The offset page continues correctly.
  • Checked in the app on the real database (drafts 0.17.2 and 0.17.3)

🤖 Generated with Claude Code

https://claude.ai/code/session_01FzbThuPFuAz9VYWoZd4ESu

jozef2svrcek and others added 3 commits September 21, 2026 21:09
The Players and Games pages showed only the year, and games on the same
day came back in no particular order.

- Replace the Year column with Date (the known part: 2026-03-15, 2026-03
  or 2026) and add a Round column; saved column widths are kept.
- /games returns each game's round and orders by date, then round (as
  numbers on its round and sub-round parts, so 10 sorts before 9), then id
  so paging is stable.
- Unknown date parts sort as zero: "2026-??-??" sorted above every dated
  2026 game, since "?" sorts after digits.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FzbThuPFuAz9VYWoZd4ESu
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FzbThuPFuAz9VYWoZd4ESu
…l scrollbar

- chessdb.cn scores are side-to-move relative; show them White-relative
  like Lichess, so negative always means Black is better.
- Colour Lichess evals as well as chessdb ones. Green/red means good/bad
  for the player to move, matching the !/? marks, not the displayed sign.
- Pad the Analysis page's column of open games: WebKitGTK draws the
  scrollbar over the content, where it covered each card's close button.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WhMko1N4uhAAyTjAkBcqAS
@jozef2svrcek jozef2svrcek changed the title Show the full date and round in the game list, sorted by both Full date and round in game lists; engine evals from White's side Sep 21, 2026
@jozef2svrcek
jozef2svrcek merged commit d53f64c into main Sep 21, 2026
6 checks passed
@jozef2svrcek
jozef2svrcek deleted the game-list-date-round branch September 21, 2026 20:18
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