The admin list now groups endgames under collapsible Key headers and can be
filtered by Theme (search + tappable chips) and Key. Group counts and
filtering run in SQL, and a group's endgames are fetched only when it is
expanded, so the list stays fast as the dataset grows.
- Add Endgames.list_keys/0, list_key_groups/1 and list_endgames_for_key/2.
- Add the shared ChesstrainerWeb.EndgameList filter bar and grouped list
component (to be reused by the player picker).
- Rework EndgameLive.Index around server-side group state.
Closes#15
The Endgame key is now a canonical, colour-agnostic material signature derived
from the FEN instead of a hand-typed field: each side's pieces, strongest side
first by material value (e.g. "KQ v KR"). This fixes the seed ordering
inconsistency and guarantees the key always matches the position.
- Add Chesstrainer.Key.from_fen/1.
- Compute the key in the Endgame changeset; drop the manual input and its
regex validation.
- Index endgames.key and derive keys in the seeds.
- Document the Key term and the decision (ADR 0003).
Closes#13
Rename the endgame-label concept from Tag to Theme to match the glossary:
the context becomes Chesstrainer.Themes, the schema Chesstrainer.Themes.Theme,
and the Endgame association is :themes. The category enum
(endgame/opening/tactic) is preserved.
Rewrite the original migrations in place so themes / endgames_themes
(with theme_id) are created directly, instead of adding a transition
migration.
Closes#12
#11: endgames can carry multiple themes (endgame tags) chosen from a
searchable, autocompleting picker with inline creation. Tags are staged
in the form and saved atomically, so they work on both New and Edit.
Tag names are trimmed and case-insensitively unique per category. Admin
Show and Index display themes, and the seeds ship a starter vocabulary.
The theme picker has its own form: LiveView requires phx-change inputs to
live inside a form, and a separate theme form keeps Enter from
submitting the endgame form.
* create endgame play section
* add cache tests
* normalise FENs - trim and fuill move to 1 on addition
* remove svg on root and allow navbar to exist across all pages
* update nav items