8000 Game results are stored as English sentences and parsed back for the score · Issue #298 · alexbeeken/skrongle-mini · GitHub
[go: up one dir, main page]

Skip to content

Game results are stored as English sentences and parsed back for the score #298

Backlog

Description

@alexbeeken
  • src/games.rs:524 writes "{} to {} · best streak {}"; src/routes/games.rs:785 reads the streak back by splitting on "best streak ".
  • src/games.rs:577 writes "{mode} · {length} · {} pts"; games::dates_points (:582) strips " pts" and commas to get the number.
  • The personal best is the maximum over the last 200 rounds only (RECENT_ROUNDS), so it silently drops after 200 rounds.
  • The labels are fixed English in the database: "Days & months", "Full dates", "Lightning round", "Review mix" (src/routes/sprint.rs:439-440), and a format!("{}s", …) plural (src/routes/games.rs:722). History shows them untranslated in every language, which also breaks the rule that labels come from the manifest or i18n.

Fix, one PR:

  • A migration adds game_activity.score INTEGER, filled once by the existing parsers.
  • The finish handlers write score; personal bests read it, over all rounds.
  • label stops being a source of data. Building labels from i18n keys when the page is drawn can follow.

From the code review of 24 November 2026. Line numbers are as of 0.5.0 (2547b36).

Activity

  1. added
    review
    on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0