Skip to content

feat(larpinq): build capability-rows-missing-requirements - #1105

Open
rubenvdlinde wants to merge 7 commits into
developmentfrom
quality/build-capability-rows-missing-requirements
Open

rubenvdlinde wants to merge 7 commits into
developmentfrom
quality/build-capability-rows-missing-requirements

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Continues openspec/changes/capability-rows-missing-requirements after #1039, which landed task 3.1. The branch already carried tasks 2.2, 3.2, 4.1, 5.1 and 6.1 in five commits pushed after #1039 merged, and they never reached a PR. This PR proposes them, merged with current development, plus the round-2 Playwright coverage.

Tasks done

  • 2.2 World timeline (REQ-SMD-002): a Timeline widget on the world page lists the world's history entries and its events together, oldest first. The history schema's read rule keeps game-master entries from players.
  • 3.2 Buy item (REQ-RPG-001): a header action on the character page buys a priced item of its world through the purchase endpoint from feat(larpinq): build capability-rows-missing-requirements #1039.
  • 4.1 Download run sheet (pdf-export RUN-020): a header action on the event page, for game masters and admins (a new GET /api/events/runsheet-access answer). It opens the template picker, then the PDF.
  • 5.1 Override a requirement (REQ-SRE-001): a header action on the character page, for game masters (GET /api/characters/game-master-access). It grants a skill of the world with a required reason in one write, so the requirement listener and the audit trail apply.
  • 6.1 Rejecting a character (REQ-CTA-001): a rejected approval state with a required rejectionReason, a Reject action for game masters, Submit again for the owner (POST /api/characters/{id}/resubmit), and notifications to the owner and the game masters.
  • Merging development in: appinfo/routes.php keeps both sides. The locale catalogues take the union of both sides' keys, and the .js files are regenerated with npm run l10n:build. The effective-manifest golden is re-recorded over the merged manifest.
  • One fix from the merge: development's staff roles let a writer read every character field, and rejectionReason is the one field added after them. Writers now read it too. Game masters still write it alone, and other players still cannot read it. CharacterRejectionFragmentTest is updated to match.
  • Round 2, Playwright:
    • tests/e2e/spec-coverage/capability-rows-missing-requirements.spec.ts, 7 tests: the world description as a player; the timeline order; a game-master entry visible to a game master and hidden from a player; the player's account and characters; the override of "Dragon Speech" with its reason in the history; and no override action for a player.
    • Player contexts start from an empty storage state and sign in as a seeded larpers user.
    • event-runsheet-export.spec.ts now downloads the run sheet from the event page. It skips, and says why, when the instance offers no PDF template.

Tasks left, and why

  • 1.1 stays unticked. Its spec is written, but it needs a running instance to run.
  • The Deck milestone scenarios (REQ-LFI-001) and the registration choice (REQ-RTO-007) name the workflows that already cover them: leaf-integrations and registration-tickets.

Tests and suite

  • PHPUnit unit: development 1236 OK (20 skipped). This branch: 1258 OK (20 skipped).
  • vitest: 88 files, 796 tests, all passing.
  • check:manifest (Ajv PASS), check:register and test:l10n (every locale at parity) pass.
  • eslint is clean on every changed JS, Vue and TS file. phpstan is clean on the changed lib files.
  • phpcs finds one error in appinfo/routes.php: development's own lowercase comment, not part of this PR's diff.
  • Both new Playwright files type-check, and playwright test --list lists them.

Generated by Claude Code

World page timeline (2.2): a timeline widget that lists the world's
history entries and its events together by date, oldest first. The
history schema's read rule already keeps game-master entries from
players. Timeline and History strings in every locale.

Assisted-by: ClaudeCode:claude-opus-5-5
Buy item on the character page (3.2): a header action opens a dialog that
shows the character's money, offers the priced items of its world that it
does not carry yet, and buys one through the purchase endpoint, which adds
the item and takes the money in one write. The server's refusals are
shown in the user's language. Strings in every locale; 29 vitest tests.

Assisted-by: ClaudeCode:claude-opus-5-5
Run sheet download on the event page (4.1): a Download run sheet header
action, shown when a new run-sheet access answer allows it (game masters
and admins, the same rule as the download), opens a template picker and
then the run sheet. The access endpoint is documented in openapi.json.
Strings in every locale; PHPUnit for the access answer and vitest for the
dialog and the wiring.

Assisted-by: ClaudeCode:claude-opus-5-5
Requirement override on the character page (5.1): an Override a
requirement header action, shown on a new override access answer (game
masters and admins), opens a dialog that grants a skill of the world with
a required reason. The skill and its requirementOverrides[] entry go in
one write, so the requirement listener and the audit trail apply; a
player gets no action and the listener still refuses their override.
Strings in every locale; PHPUnit for the access answer, vitest for the
write, the dialog and the wiring.

Assisted-by: ClaudeCode:claude-opus-5-5
Rejecting a character (6.1): the approval lifecycle gets a rejected state,
a reject transition for game masters with a required rejection reason,
and a resubmit transition back to waiting; the owner is notified of the
rejection with its reason and the game masters of the resubmission. The
reason is read by game masters and the owner only, and shows on the
character page and in the Characters list. A Reject action for game
masters posts the transition; a Submit again action on a rejected
character calls a new resubmit endpoint for the owner, who may not write
the approval field directly. The game master access answer is shared by
the Override and Reject actions. Strings in every locale; PHPUnit for the
resubmission, the endpoint and the merged lifecycle and notifications,
vitest for the dialog and the wiring.

Assisted-by: ClaudeCode:claude-opus-5-5
…ents [skip ci]

Routes keep both sides; the locale catalogues take the union of both
sides' keys and the .js files are regenerated with npm run l10n:build; the
effective manifest golden is re-recorded over the merged manifest.

Assisted-by: ClaudeCode:claude-opus-5-5
Writers read the rejection reason too: development's staff roles let a
writer read every character field, and the rejection reason is the one
field this build added after them; game masters still write it alone and
other players still do not read it.

Round 2: Playwright spec coverage for the world description and
timeline (including the hidden entry), the player page's account and
characters, and the game master override and its absence for a player;
the run-sheet spec now downloads the run sheet from the event page.

Assisted-by: ClaudeCode:claude-opus-5-5

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant