|
| 1 | +# PR_26162_044-controls-user-controls-copy-cleanup |
| 2 | + |
| 3 | +## Branch Validation |
| 4 | +- Current branch: `main` |
| 5 | +- Expected branch: `main` |
| 6 | +- Local branches found: `main` |
| 7 | +- Branch validation: PASS |
| 8 | + |
| 9 | +## Requirement Checklist |
| 10 | +- PASS: Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` before edits. |
| 11 | +- PASS: Verified current git branch is `main` before edits. |
| 12 | +- PASS: Continued from PR_26162_043. |
| 13 | +- PASS: Removed the `Normalized Controls` accordion from `toolbox/controls/`. |
| 14 | +- PASS: Reviewed `Presets` in `toolbox/controls/`. |
| 15 | +- PASS: Presets kept only as wireframe-safe future functionality; active preset buttons and DB mutation code were removed. |
| 16 | +- PASS: Presets unique value documented: genre-specific starter templates such as Platformer, Shooter, Vehicle, Fighting, Menu, Paddle / Ball, and Party / Arena remain useful future planning references distinct from seeded default Game Controls. |
| 17 | +- PASS: Keyboard scoped User Controls rows no longer show redundant `Keyboard:` prefixes. |
| 18 | +- PASS: Mouse scoped User Controls rows no longer show redundant `Mouse:` prefixes. |
| 19 | +- PASS: Game Controllers scoped rows/dropdown labels no longer show redundant `Gamepad:` prefixes. |
| 20 | +- PASS: `Not applicable` was replaced with `N/A` in active Controls/User Controls UI. |
| 21 | +- PASS: DB-backed separation is preserved: `game_input_mappings` remains game/project owned; `player_controller_profiles` remains user/player owned. |
| 22 | +- PASS: Normalized action contract is preserved. |
| 23 | +- PASS: Editable keyboard/mouse mappings are preserved. |
| 24 | +- PASS: Editable game controller names are preserved. |
| 25 | +- PASS: Gamepad table layout, defaults, and persistence are preserved. |
| 26 | +- PASS: No sample JSON alignment, auth behavior, production account system, or unrelated rewrites were added. |
| 27 | +- PASS: Theme V2 restrictions preserved; no inline CSS, inline JS, script/style blocks, or inline event handlers were added. |
| 28 | + |
| 29 | +## Changed Files |
| 30 | +- `toolbox/controls/index.html` |
| 31 | +- `toolbox/controls/controls.js` |
| 32 | +- `account/user-controls-page.js` |
| 33 | +- `tests/playwright/tools/InputMappingV2Tool.spec.mjs` |
| 34 | +- `docs_build/dev/reports/playwright_v8_coverage_report.txt` |
| 35 | +- `docs_build/dev/reports/coverage_changed_js_guardrail.txt` |
| 36 | +- `docs_build/dev/reports/controls-user-controls-copy-cleanup-report.md` |
| 37 | + |
| 38 | +## Impacted Lanes |
| 39 | +- Runtime/tool lane: Toolbox > Controls. |
| 40 | +- Account runtime lane: Account > User Controls. |
| 41 | +- Playwright impacted: Yes. |
| 42 | + |
| 43 | +## Presets Review |
| 44 | +- Decision: Keep Presets as wireframe-safe future functionality. |
| 45 | +- Reason: Presets are not identical to seeded default Game Controls; they represent future genre templates that could quickly reshape Game Controls for a specific game style. |
| 46 | +- Safety change: Removed active preset buttons and the `applyGameControlPreset` mutation path, so Presets no longer write to `game_input_mappings`. |
| 47 | + |
| 48 | +## Validation Performed |
| 49 | +- PASS: `node --check toolbox/controls/controls.js` |
| 50 | +- PASS: `node --check account/user-controls-page.js` |
| 51 | +- PASS: `node --check account/user-controls.js` |
| 52 | +- PASS: `node --check tests/playwright/tools/InputMappingV2Tool.spec.mjs` |
| 53 | +- PASS: `npx playwright test tests/playwright/tools/InputMappingV2Tool.spec.mjs --reporter=line` |
| 54 | + - Result: 6 passed. |
| 55 | +- PASS: `git diff --check` |
| 56 | + |
| 57 | +## Playwright Evidence |
| 58 | +- PASS: Normalized Controls accordion is absent. |
| 59 | +- PASS: Normalized Controls catalog selectors are absent. |
| 60 | +- PASS: Presets has no active preset buttons and renders a wireframe planning list. |
| 61 | +- PASS: Game Controls default rows still load and persist. |
| 62 | +- PASS: Game Controls row editing and persistence still work. |
| 63 | +- PASS: Keyboard, Mouse, and Game Controller scoped sections do not repeat `Keyboard:`, `Mouse:`, or `Gamepad:` prefixes. |
| 64 | +- PASS: `N/A` appears for non-applicable controller tuning fields. |
| 65 | +- PASS: `Not applicable` does not appear in the active page body. |
| 66 | +- PASS: Keyboard/mouse profile editing persists after reload. |
| 67 | +- PASS: Gamepad name editing, table layout, axis/trigger controls, and profile persistence still work. |
| 68 | + |
| 69 | +## Search Evidence |
| 70 | +- PASS: `rg "Not applicable|Keyboard:|Mouse:|Gamepad:" account/user-controls.html account/user-controls-page.js toolbox/controls/index.html toolbox/controls/controls.js -n` returned no matches. |
| 71 | +- PASS: `rg "Normalized Controls|data-input-action-catalog|data-input-default-actions|data-input-preset=|GAME_CONTROL_PRESETS|applyGameControlPreset|Applied .* preset|Apply a preset" toolbox/controls -n` returned no matches. |
| 72 | +- PASS: `rg "<script(?![^>]*src=)|<style|\s(onclick|onchange|oninput|onsubmit)=" account/user-controls.html toolbox/controls/index.html -n --pcre2` returned no matches. |
| 73 | + |
| 74 | +## V8 Coverage |
| 75 | +- Coverage report: `docs_build/dev/reports/playwright_v8_coverage_report.txt` |
| 76 | +- PASS: `(93%) account/user-controls-page.js - executed lines 820/820; executed functions 98/105` |
| 77 | +- PASS: `(96%) toolbox/controls/controls.js - executed lines 509/509; executed functions 51/53` |
| 78 | +- PASS: No changed runtime JS coverage warnings after normalizing the report to PR_26162_044 changed runtime JavaScript files. |
| 79 | + |
| 80 | +## Manual Validation Steps |
| 81 | +1. Open `/toolbox/controls/index.html`. |
| 82 | +2. Confirm `Normalized Controls` is not present. |
| 83 | +3. Confirm Presets is a wireframe-only planning list with no clickable preset buttons. |
| 84 | +4. Confirm default Game Controls rows still appear and the mapping count is populated. |
| 85 | +5. Edit a Game Controls row, save, reload, and confirm persistence. |
| 86 | +6. Open `/account/user-controls.html`. |
| 87 | +7. Confirm Keyboard and Mouse sections do not show `Keyboard:` or `Mouse:` prefixes in saved rows. |
| 88 | +8. Confirm Game Controllers does not show `Gamepad:` prefixes in the dropdown or saved rows. |
| 89 | +9. Create/edit a game controller profile and confirm non-applicable fields show `N/A`. |
| 90 | +10. Save and reload to confirm profile persistence. |
| 91 | + |
| 92 | +## Skipped Lanes |
| 93 | +- SKIP: Full samples validation. Safe to skip because no sample JSON or sample runtime files were changed. |
| 94 | +- SKIP: Full repository test suite. Safe to skip because the PR only changes scoped Controls/User Controls UI/runtime and targeted Playwright covers the affected behavior. |
| 95 | +- SKIP: Broader engine validation. Safe to skip because no `src/engine/input` code was changed. |
| 96 | + |
| 97 | +## Samples Decision |
| 98 | +- Full samples validation: SKIP. |
| 99 | +- Reason: Samples are explicitly out of scope and unchanged. |
0 commit comments