Lane 11 PR 10: edit a sheet, and it saves itself (#737) #975

Merged
claude-bot merged 6 commits from build/lane11-10-editing into main 2026-09-30 15:07:19 +00:00
Collaborator

Part of #737 (lane 11, character sheets), PR 10 of the build contract. It builds on PR 9 (#972, merged).

What's new

  • Edit mode: source fields become inputs of the right kind:

    • numbers, with the definition's min/max/step and a message before sending;
    • text;
    • choices that also accept a name of your own;
    • ranks as pips you press;
    • add/remove rows on the generic sheet.

    Worked-out figures stay text and update live as you type (live.js runs the JS evaluator).

  • Autosave: there is no Save button. The save line shows Saving…, Saved at, or Not saved with Try again, and is blank until the first save. A draft is kept on the device until it lands (editState.js, useSheetEditor.js), and there is a leave guard.

  • Conflicts: if someone else saved first, ConflictPanel shows both values of each field. Keep mine or Use theirs, and focus then returns to the save line.

  • Locks: the GM can lock a field or a group, and the player sees it as locked. A refused save reverts the input, and the save line warns "Not saved. That part of the sheet is the GM's to change."

  • Audience: each group with its own audience gets the audience picker.

  • Versions: every save is a version, and any of them can be put back from Versions.

  • Make a sheet: shown on a person's or creature's page with no sheet, for the GM and for the character's own player.

  • Accessibility:

    • Field and cell errors are tied to their inputs with aria-describedby.
    • The label sits in a row above each control, with Lock beside it.
    • Long names wrap. App bar crumb segments ellipsise and carry their full text in title.
  • Lane 0:

    • SaveState gains note and blank.
    • AudiencePicker radios are 24×24.
    • AppBar crumb truncation.
    • Derivation prints a constant term once.

Checks

  • Render-checked twice at 390×844 and 1440 in both themes, as Priya (player) and Dana (GM). The first round found nine faults; the re-render shows all nine fixed, axe clean, no page overflow.
  • Also re-checked /design AudiencePicker and normal-length crumbs on other pages.
  • Full vitest passes, and lint has 0 errors.
  • Changelog: changelog.d/737-lane11-sheet-editing.added.md. CATALOGUE and ledger updated.

🤖 Generated with Claude Code

Part of #737 (lane 11, character sheets), PR 10 of the build contract. It builds on PR 9 (#972, merged). **What's new** - **Edit mode:** source fields become inputs of the right kind: - numbers, with the definition's min/max/step and a message before sending; - text; - choices that also accept a name of your own; - ranks as pips you press; - add/remove rows on the generic sheet. Worked-out figures stay text and update live as you type (`live.js` runs the JS evaluator). - **Autosave:** there is no Save button. The save line shows Saving…, Saved at, or Not saved with Try again, and is blank until the first save. A draft is kept on the device until it lands (`editState.js`, `useSheetEditor.js`), and there is a leave guard. - **Conflicts:** if someone else saved first, `ConflictPanel` shows both values of each field. Keep mine or Use theirs, and focus then returns to the save line. - **Locks:** the GM can lock a field or a group, and the player sees it as locked. A refused save reverts the input, and the save line warns "Not saved. That part of the sheet is the GM's to change." - **Audience:** each group with its own audience gets the audience picker. - **Versions:** every save is a version, and any of them can be put back from Versions. - **Make a sheet:** shown on a person's or creature's page with no sheet, for the GM and for the character's own player. - **Accessibility:** - Field and cell errors are tied to their inputs with `aria-describedby`. - The label sits in a row above each control, with Lock beside it. - Long names wrap. App bar crumb segments ellipsise and carry their full text in `title`. - **Lane 0:** - `SaveState` gains `note` and `blank`. - `AudiencePicker` radios are 24×24. - `AppBar` crumb truncation. - `Derivation` prints a constant term once. **Checks** - Render-checked twice at 390×844 and 1440 in both themes, as Priya (player) and Dana (GM). The first round found nine faults; the re-render shows all nine fixed, axe clean, no page overflow. - Also re-checked `/design` AudiencePicker and normal-length crumbs on other pages. - Full vitest passes, and lint has 0 errors. - Changelog: `changelog.d/737-lane11-sheet-editing.added.md`. CATALOGUE and ledger updated. 🤖 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-10-editing
All checks were successful
CI / Summarisation accuracy eval harness (stub provider) (pull_request) Successful in 2m22s
CI / Bot tests and audit (pull_request) Successful in 4m20s
CI / Backend lint (ruff) (pull_request) Successful in 1m5s
CI / Feedback site tests (pull_request) Successful in 1m46s
CI / Bot/backend version sync (pull_request) Successful in 58s
CI / Docker image build (pull_request) Successful in 1m6s
CI / Frontend (shard 2/2) (pull_request) Successful in 15m45s
CI / Does this change touch the recording path? (pull_request) Successful in 41s
CI / Synthetic session harness (no GPU, no LLM) (pull_request) Has been skipped
CI / Frontend (shard 1/2) (pull_request) Successful in 20m57s
CI / Backend migration, tests, and audit (pull_request) Successful in 44m15s
CI / End-to-end journeys (desktop) (pull_request) Successful in 21m53s
CI / End-to-end journeys (keyboard) (pull_request) Successful in 21m40s
CI / End-to-end journeys (phone) (pull_request) Successful in 15m33s
8bc9f79cff
Sign in to join this conversation.
No description provided.