A 5e sheet says each figure once; conditions from the game's list; +5 and Full HP (#1121) #1125

Merged
claude-bot merged 3 commits from fix/1121-sheet-5e-terms-and-card-hp into main 2026-10-11 22:31:30 +00:00
Collaborator

Items 1 and 7 of the owner's lane 11 review (#1121). Decision D292.

What changes

  • A 5e sheet no longer prints each term's number twice (bug). The page draws a term as label value; the dnd5e definitions had baked the value into the label ("Chain mail 16"), so AC read "Chain mail 16 16 + Shield 2 2", and the same on saves, skills, initiative, attacks, spell attack and DC. The labels in dnd5e/character.json and creature.json are now bare names, as pf2e's are, and formula working moves to the term's note ("Con 6 (2 × 3)"). The fixtures had pinned the baked labels as correct and are re-pinned; a new page test asserts "Chain mail 16 + Shield 2". No renderer change. A built-in definition is updated in place when its file changes (ensure_builtin), so existing sheets pick this up with no version bump or migration.
  • Conditions are picked from the game's list. "Add a condition" shows the definition's own tables.conditions (15 for 5e, 32 for Pathfinder) in the kit's Picker, with the typed field kept below for anything else. Before, it was a text field with a datalist fed by about seven conditions found in modifiers. Shared by the sheet page and the table card, rules cards included.
  • Hit points: −5, −1, +1, +5 and Full HP. One shared stepsFor; Resource gains an optional onFull, shown only below max, sending {path:"hp", op:"set", value:max} (not reset, which would drop temporary HP). No backend change.

Checks

  • Full frontend vitest run: 3,913 passed. eslint: 0 errors.
  • Backend tests/sheets and tests/test_demo_seed.py on the dev server: 759 passed. Ruff: clean.
  • scripts/changelog.py check: OK.
  • A wider backend run the builder assembled by hand reported 99 errors that were not investigated; this PR's full backend job is the check on that.
  • Not yet looked at in a browser: the 5e derivation lines (including zero-value terms), the four HP buttons plus Full HP on a table card at 390 px, and the condition picker in both themes.

sources/intro.md and CATALOGUE.md were edited by hand (no pwsh to run build.ps1); they will conflict with #1124's D291 row and need both rows kept.

🤖 Generated with Claude Code

Items 1 and 7 of the owner's lane 11 review (#1121). Decision D292. ## What changes - **A 5e sheet no longer prints each term's number twice (bug).** The page draws a term as `label value`; the dnd5e definitions had baked the value into the label ("Chain mail 16"), so AC read "Chain mail 16 16 + Shield 2 2", and the same on saves, skills, initiative, attacks, spell attack and DC. The labels in `dnd5e/character.json` and `creature.json` are now bare names, as pf2e's are, and formula working moves to the term's note ("Con 6 (2 × 3)"). The fixtures had pinned the baked labels as correct and are re-pinned; a new page test asserts "Chain mail 16 + Shield 2". No renderer change. A built-in definition is updated in place when its file changes (`ensure_builtin`), so existing sheets pick this up with no version bump or migration. - **Conditions are picked from the game's list.** "Add a condition" shows the definition's own `tables.conditions` (15 for 5e, 32 for Pathfinder) in the kit's Picker, with the typed field kept below for anything else. Before, it was a text field with a datalist fed by about seven conditions found in modifiers. Shared by the sheet page and the table card, rules cards included. - **Hit points: −5, −1, +1, +5 and Full HP.** One shared `stepsFor`; `Resource` gains an optional `onFull`, shown only below max, sending `{path:"hp", op:"set", value:max}` (not `reset`, which would drop temporary HP). No backend change. ## Checks - Full frontend `vitest run`: 3,913 passed. eslint: 0 errors. - Backend `tests/sheets` and `tests/test_demo_seed.py` on the dev server: 759 passed. Ruff: clean. - `scripts/changelog.py check`: OK. - A wider backend run the builder assembled by hand reported 99 errors that were not investigated; this PR's full backend job is the check on that. - Not yet looked at in a browser: the 5e derivation lines (including zero-value terms), the four HP buttons plus Full HP on a table card at 390 px, and the condition picker in both themes. `sources/intro.md` and `CATALOGUE.md` were edited by hand (no `pwsh` to run `build.ps1`); they will conflict with #1124's D291 row and need both rows kept. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The dnd5e definitions baked the number into each derivation label, and the
page prints the value beside the label, so Chain mail 16 read "16 16". Labels
are now bare names as in pf2e, and a formula's working (hit points, the
proficiency bonus, carrying capacity) is a note. Fixtures re-pinned.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(sheets): pick conditions from the game's list; -5/-1/+1/+5 and Full HP (D292, #1121)
All checks were successful
CI / Does this change touch the recording path? (pull_request) Successful in 24s
CI / Synthetic session harness (no GPU, no LLM) (pull_request) Has been skipped
CI / Bot/backend version sync (pull_request) Successful in 53s
CI / Docker image build (pull_request) Successful in 55s
CI / Backend lint (ruff) (pull_request) Successful in 59s
CI / Summarisation accuracy eval harness (stub provider) (pull_request) Successful in 1m6s
CI / Feedback site tests (pull_request) Successful in 1m29s
CI / Bot tests and audit (pull_request) Successful in 3m23s
CI / Frontend (shard 2/2) (pull_request) Successful in 9m24s
CI / Frontend (shard 1/2) (pull_request) Successful in 10m56s
CI / End-to-end journeys (phone) (pull_request) Successful in 19m40s
CI / End-to-end journeys (keyboard) (pull_request) Successful in 21m16s
CI / End-to-end journeys (desktop) (pull_request) Successful in 21m36s
CI / Backend migration, tests, and audit (pull_request) Successful in 34m48s
86ac95c174
Add a condition shows the definition's conditions table as a Picker, with the
typed name kept for one not on it. Hit points move by -5, -1, +1, +5 (one
shared stepsFor), and Resource takes an optional Full HP that sets hp to max
on the sheet page and the table card.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merge main into fix/1121-sheet-5e-terms-and-card-hp
All checks were successful
CI / Backend lint (ruff) (pull_request) Successful in 31s
CI / Bot/backend version sync (pull_request) Successful in 35s
CI / Docker image build (pull_request) Successful in 36s
CI / Does this change touch the recording path? (pull_request) Successful in 25s
CI / Synthetic session harness (no GPU, no LLM) (pull_request) Has been skipped
CI / Summarisation accuracy eval harness (stub provider) (pull_request) Successful in 1m11s
CI / Feedback site tests (pull_request) Successful in 1m2s
CI / Bot tests and audit (pull_request) Successful in 2m18s
CI / Frontend (shard 2/2) (pull_request) Successful in 9m23s
CI / Frontend (shard 1/2) (pull_request) Successful in 13m18s
CI / End-to-end journeys (keyboard) (pull_request) Successful in 14m22s
CI / End-to-end journeys (desktop) (pull_request) Successful in 14m40s
CI / End-to-end journeys (phone) (pull_request) Successful in 15m5s
CI / Backend migration, tests, and audit (pull_request) Successful in 38m6s
dc014c8ac7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	docs/design/redesign-surfaces/CATALOGUE.md
#	docs/design/redesign-surfaces/sources/intro.md
claude-bot scheduled this pull request to auto merge when all checks succeed 2026-10-11 21:53:22 +00:00
Sign in to join this conversation.
No description provided.