The Puzzle History and Replay from it #447

Closed
opened 2026-10-16 08:21:03 +00:00 by root · 3 comments
root commented 2026-10-16 08:21:03 +00:00 (Migrated from gitlab.core-project.space)

Parent

#440

What to build

A Player can review every Puzzle they tried and replay any of them, unrated.

  • History at /puzzles/history, Account-only like /puzzles: one row per Attempt, newest first, cursor-paginated like the Game list. Each row shows the date, a small read-only board of the start position, the Puzzle's rating, solved or failed, the rating change, and "last replayed" when set. A "failed only" filter, kept in the URL. Pending Attempts are not listed.
  • Replay route for one Puzzle: clicking a row opens it from its start as a Replay (#445), clearly marked unrated. Only a Puzzle this Account has an Attempt for can be replayed. Starting a Replay sets the Attempt's "last replayed at"; it adds no row and moves no rating.
  • Contract: history({ cursor?, failedOnly? }) and replay({ puzzleId }) on the puzzle router; an unreadable cursor and a not-replayable Puzzle are refused.
  • The e2e spec (S4): sign in, solve a Puzzle, fail one, see both in the History, replay one and see the rating unchanged. The injected random source makes the served Puzzles known.
  • Copy in English and French. A link to the History from the Puzzles page.

Seams: S1 (the API through its RPC contract), S3 (the app's router with the API fakes) and S4 (apps/e2e). Covers stories 39-45 of #440, and stories 1, 9, 11, 15, 39, 43 in a real browser.

Acceptance criteria

  • history lists resolved Attempts newest first with their fields, paginates, and filters to failed.
  • An unreadable cursor is refused, as in the Game list.
  • replay of an attempted Puzzle serves it from its start as a Replay and sets "last replayed at"; the History keeps one row for it.
  • replay of a Puzzle never attempted, or unknown, is refused.
  • Another Account's History is never readable.
  • Front view tests: rows, the failed-only filter, pagination, a click starting an unrated Replay, the History link.
  • The new e2e spec passes against a real stack.
  • The gate is green (CONTRIBUTING.md, "The five commands").
## Parent #440 ## What to build A Player can review every Puzzle they tried and replay any of them, unrated. - **History** at `/puzzles/history`, Account-only like `/puzzles`: one row per Attempt, newest first, cursor-paginated like the Game list. Each row shows the date, a small read-only board of the start position, the Puzzle's rating, solved or failed, the rating change, and "last replayed" when set. A "failed only" filter, kept in the URL. Pending Attempts are not listed. - **Replay route** for one Puzzle: clicking a row opens it from its start as a Replay (#445), clearly marked unrated. Only a Puzzle this Account has an Attempt for can be replayed. Starting a Replay sets the Attempt's "last replayed at"; it adds no row and moves no rating. - **Contract:** `history({ cursor?, failedOnly? })` and `replay({ puzzleId })` on the `puzzle` router; an unreadable cursor and a not-replayable Puzzle are refused. - **The e2e spec** (S4): sign in, solve a Puzzle, fail one, see both in the History, replay one and see the rating unchanged. The injected random source makes the served Puzzles known. - Copy in English and French. A link to the History from the Puzzles page. Seams: S1 (the API through its RPC contract), S3 (the app's router with the API fakes) and S4 (`apps/e2e`). Covers stories 39-45 of #440, and stories 1, 9, 11, 15, 39, 43 in a real browser. ## Acceptance criteria - [ ] `history` lists resolved Attempts newest first with their fields, paginates, and filters to failed. - [ ] An unreadable cursor is refused, as in the Game list. - [ ] `replay` of an attempted Puzzle serves it from its start as a Replay and sets "last replayed at"; the History keeps one row for it. - [ ] `replay` of a Puzzle never attempted, or unknown, is refused. - [ ] Another Account's History is never readable. - [ ] Front view tests: rows, the failed-only filter, pagination, a click starting an unrated Replay, the History link. - [ ] The new e2e spec passes against a real stack. - [ ] The gate is green (`CONTRIBUTING.md`, "The five commands").
root commented 2026-10-16 08:21:32 +00:00 (Migrated from gitlab.core-project.space)

marked this issue as related to #440

marked this issue as related to #440
root commented 2026-10-16 08:21:44 +00:00 (Migrated from gitlab.core-project.space)

marked this issue as related to #445

marked this issue as related to #445
root commented 2026-10-18 13:02:28 +00:00 (Migrated from gitlab.core-project.space)

mentioned in merge request !554

mentioned in merge request !554
root (Migrated from gitlab.core-project.space) closed this issue 2026-10-19 09:58:35 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
amaurycoudr/chess-project#447
No description provided.