|
| 1 | +# PR_26161_017 Controls Table First Input Report |
| 2 | + |
| 3 | +## Branch Validation |
| 4 | + |
| 5 | +PASS |
| 6 | + |
| 7 | +- Current branch: `main` |
| 8 | +- Expected branch: `main` |
| 9 | +- Worktree was clean before PR_26161_017 edits. |
| 10 | + |
| 11 | +## Scope |
| 12 | + |
| 13 | +- Impacted lane: Controls/Input Mapping tool UI/runtime and targeted Controls/Input Mapping Playwright coverage. |
| 14 | +- Playwright impacted: Yes. |
| 15 | +- Runtime engine behavior changed: No. |
| 16 | +- Samples validation: Skipped as requested. No sample JSON alignment, auth behavior, production DB behavior, or engine runtime behavior changed. |
| 17 | + |
| 18 | +## Requirement Checklist |
| 19 | + |
| 20 | +- PASS: Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` before edits. |
| 21 | +- PASS: Verified current git branch was `main` before edits. |
| 22 | +- PASS: Continued from PR_26161_016. |
| 23 | +- PASS: Moved Controls toward table-first editing like Objects by placing mapping row creation controls in the mappings table footer. |
| 24 | +- PASS: Mappings table supports inline add/edit for `Object`, `Action`, `Input Device`, `Input`, `State`, and `Actions`. |
| 25 | +- PASS: `Add Mapping` is below the mappings table. |
| 26 | +- PASS: Adding a row shows `Cancel` in the right-side action cell of the new row. |
| 27 | +- PASS: `Add Mapping` is disabled while a new or edited row is active, then re-enabled after save or cancel. |
| 28 | +- PASS: Keyboard, mouse, and gamepad capture behavior remains in place. |
| 29 | +- PASS: Default actions remain sorted alphabetically. |
| 30 | +- PASS: DB/mock-adapter persistence remains in place. |
| 31 | +- PASS: Workspace return behavior remains in place. |
| 32 | +- PASS: UAT-required panels remain: Actions, Capture, Mappings, Mapping JSON, Devices, and Status. |
| 33 | +- PASS: Did not add sample JSON alignment, auth behavior, production DB behavior, or unrelated tool rewrites. |
| 34 | +- PASS: Kept Theme V2 only; no inline CSS, inline JS, script/style blocks, or inline event handlers. |
| 35 | + |
| 36 | +## Testing Performed |
| 37 | + |
| 38 | +- PASS: `node --check toolbox/input-mapping-v2/input-mapping-v2.js` |
| 39 | +- PASS: `node --check toolbox/input-mapping-v2/input-mapping-api-client.js` |
| 40 | +- PASS: `node --check src/dev-runtime/persistence/tool-repositories/input-mapping-mock-repository.js` |
| 41 | +- PASS: `node --check tests/playwright/tools/InputMappingV2Tool.spec.mjs` |
| 42 | +- PASS: `rg --pcre2 -n '<script(?![^>]*\bsrc=)|<style\b|\son[a-z]+\s*=' toolbox/input-mapping-v2/index.html toolbox/controls/index.html` |
| 43 | + - Expected no matches; command exited with no matches. |
| 44 | +- PASS: `git diff --check` |
| 45 | + - Result: PASS. Git reported line-ending normalization warnings only. |
| 46 | +- PASS: `npx playwright test tests/playwright/tools/InputMappingV2Tool.spec.mjs --workers=1 --reporter=line` |
| 47 | + - Result: 4 passed. |
| 48 | + |
| 49 | +## Playwright Behavior Covered |
| 50 | + |
| 51 | +- PASS: UAT launch route still renders Actions, Capture, Mappings, Mapping JSON, Devices, and Status. |
| 52 | +- PASS: `Add Mapping` appears once and is inside the mappings table footer. |
| 53 | +- PASS: `Reset Mappings` remains available in the mappings table footer. |
| 54 | +- PASS: Inline add creates a row with editable Object, Action, Input Device, Input, State, and right-side Actions cells. |
| 55 | +- PASS: New row action cell shows `Save` and `Cancel`, with `Cancel` on the right. |
| 56 | +- PASS: `Add Mapping` disables while a new row is active. |
| 57 | +- PASS: Cancel removes the unsaved row and re-enables `Add Mapping`. |
| 58 | +- PASS: Saving an inline row persists it to `input_mapping_records`. |
| 59 | +- PASS: Editing an existing mapping uses an inline replacement row and re-enables `Add Mapping` after save. |
| 60 | +- PASS: Saved edits persist after reload. |
| 61 | +- PASS: Keyboard capture still maps `KeyA` to the selected `Move Left` action. |
| 62 | +- PASS: Clicking the `Keyboard KeyA` token still deletes the persisted mapping. |
| 63 | +- PASS: Default actions remain alphabetically sorted. |
| 64 | +- PASS: Workspace return behavior remains covered by the UAT launch test. |
| 65 | + |
| 66 | +## Playwright V8 Coverage |
| 67 | + |
| 68 | +- Report: `docs_build/dev/reports/playwright_v8_coverage_report.txt` |
| 69 | +- Current PR browser runtime JavaScript coverage: |
| 70 | + - `(92%) toolbox/input-mapping-v2/input-mapping-v2.js - executed lines 703/703; executed functions 80/87` |
| 71 | + - `(100%) toolbox/input-mapping-v2/input-mapping-api-client.js - executed lines 12/12; executed functions 2/2` |
| 72 | +- Advisory WARN entries remain for PR_26161_016 server/dev-runtime files because the coverage helper includes changed JS from `HEAD`; PR_26161_017 did not modify those files. |
| 73 | + |
| 74 | +## Manual Validation Steps |
| 75 | + |
| 76 | +1. Open `/toolbox/input-mapping-v2/index.html?workspace=demo-project`. |
| 77 | +2. Confirm Actions, Capture, Mappings, Mapping JSON, Devices, and Status panels appear. |
| 78 | +3. Confirm `Add Mapping` and `Reset Mappings` are below the mappings table. |
| 79 | +4. Click `Add Mapping` and confirm the new row appears with `Save` and `Cancel` in the right-side Actions cell. |
| 80 | +5. Confirm `Add Mapping` is disabled while the new row is active. |
| 81 | +6. Click `Cancel` and confirm the unsaved row disappears and `Add Mapping` is enabled again. |
| 82 | +7. Add and save a row, reload, and confirm the mapping persists. |
| 83 | +8. Edit the saved row, save, reload, and confirm the edit persists. |
| 84 | +9. Select `Move Left`, click `Capture Keyboard`, press `A`, and confirm `Keyboard KeyA` appears in the table and JSON. |
| 85 | +10. Click the `Keyboard KeyA` token and confirm the mapping is deleted. |
| 86 | + |
| 87 | +## Skipped Lanes |
| 88 | + |
| 89 | +- Full samples validation: SKIP, explicitly requested and no samples changed. |
| 90 | +- Full workspace/project suite: SKIP, no broad Project Workspace behavior changed; workspace return remains covered by targeted Controls/Input Mapping Playwright. |
| 91 | +- Engine runtime tests: SKIP, no `src/engine/input` behavior changed. |
| 92 | +- Auth and production DB validation: SKIP, no auth or production DB behavior changed; existing shared mock DB persistence behavior remains covered by targeted Playwright. |
0 commit comments