Repository navigation
feat(larpinq): build events-casting-and-crew-roles - #1054
Open
rubenvdlinde wants to merge 15 commits into
Open
rubenvdlinde wants to merge 15 commits into
rubenvdlinde wants to merge 15 commits into
Conversation
The fragment adds characters open for casting, a casting deadline, ranked casting preferences readable by game masters and the player only, crew and NPC roles and crew assignments. CastingSolver finds the best overall casting with the Hungarian method: the most ranked matches, then the lowest total rank, then the most first choices, then earlier sign-ups. CastingService proposes it without writing and confirms the pairs a game master keeps through ordinary object writes. CastingController serves both to game masters only. The 15 new schema strings are translated in every locale, and the browser catalogues are rebuilt from l10n/*.json. Assisted-by: ClaudeCode:claude-opus-5-5
…oles [skip ci] Assisted-by: ClaudeCode:claude-opus-5-5
…end so it merges beside sibling changes [skip ci] Assisted-by: ClaudeCode:claude-opus-5-5
Hold the casting deadline on every write of a ranking: a player ranks only on their own registration for the event, only characters open for casting on it, at most five, and not from the deadline on. Game masters pass. Assisted-by: ClaudeCode:claude-opus-5-5
Seed the Winter Court casting and crew: a casting deadline, four characters open for casting, the rankings of Anna, Pieter and Sanne, the Bandits and Kitchen roles, and Joris in the Kitchen. A test validates the seed against the merged schemas and proposes the casting design.md names over it. Assisted-by: ClaudeCode:claude-opus-5-5
Add the Casting tab on the event page: how often each open character was ranked at each rank, the proposal as a table the game master edits and confirms, and the crew and NPC roles with filled and open places and an assign action for volunteers with a crew or NPC ticket. A Casting tab on the registration page, reached from My registrations, lets the player rank up to five characters until the casting deadline and shows their crew roles. Both are registered sections; the strings are translated in every locale next to the other casting strings. Assisted-by: ClaudeCode:claude-opus-5-5
Describe the Casting tabs for game masters and players, the casting deadline, the crew roles and the example data, and list the feature beside the other event features. Assisted-by: ClaudeCode:claude-opus-5-5
…[skip ci] Give each new casting and crew field a description, translated in every locale beside the other casting strings; seed a third crew role and two more assignments so every new schema has three demo objects; and tag the casting tabs' helpers with the change's spec. Assisted-by: ClaudeCode:claude-opus-5-5
Name the third crew role and Lotte's assignments in the example data. Assisted-by: ClaudeCode:claude-opus-5-5
…oles [skip ci] Assisted-by: ClaudeCode:claude-opus-5-5
…kip ci] Routes, settings keys, manifest tabs, the mock register and openapi.json keep both sides; the settings count test covers all 26 slugs (79 keys) and the effective-manifest golden is regenerated from the merged manifest (only EventDetail and RegistrationDetail differ from development, as on the branch). Assisted-by: ClaudeCode:claude-opus-5-5
… references [skip ci] The casting seed points at registrations by position; development's new registrations now follow them, so both sides' seeds resolve. Assisted-by: ClaudeCode:claude-opus-5-5
Task 3.2 names tests/e2e/event-casting.spec.ts; it did not exist. On the design.md seed: Anna, Pieter and Sanne rank on their registrations, a player is refused the proposal, and the game master confirms so The Heir goes to Anna and her registration names it. Assisted-by: ClaudeCode:claude-opus-5-5
Contributor
Author
|
Added Generated by Claude Code |
…kip ci] Keep both sides' seed objects in the mock register (casting/crew from this branch, help desk from development) and count all 28 slugs in SettingsServiceTest (85 config keys). Assisted-by: ClaudeCode:claude-opus-5-5
…gs cannot be read [skip ci] The five-ranking limit counted an unreadable list as empty and let the write through; it now counts it as full, as the guard's other reads already refuse when they fail. Assisted-by: ClaudeCode:claude-opus-5-5
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds
openspec/changes/events-casting-and-crew-roles, covering the matrix rowschr-casting-preferencesandevt-crew-roles: players rank the characters open for casting, larpinq proposes the best overall casting, game masters confirm it, and volunteers fill crew and NPC roles. Everything that can be done in code and unit tests is built; what is left needs a running instance.Tasks done
register.d/events-casting-and-crew-roles.json:character.castingEvent,event.castingDeadline,castingPreference,crewRoleandcrewAssignment, with their access rules. Every field now has a description.CastingPreferenceGuard, applied byCastingPreferenceListeneron OpenRegister's pre-write events for the preference schema, refuses a player's ranking from the deadline on. It also refuses a ranking on someone else's registration or another event's registration, of a character not open on the event, or of a sixth character. Game masters and system writes pass.larpinq_mock_register.json: a casting deadline of 1 November 2026; The Chancellor, The Spy, The Heir and The Bard open for casting; the rankings of Anna, Pieter and Sanne; Bandits, Kitchen and Healers; Joris in the Kitchen and Lotte in two NPC roles. Every new schema has three demo objects.CastingSolver,CastingServiceandCastingController.EventCasting.vue, the Casting tab on the event page (src/manifest.json). It shows how often each open character was ranked at each rank and the proposal as a table the game master edits; giving a character to one player takes it from another. It has Confirm casting, which names the refused pairs. It also lists the crew and NPC roles with "{filled} of {places} places filled" and an assign action for accepted registrations with a crew or NPC ticket.RegistrationCasting.vue, the Casting tab on the registration page, reached from My registrations (tab added in place insrc/manifest.d/registration-intake-and-capacity.json). The player ranks up to five characters until the deadline and sees their own crew roles.CnDataTableandNcSelectwithinputLabel, and CSS variables only.l10n:buildonly touched those keys.docs/features/casting-and-crew.mdis rewritten for game masters and players, and listed indocs/features/README.mdbeside the event features.Tasks left, and why
tests/e2e/event-casting.spec.tsneeds a running Nextcloud with players; it is not written or run here.Tests added
CastingPreferenceGuardTest(8): deadline boundaries, no deadline, game masters and system writes, own registration only, open characters only, unknown event, five-ranking cap with re-ranking.CastingPreferenceListenerTest(3): the real OpenRegister events and the real guard. Create and update are refused after the deadline; other schemas, no user and other events pass.CastingSeedTest(3): the seed validates against the merged schemas with Opis, holds the design's cast and crew, and the realCastingServiceandCastingSolverpropose Anna The Heir, Pieter The Bard and Sanne The Spy over it.tests/vitest/eventCasting.spec.js(13): proposal and confirm requests, crew places and volunteers, deadline, rank validation, ranking writes (delete, then patch, then post, stopping at a refusal), the registration read.tests/vitest/eventCastingView.spec.js(10): the proposal table rows and rank counts, one player per character, confirm and reload, refused pairs, a player refused, assigning Joris to the Kitchen, and Anna's ranking (load, save, duplicate rank, after the deadline).Suite before and after
phpunit-unit.xml): 856 tests, 20 skipped, before; 870 tests, 20 skipped, after. No failures.Other checks
PreWriteEventthat every listener has.check:register,check:manifest,check:schema-l10n(baseline 84),test:l10nandcheck:l10n-jsare green./setup/steps/1), e2e-networkidle (tests/e2e/phone/overflow.spec.ts), icon-vocabulary (CardAccountDetailsOutline), apphost-autoload-prelude, reports-one-page and app-chrome. Spec coverage, schema property titles and demo data coverage passed after the fixes in this PR.Generated by Claude Code