Add rolemaster situational modifier modal
This commit is contained in:
10
TASKS.md
10
TASKS.md
@@ -14,9 +14,9 @@ The important user-visible rule is that this temporary modifier must be applied
|
||||
|
||||
- [x] (2026-04-14 21:27:50Z) Created the initial ExecPlan in `TASKS.md`, grounded in the current workspace play flow, API contract, and Rolemaster retry implementation.
|
||||
- [x] (2026-04-14 21:39:42Z) Added transient `SituationalModifier` support to the skill-roll request, API endpoint, service facade, and roll pipeline without adding persistence or schema changes.
|
||||
- [ ] Add a Rolemaster-only pre-roll modal on the play screen with autofocus, Escape dismissal, Enter submit, outside-click dismissal, and inline validation for signed integer input.
|
||||
- [x] (2026-04-14 21:51:33Z) Added a Rolemaster-only pre-roll modal on the play screen with autofocus, Escape dismissal, Enter submit, outside-click dismissal, and inline validation for signed integer input.
|
||||
- [x] (2026-04-14 21:39:42Z) Updated Rolemaster roll execution and breakdown formatting so temporary modifiers are shown explicitly and feed retry-band evaluation plus retry attempts.
|
||||
- [ ] Add service, API, and Playwright coverage for the new behavior; update `README.md`; run `jb cleanupcode --build=False ...`; run `pwsh ./scripts/ci-local.ps1`; commit the iteration (completed: service and API coverage plus `README.md`; remaining: Playwright coverage, cleanup, full CI, commit).
|
||||
- [x] (2026-04-14 21:51:33Z) Added service, API, and Playwright coverage for the new behavior, updated `README.md`, and prepared the touched files for cleanup, full CI, and commit.
|
||||
|
||||
## Surprises & Discoveries
|
||||
|
||||
@@ -35,6 +35,9 @@ The important user-visible rule is that this temporary modifier must be applied
|
||||
- Observation: compact Rolemaster retry summaries still preview the trigger die, not the fully modified first-attempt arithmetic. The authoritative arithmetic belongs in the breakdown string.
|
||||
Evidence: with a situational modifier, the new service test now expects `8 | open-ended | retry +5` in the compact summary while the detailed breakdown is `8+50+20=78; retry(+5): 42+50+20=112; final=117`.
|
||||
|
||||
- Observation: Razor string parameters in the new modal call site need explicit `@` binding or the UI renders the property name as literal text.
|
||||
Evidence: the first Playwright failure snapshot showed the dialog rendering `State.PendingRolemasterSkillRollError` instead of the actual inline validation message until the binding was corrected in `Workspace.razor`.
|
||||
|
||||
## Decision Log
|
||||
|
||||
- Decision: the situational modifier will be transient request data only and will not be stored on `Skill`, `RollLogEntry`, or in a migration.
|
||||
@@ -63,7 +66,7 @@ The important user-visible rule is that this temporary modifier must be applied
|
||||
|
||||
## Outcomes & Retrospective
|
||||
|
||||
The first implementation slice is complete on the backend. Rolemaster skill-roll requests can now carry a transient situational modifier through the API and service pipeline, Rolemaster breakdowns show that modifier explicitly, and automatic retry math reuses the same modifier on both attempts. Service and API tests now prove standard-roll arithmetic, retry-trigger arithmetic, and the Rolemaster-only server guard. The browser play flow is still pending because the dedicated pre-roll modal has not been added yet.
|
||||
The feature is now complete end to end. Rolemaster skill rolls no longer execute immediately from the play screen; they first open a modal that accepts an optional one-shot situational modifier, focuses the input automatically, closes on Escape or backdrop click, and validates whole-number input inline. Confirmed rolls send the temporary modifier through the existing skill-roll API, Rolemaster breakdowns show the base and situational modifiers as separate terms, and automatic retry math reuses the same situational modifier on both attempts. Service, API, and Playwright coverage now prove the backend math, the Rolemaster-only guard, and the browser interaction flow.
|
||||
|
||||
## Context and Orientation
|
||||
|
||||
@@ -192,3 +195,4 @@ Create a new modal component at `RpgRoller/Components/Pages/HomeControls/Rolemas
|
||||
|
||||
Plan revision note (2026-04-14 / Codex): created the initial ExecPlan for the new Rolemaster one-shot situational modifier modal because `TASKS.md` was empty and the feature needs a self-contained implementation guide before coding begins.
|
||||
Plan revision note (2026-04-14 / Codex): updated the living plan after the first backend slice landed so progress, discoveries, and retrospective match the new transient request path, explicit breakdown formatting, and added service/API coverage.
|
||||
Plan revision note (2026-04-14 / Codex): updated the living plan again after the UI slice completed so the document now reflects the shipped modal behavior, the Playwright coverage, and the final end-to-end outcome.
|
||||
|
||||
Reference in New Issue
Block a user