Import, statistics page and game client following (#4 to #12, #15) #25

Merged
nessar merged 5 commits from feat/import-statistics-client-following into main 2026-11-16 23:48:31 +01:00
Owner

Summary

First usable version of the app from the spec (#1): steps 1 to 4 of the agreed delivery order. Step 5, the champ select view (#13), is not in this pull request.

  • Import (#4): every Arena Match the Riot API still holds, stored once per Account with its raw payload. Idempotent, resumable, throttled to the personal-key limits.
  • Statistics page (#5, #6, #7, #8): Challenge header, three charts, sortable and filterable champion table with portraits, Season and Format selectors, editable seasons.toml.
  • Settings, refresh, banners (#9): key prompt on first launch, Paramètres, Actualiser, one banner per failure, stored data always visible.
  • Game client (#10, #11, #12): follows the signed-in Account, adds a finished Arena game by itself, shows the Official Progress next to the Completed count.
  • CI (#15): format, clippy and tests of the core crate on every pull request and push to main.

Closes #5, closes #6, closes #7, closes #8, closes #9, closes #10, closes #11. Refs #4, #12 and #15, which still have a human step (see below).

How it was checked

  • Core: 137 tests through the public interface with fake sources and a real SQLite database, clippy with warnings as errors, cargo fmt --check.
  • App: 11 unit tests, clippy and a build with the Windows toolchain.
  • Run on the real machine: full import of 468 Matches, statistics page, Account detected from the client, two finished games added without a click.
  • Two independent verification passes and a two-axis code review; their confirmed findings are fixed in this branch.

Spec open points settled: placement is present in real Arena 3x6 responses; every Format counts toward the game's counter (52 in the app, 52 in the client for 2026 Season 2); the client's game id is the numeric part of the Riot match id.

Work left to do

Before merging

  • Run this branch (scripts/win run) and look at the last round of changes, which passed the tests but has not been seen on screen: the reworked client following (two games ended in a row, refresh during an Account switch), the Non mis à jour mark when no Account is being updated, the page staying visible with an empty key, the refresh queued after saving a key.
  • Review the client-following logic in crates/core/src/follow.rs: it was rewritten after the second verification pass and has not been through a third.

Human steps of the tickets

  • #4: compare Placement and Win of one real Arena 3x6 Match with what the game showed, and note the result on the ticket.
  • #12: note the outcome on the ticket (all Formats count, 52 = 52 on 2026-11-16).
  • #15: register a Linux act_runner on the Gitea instance and watch one failing and one passing pull request. The workflow has never run.

Not done

  • #13 champ select view. It needs one real Arena champ select captured from the client first; none happened during this work.
  • Start date of the 2025 Season (spec open point), still 2025-03-05 unconfirmed.

Known limits

  • A key from another Riot application gives the same Riot ID a different puuid, so the Account appears a second time and is imported again. An automatic merge was written and removed: it could merge two different Accounts.
  • A Match in an unknown Arena queue is imported only when the app sees that game end. History listing asks Riot for the four known queues.
  • The rate-limit response (HTTP 429) path is covered by tests with a fake source, never observed against the live API.
  • Season 1 2026 shows 7 Completed against 17 in the client: the Riot API no longer holds all of that Season's Matches. The cross-check only runs on the current Season, as specified.
  • Between c44cf52 and 47ac401 the app crate does not build (the core changed first); the core builds and passes at every commit.

🤖 Generated with Claude Code

## Summary First usable version of the app from the spec (#1): steps 1 to 4 of the agreed delivery order. Step 5, the champ select view (#13), is not in this pull request. - **Import (#4)**: every Arena Match the Riot API still holds, stored once per Account with its raw payload. Idempotent, resumable, throttled to the personal-key limits. - **Statistics page (#5, #6, #7, #8)**: Challenge header, three charts, sortable and filterable champion table with portraits, Season and Format selectors, editable `seasons.toml`. - **Settings, refresh, banners (#9)**: key prompt on first launch, `Paramètres`, `Actualiser`, one banner per failure, stored data always visible. - **Game client (#10, #11, #12)**: follows the signed-in Account, adds a finished Arena game by itself, shows the Official Progress next to the Completed count. - **CI (#15)**: format, clippy and tests of the core crate on every pull request and push to `main`. Closes #5, closes #6, closes #7, closes #8, closes #9, closes #10, closes #11. Refs #4, #12 and #15, which still have a human step (see below). ## How it was checked - Core: 137 tests through the public interface with fake sources and a real SQLite database, clippy with warnings as errors, `cargo fmt --check`. - App: 11 unit tests, clippy and a build with the Windows toolchain. - Run on the real machine: full import of 468 Matches, statistics page, Account detected from the client, two finished games added without a click. - Two independent verification passes and a two-axis code review; their confirmed findings are fixed in this branch. Spec open points settled: `placement` is present in real Arena 3x6 responses; every Format counts toward the game's counter (52 in the app, 52 in the client for 2026 Season 2); the client's game id is the numeric part of the Riot match id. ## Work left to do ### Before merging - [x] Run this branch (`scripts/win run`) and look at the last round of changes, which passed the tests but has not been seen on screen: the reworked client following (two games ended in a row, refresh during an Account switch), the `Non mis à jour` mark when no Account is being updated, the page staying visible with an empty key, the refresh queued after saving a key. - [x] Review the client-following logic in `crates/core/src/follow.rs`: it was rewritten after the second verification pass and has not been through a third. ### Human steps of the tickets - [x] #4: compare Placement and Win of one real Arena 3x6 Match with what the game showed, and note the result on the ticket. - [x] #12: note the outcome on the ticket (all Formats count, 52 = 52 on 2026-11-16). - [x] #15: register a Linux `act_runner` on the Gitea instance and watch one failing and one passing pull request. The workflow has never run. ### Not done - [ ] #13 champ select view. It needs one real Arena champ select captured from the client first; none happened during this work. - [x] Start date of the 2025 Season (spec open point), still `2025-03-05` unconfirmed. ### Known limits - A key from another Riot application gives the same Riot ID a different puuid, so the Account appears a second time and is imported again. An automatic merge was written and removed: it could merge two different Accounts. - A Match in an unknown Arena queue is imported only when the app sees that game end. History listing asks Riot for the four known queues. - The rate-limit response (HTTP 429) path is covered by tests with a fake source, never observed against the live API. - Season 1 2026 shows 7 Completed against 17 in the client: the Riot API no longer holds all of that Season's Matches. The cross-check only runs on the current Season, as specified. - Between `c44cf52` and `47ac401` the app crate does not build (the core changed first); the core builds and passes at every commit. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
nessar added 5 commits 2026-11-16 19:07:09 +01:00
Runs cargo fmt, clippy with warnings as errors and cargo test on the
core crate for every pull request and push to main (ticket #15). The
app crate is left out: it only builds on Windows (ADR-0003).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Payloads recorded from the Riot API, the local League client and Data
Dragon, trimmed, with player identities and match ids replaced. The
certificate is Riot's published root, the only one trusted when talking
to the local client.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Core half of tickets #4 to #12, behind one public interface tested with
fake sources and a real SQLite database:

- import of Arena Match history from the Riot API, idempotent and
  resumable, with a sync mark written only when a sync completes
- Season table, champion catalog, Challenge summary, champion rows,
  chart series, Season and Format scopes
- game client port and adapter: signed-in Account, end of an Arena
  game fetched by its id, Official Progress cross-check
- update problems reported for banners while stored data stays readable

The app crate is adapted in the next commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
App half of tickets #4 to #12: Challenge header, three charts, sortable
and filterable champion table, Season, Format and Account selectors,
key prompt and settings, refresh button, update banners and the
Official Progress next to the Completed count.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Document configuration and CI in the README
CI / core (pull_request) Successful in 1m13s
CI / core (push) Successful in 1m13s
03ad0ec90a
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
nessar merged commit 03ad0ec90a into main 2026-11-16 23:48:31 +01:00
nessar deleted branch feat/import-statistics-client-following 2026-11-16 23:48:31 +01:00
Sign in to join this conversation.