|
| 1 | +# PR_26162_046 Controls Remove Physical Controller Actions |
| 2 | + |
| 3 | +## Branch Validation |
| 4 | +- PASS: Current branch is `main`. |
| 5 | +- Expected branch: `main`. |
| 6 | +- Evidence: `git status --short --branch` reported `## main...origin/main`. |
| 7 | + |
| 8 | +## Requirement Checklist |
| 9 | +- PASS: Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` before edits. |
| 10 | +- PASS: Verified branch is `main` before edits. |
| 11 | +- PASS: Continued from PR_26162_045. |
| 12 | +- PASS: Controls status remains Wireframe; tool metadata/status was not changed. |
| 13 | +- PASS: Controls data remains DB-backed through the shared DB/mock adapter only. |
| 14 | +- PASS: Toolbox > Controls no longer creates or edits game controls for `dpad.up`, `dpad.down`, `dpad.left`, `dpad.right`, `trigger.left`, or `trigger.right`. |
| 15 | +- PASS: Toolbox > Controls does not define physical controller inputs; `game_input_mappings` remains free of controller id/name and physical input fields. |
| 16 | +- PASS: Toolbox > Controls keeps only the requested game-level normalized controls: |
| 17 | + `move.x-`, `move.x+`, `move.y-`, `move.y+`, `aim.x-`, `aim.x+`, `aim.y-`, `aim.y+`, `action.primary`, `action.secondary`, `action.tertiary`, `action.quaternary`, `action.confirm`, `action.cancel`, `action.pause`, `action.start`, `action.select`. |
| 18 | +- PASS: Account > User Controls keeps physical DPad and trigger rows available. |
| 19 | +- PASS: Account > User Controls default mappings support `DPad Up -> move.y-`, `DPad Down -> move.y+`, `DPad Left -> move.x-`, `DPad Right -> move.x+`, `Left Trigger -> action.primary`, and `Right Trigger -> action.secondary`. |
| 20 | +- PASS: Editable controller mappings, deadzone, invert, sensitivity, and controller naming are preserved. |
| 21 | +- PASS: Combo Controls wireframe remains in Toolbox > Controls. |
| 22 | +- PASS: Aim remains normalized axis controls in Game Controls and was not moved into Combo Controls. |
| 23 | +- PASS: No sample JSON alignment, auth behavior, production account system, or unrelated rewrites were added. |
| 24 | + |
| 25 | +## Changed Files |
| 26 | +- `toolbox/controls/controls.js` |
| 27 | +- `src/engine/input/NormalizedInputRegistry.js` |
| 28 | +- `tests/playwright/tools/InputMappingV2Tool.spec.mjs` |
| 29 | +- `tests/input/NormalizedInputRegistry.test.mjs` |
| 30 | +- `docs_build/dev/reports/playwright_v8_coverage_report.txt` |
| 31 | +- `docs_build/dev/reports/coverage_changed_js_guardrail.txt` |
| 32 | +- `docs_build/dev/reports/controls-remove-physical-controller-actions-report.md` |
| 33 | + |
| 34 | +## Impacted Lanes |
| 35 | +- Controls tool runtime lane. |
| 36 | +- Account/User Controls runtime lane. |
| 37 | +- Engine input normalization/default mapping lane. |
| 38 | + |
| 39 | +## Validation Performed |
| 40 | +- PASS: `node --check toolbox/controls/controls.js` |
| 41 | +- PASS: `node --check account/user-controls-page.js` |
| 42 | +- PASS: `node --check src/engine/input/NormalizedInputRegistry.js` |
| 43 | +- PASS: `node --check tests/playwright/tools/InputMappingV2Tool.spec.mjs` |
| 44 | +- PASS: `node --check tests/input/NormalizedInputRegistry.test.mjs` |
| 45 | +- PASS: `node tests/input/NormalizedInputRegistry.test.mjs` |
| 46 | +- PASS: `npx playwright test tests/playwright/tools/InputMappingV2Tool.spec.mjs` passed 6/6. |
| 47 | +- PASS: `git diff --check` |
| 48 | +- PASS: `rg -n -P "<style|style\\s*=|\\son[a-z]+\\s*=" toolbox/controls/index.html toolbox/controls/controls.js account/user-controls.html account/user-controls-page.js` returned no matches. |
| 49 | + |
| 50 | +## Playwright Result |
| 51 | +- PASS: Toolbox > Controls renders 17 game-level normalized rows. |
| 52 | +- PASS: Toolbox > Controls table/list excludes `dpad.*`, `trigger.*`, `D-Pad`, `Trigger`, and `action.menu`. |
| 53 | +- PASS: Toolbox > Controls edit dropdown excludes `dpad.*`, `trigger.*`, and `action.menu`. |
| 54 | +- PASS: Toolbox > Controls still includes `aim.x-`, `aim.x+`, `aim.y-`, and `aim.y+`. |
| 55 | +- PASS: Combo Controls wireframe remains visible. |
| 56 | +- PASS: Account > User Controls keeps physical DPad and trigger rows. |
| 57 | +- PASS: Account > User Controls maps DPad and trigger defaults into movement/action normalized controls. |
| 58 | +- PASS: Profiles and mappings persist after reload. |
| 59 | + |
| 60 | +## V8 Coverage |
| 61 | +- PASS: `docs_build/dev/reports/playwright_v8_coverage_report.txt` refreshed from the targeted Playwright run. |
| 62 | +- PASS: `(93%) toolbox/controls/controls.js - changed JS file with browser V8 coverage`. |
| 63 | +- PASS: `(89%) src/engine/input/NormalizedInputRegistry.js - changed JS file with browser V8 coverage`. |
| 64 | +- PASS: `coverage_changed_js_guardrail.txt` reports no changed runtime JS coverage warnings. |
| 65 | + |
| 66 | +## Skipped Lanes |
| 67 | +- Full samples validation: SKIPPED per request. Safe to skip because this PR only changes Controls/User Controls input mapping behavior and a targeted shared input default contract; no sample JSON or sample runtime files changed. |
| 68 | +- Full repository test suite: SKIPPED. Safe to skip because targeted Controls/User Controls Playwright plus the targeted engine input registry test covered the changed behavior. |
| 69 | +- Workspace V2 broad lane: SKIPPED. Safe to skip because this PR did not change navigation, workspace launch contracts, or workspace persistence. |
| 70 | + |
| 71 | +## Samples Decision |
| 72 | +- Samples validation was not run, per request. |
| 73 | + |
| 74 | +## Manual Validation Steps |
| 75 | +1. Open `toolbox/controls/index.html`. |
| 76 | +2. Confirm Game Controls shows only the 17 game-level normalized rows and no DPad/trigger/action.menu rows. |
| 77 | +3. Edit a Game Controls row and confirm the Normalized Action dropdown excludes dpad/trigger/action.menu while keeping aim axes. |
| 78 | +4. Confirm Combo Controls still shows the wireframe text. |
| 79 | +5. Open `account/user-controls.html`. |
| 80 | +6. Create a game controller profile from a detected controller. |
| 81 | +7. Confirm DPad Up/Down/Left/Right rows are present and default to move directions. |
| 82 | +8. Confirm Trigger Left/Right rows are present and default to primary/secondary actions. |
| 83 | +9. Save, reload, and confirm mappings persist. |
| 84 | + |
| 85 | +## Notes |
| 86 | +- The global normalized registry still retains physical-controller-specific normalized identifiers for Account/User Controls compatibility, but Toolbox > Controls filters them out and cleans stale game-control records from the shared mock DB when encountered. |
0 commit comments