|
| 1 | +# PR_26161_026-controls-object-action-mapping-validation |
| 2 | + |
| 3 | +## Branch Validation |
| 4 | + |
| 5 | +- Current branch: `main` |
| 6 | +- Expected branch: `main` |
| 7 | +- Result: PASS |
| 8 | + |
| 9 | +## Scope |
| 10 | + |
| 11 | +- Impacted lane: Controls/Input Mapping tool. |
| 12 | +- Playwright impacted: Yes. |
| 13 | +- Controls status: Wireframe preserved. |
| 14 | +- Runtime engine behavior: Not changed. |
| 15 | +- Samples: Skipped. |
| 16 | + |
| 17 | +## Requirement Checklist |
| 18 | + |
| 19 | +- PASS - Controls data remains DB-backed through the shared DB/mock adapter. |
| 20 | +- PASS - Object dropdown loads DB-backed Objects records through the Objects repository client. |
| 21 | +- PASS - Footer Action dropdown filters from the selected Object. |
| 22 | +- PASS - Inline row Action dropdown filters from the row Object. |
| 23 | +- PASS - Collectible objects do not expose Move Left, Move Right, or Jump. |
| 24 | +- PASS - Hero objects expose movement and interaction actions. |
| 25 | +- PASS - Projectile objects expose fire/launch actions. |
| 26 | +- PASS - Invalid Object/Action combinations show creator-facing row validation. |
| 27 | +- PASS - Invalid Object/Action combinations are blocked from UI save. |
| 28 | +- PASS - Existing invalid persisted mappings are visible as `Pending Setup`. |
| 29 | +- PASS - Valid Object/Action combinations save and persist after reload. |
| 30 | +- PASS - Object Summary information appears in the mappings footer: |
| 31 | + - Selected Object |
| 32 | + - Object Role/Template |
| 33 | + - Available Actions |
| 34 | +- PASS - Controller profiles and device detection behavior preserved. |
| 35 | +- PASS - Edit-gated capture preserved. |
| 36 | +- PASS - Accordion layout preserved. |
| 37 | +- PASS - Reset confirmation preserved and covered. |
| 38 | +- PASS - Theme V2 only; no inline CSS, inline JS, script blocks, style blocks, or inline event handlers added. |
| 39 | +- PASS - No sample JSON alignment, auth behavior, production game runtime behavior, or unrelated rewrites added. |
| 40 | + |
| 41 | +## Implementation Notes |
| 42 | + |
| 43 | +- Added object/template action rules in `toolbox/controls/controls.js`. |
| 44 | +- Preserved Objects as the source for selectable object records and carried object role/capability metadata into Controls. |
| 45 | +- Updated footer Action options whenever the selected Object changes. |
| 46 | +- Updated row Action options whenever the row Object changes. |
| 47 | +- Added row-level validation for saved mappings that reference invalid Object/Action combinations. |
| 48 | +- Added a save guard so invalid combinations cannot be newly saved from the Controls UI. |
| 49 | +- Added footer Object Summary display in `toolbox/controls/index.html`. |
| 50 | +- Added reset confirmation before clearing mappings. |
| 51 | + |
| 52 | +## Validation Performed |
| 53 | + |
| 54 | +- PASS - `node --check toolbox/controls/controls.js` |
| 55 | +- PASS - `node --check tests/playwright/tools/InputMappingV2Tool.spec.mjs` |
| 56 | +- PASS - HTML restriction scan on `toolbox/controls/index.html` |
| 57 | +- PASS - `git diff --check` passed with line-ending warnings only. |
| 58 | +- PASS - `npx playwright test tests/playwright/tools/InputMappingV2Tool.spec.mjs`: 6/6 passed. |
| 59 | + |
| 60 | +## Playwright Behavior Coverage |
| 61 | + |
| 62 | +- PASS - Object dropdown loads DB-backed Hero, Coin, and Bolt records. |
| 63 | +- PASS - Collectible action list filters to Confirm, Interact, and Select. |
| 64 | +- PASS - Hero action list includes movement, Jump, and Interact. |
| 65 | +- PASS - Projectile action list filters to Fire, Rotate Left, Rotate Right, and Thrust. |
| 66 | +- PASS - Valid Projectile + Fire mapping saves and persists after reload. |
| 67 | +- PASS - Invalid Coin + Move Left persisted mapping shows actionable row validation. |
| 68 | +- PASS - Repairing the invalid row to Coin + Interact saves and persists. |
| 69 | +- PASS - Device refresh still detects a mocked gamepad. |
| 70 | +- PASS - Reset confirmation cancel preserves mappings. |
| 71 | +- PASS - Reset confirmation accept clears mappings through the shared DB adapter. |
| 72 | + |
| 73 | +## V8 Coverage |
| 74 | + |
| 75 | +- PASS - `docs_build/dev/reports/playwright_v8_coverage_report.txt` generated. |
| 76 | +- PASS - `toolbox/controls/controls.js`: 93% function coverage in the final Controls run. |
| 77 | +- PASS - `toolbox/controls/controls-api-client.js`: 100% function coverage in the final Controls run. |
| 78 | +- WARN - The coverage helper also lists JS files changed in `HEAD` from the prior PR as advisory WARN entries; those files are not part of this PR's git status and were not modified here. |
| 79 | + |
| 80 | +## Skipped Lanes |
| 81 | + |
| 82 | +- Full samples validation: SKIPPED. Samples were not in scope and no sample JSON changed. |
| 83 | +- Full suite: SKIPPED. Targeted Controls/Input Mapping Playwright covered the changed behavior. |
| 84 | +- Production game runtime validation: SKIPPED. No production game runtime behavior changed. |
| 85 | + |
| 86 | +## Manual Validation Steps |
| 87 | + |
| 88 | +1. Open `toolbox/controls/index.html`. |
| 89 | +2. Confirm the mappings footer shows Action, Object, and Object Summary. |
| 90 | +3. Select a Collectible object and confirm movement actions are not available. |
| 91 | +4. Select a Hero object and confirm movement and Interact actions are available. |
| 92 | +5. Select a Projectile object and confirm fire/launch actions are available. |
| 93 | +6. Add a valid mapping, reload, and confirm it remains. |
| 94 | +7. Confirm an invalid persisted mapping shows a row warning and can be repaired by editing the row. |
| 95 | + |
| 96 | +## Artifacts |
| 97 | + |
| 98 | +- PASS - Review diff: `docs_build/dev/reports/codex_review.diff` |
| 99 | +- PASS - Changed files: `docs_build/dev/reports/codex_changed_files.txt` |
| 100 | +- PASS - V8 coverage: `docs_build/dev/reports/playwright_v8_coverage_report.txt` |
| 101 | +- PASS - Repo-structured delta ZIP: `tmp/PR_26161_026-controls-object-action-mapping-validation_delta.zip` |
0 commit comments