Lane 11 PR 9: the sheet page, read (#737) #972

Merged
claude-bot merged 6 commits from build/lane11-9-sheet-page into main 2026-09-30 13:09:57 +00:00
Collaborator

Part of #737 (lane 11, character sheets), PR 9 of the build contract (docs/design/lane11-build-contract.md). This adds the page for reading a sheet; editing comes in PR 10.

What's new

  • Route: /campaigns/:cid/wiki/:entryId/sheet, a document of its own. "Open the sheet" on the article leads there. A page that is not a person or a creature says it has no sheet.
  • Pages: Statistics, Abilities & inventory, Notes & actions, and Spells for a caster. They are in the Contents (useContents gains a sheet place) and, on a phone, in the Contents sheet.
  • Rendering: everything is drawn from the system's definition (pages/sheet/model.js, Fields.jsx, SheetBody.jsx), so PF2e, 5e and the generic sheet are one page. The page shows:
    • every figure once, with its derivation beneath it (on tap on a phone);
    • ranks, HP, dying, wounded and hero points;
    • strikes worked out from the inventory;
    • feats by level;
    • the inventory with its bulk and where each thing is;
    • spells by rank with the slots left;
    • the character's actions with their cost and full text.
  • Edge cases:
    • An item whose pack has gone keeps its last numbers and says so.
    • Groups a player keeps for themselves, and groups for the GM, wear the GM colour.
    • A reader who may not edit is told so quietly.
  • Export and print: Export gives Quest Board JSON (route #11), and Print the sheet prints every page (@media print).
  • Lane 0: ui/Derivation hides zero-value terms when another term is non-zero, and prints a constant term once.
  • Class name: the page's root class is .charsheet, because .sheet collided with the Contents panel.

Checks

  • Render-checked at 390×844 and 1440 in both themes against lane9.html. That round found the .sheet class collision, the label, the place before load, the pill, the actions, the menu, the header row, zero terms, scroll regions, one-page sheets and print, all fixed in 02e79e26.
  • Axe is clean.
  • SheetPage.test.jsx (816 lines) runs on the shared conformance fixtures via sheetFixtures.js. Article, useContents and Derivation tests are updated.
  • Changelog: changelog.d/737-lane11-sheet-page.added.md.

🤖 Generated with Claude Code

Part of #737 (lane 11, character sheets), PR 9 of the build contract (`docs/design/lane11-build-contract.md`). This adds the page for reading a sheet; editing comes in PR 10. **What's new** - **Route:** `/campaigns/:cid/wiki/:entryId/sheet`, a document of its own. "Open the sheet" on the article leads there. A page that is not a person or a creature says it has no sheet. - **Pages:** Statistics, Abilities & inventory, Notes & actions, and Spells for a caster. They are in the Contents (`useContents` gains a sheet place) and, on a phone, in the Contents sheet. - **Rendering:** everything is drawn from the system's definition (`pages/sheet/model.js`, `Fields.jsx`, `SheetBody.jsx`), so PF2e, 5e and the generic sheet are one page. The page shows: - every figure once, with its derivation beneath it (on tap on a phone); - ranks, HP, dying, wounded and hero points; - strikes worked out from the inventory; - feats by level; - the inventory with its bulk and where each thing is; - spells by rank with the slots left; - the character's actions with their cost and full text. - **Edge cases:** - An item whose pack has gone keeps its last numbers and says so. - Groups a player keeps for themselves, and groups for the GM, wear the GM colour. - A reader who may not edit is told so quietly. - **Export and print:** Export gives Quest Board JSON (route #11), and Print the sheet prints every page (`@media print`). - **Lane 0:** `ui/Derivation` hides zero-value terms when another term is non-zero, and prints a constant term once. - **Class name:** the page's root class is `.charsheet`, because `.sheet` collided with the Contents panel. **Checks** - Render-checked at 390×844 and 1440 in both themes against lane9.html. That round found the `.sheet` class collision, the label, the place before load, the pill, the actions, the menu, the header row, zero terms, scroll regions, one-page sheets and print, all fixed in 02e79e26. - Axe is clean. - `SheetPage.test.jsx` (816 lines) runs on the shared conformance fixtures via `sheetFixtures.js`. `Article`, `useContents` and `Derivation` tests are updated. - Changelog: `changelog.d/737-lane11-sheet-page.added.md`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Merge remote-tracking branch 'origin/main' into build/lane11-9-sheet-page
All checks were successful
CI / Summarisation accuracy eval harness (stub provider) (pull_request) Successful in 2m15s
CI / Backend lint (ruff) (pull_request) Successful in 1m6s
CI / Bot/backend version sync (pull_request) Successful in 1m6s
CI / Feedback site tests (pull_request) Successful in 1m50s
CI / Docker image build (pull_request) Successful in 1m2s
CI / Does this change touch the recording path? (pull_request) Successful in 37s
CI / Synthetic session harness (no GPU, no LLM) (pull_request) Has been skipped
CI / Bot tests and audit (pull_request) Successful in 4m35s
CI / Frontend (shard 2/2) (pull_request) Successful in 13m50s
CI / Frontend (shard 1/2) (pull_request) Successful in 19m48s
CI / Backend migration, tests, and audit (pull_request) Successful in 48m3s
CI / End-to-end journeys (phone) (pull_request) Successful in 15m31s
CI / End-to-end journeys (desktop) (pull_request) Successful in 17m36s
CI / End-to-end journeys (keyboard) (pull_request) Successful in 17m6s
209d4e1da4
Sign in to join this conversation.
No description provided.