|
| 1 | +# Input Mapping V2 Capture Device Gesture Flow Report |
| 2 | + |
| 3 | +PR: `PR_26140_114-reorder-input-mapping-v2-capture-device-and-gesture-flow` |
| 4 | + |
| 5 | +## Summary |
| 6 | + |
| 7 | +- Read `docs/dev/PROJECT_INSTRUCTIONS.md` before implementation. |
| 8 | +- Moved the Capture accordion above Gestures in Input Mapping V2. |
| 9 | +- Reworked capture flow so users can select a Capture device first; the selected capture source enables only matching gesture buttons. |
| 10 | +- Removed the visible Game Controller `Button` gesture because it duplicated `Btn Press`. |
| 11 | +- Preserved `Btn Press`, `Btn Hold`, `Btn Release`, selected tile/action behavior, combo capture, and sample JSON untouched. |
| 12 | +- Kept game controller release behavior engine-backed through `GamepadState.buttonsReleased`, `GamepadInputAdapter.buttonsReleased/isReleased`, and Input Mapping V2 consumption through `EngineInputSourceService.captureGamepad()`. |
| 13 | + |
| 14 | +## Files Changed |
| 15 | + |
| 16 | +- `src/engine/input/InputCapabilityDescriptors.js` |
| 17 | +- `tools/input-mapping-v2/index.html` |
| 18 | +- `tools/input-mapping-v2/js/ToolStarterApp.js` |
| 19 | +- `tools/input-mapping-v2/js/controls/CaptureControl.js` |
| 20 | +- `tools/input-mapping-v2/js/controls/GestureListControl.js` |
| 21 | +- `tools/input-mapping-v2/styles/inputMappingV2.css` |
| 22 | +- `tests/playwright/tools/WorkspaceManagerV2.spec.mjs` |
| 23 | +- `docs/dev/codex_commands.md` |
| 24 | +- `docs/dev/commit_comment.txt` |
| 25 | +- `docs/dev/reports/input_mapping_v2_capture_device_gesture_flow_report.md` |
| 26 | + |
| 27 | +## Validation |
| 28 | + |
| 29 | +Targeted syntax/import validation: |
| 30 | + |
| 31 | +- PASS `node --check tools/input-mapping-v2/js/ToolStarterApp.js` |
| 32 | +- PASS `node --check tools/input-mapping-v2/js/controls/CaptureControl.js` |
| 33 | +- PASS `node --check tools/input-mapping-v2/js/controls/GestureListControl.js` |
| 34 | +- PASS `node --check src/engine/input/InputCapabilityDescriptors.js` |
| 35 | +- PASS `node --check tests/playwright/tools/WorkspaceManagerV2.spec.mjs` |
| 36 | + |
| 37 | +Focused Playwright: |
| 38 | + |
| 39 | +- PASS `npx playwright test tests/playwright/tools/WorkspaceManagerV2.spec.mjs --project=playwright --workers=1 --reporter=list --grep "Input Mapping V2"` |
| 40 | +- Result: 11 passed. |
| 41 | + |
| 42 | +Workspace V2: |
| 43 | + |
| 44 | +- PASS `npm run test:workspace-v2` |
| 45 | +- Result: 70 passed. |
| 46 | + |
| 47 | +Full samples smoke test: |
| 48 | + |
| 49 | +- SKIPPED per PR instructions. This change is scoped to Input Mapping V2 and engine input descriptors, and sample JSON is explicitly out of scope. |
| 50 | + |
| 51 | +## Delta ZIP |
| 52 | + |
| 53 | +- Created: `tmp/PR_26140_114-reorder-input-mapping-v2-capture-device-and-gesture-flow_delta.zip` |
| 54 | +- Verified size is greater than 0 bytes. |
| 55 | +- Verified contents are repo-structured and limited to changed implementation/test files plus required reports. |
| 56 | + |
| 57 | +## Playwright Coverage |
| 58 | + |
| 59 | +Playwright impacted: Yes. |
| 60 | + |
| 61 | +Validated behavior: |
| 62 | + |
| 63 | +- Capture appears above Gestures. |
| 64 | +- Selecting a Capture device filters enabled gestures by device source. |
| 65 | +- Game Controller `Button` is absent from visible gesture controls. |
| 66 | +- Game Controller `Btn Press` captures press input. |
| 67 | +- Game Controller `Btn Hold` captures held button input. |
| 68 | +- Game Controller `Btn Release` waits for release and captures release only. |
| 69 | +- Combo and selected tile/action behavior remain intact. |
| 70 | + |
| 71 | +Expected pass behavior: |
| 72 | + |
| 73 | +- Matching gestures remain enabled after selecting a capture device, and non-matching gestures are disabled. |
| 74 | +- `Btn Release` creates `GameControllerButtonRelease` mappings only after the button is released. |
| 75 | + |
| 76 | +Expected fail behavior: |
| 77 | + |
| 78 | +- A duplicated `GameControllerButton` visible gesture, mismatched gesture capture, or press-time release capture would fail the focused assertions. |
| 79 | + |
| 80 | +## V8 Coverage |
| 81 | + |
| 82 | +- `docs/dev/reports/playwright_v8_coverage_report.txt` was refreshed by the Workspace V2 Playwright run. |
| 83 | +- Changed runtime JS files are present in the coverage guardrail: |
| 84 | + - `(94%) tools/input-mapping-v2/js/ToolStarterApp.js` |
| 85 | + - `(89%) tools/input-mapping-v2/js/controls/CaptureControl.js` |
| 86 | + - `(93%) tools/input-mapping-v2/js/controls/GestureListControl.js` |
| 87 | + - `(95%) src/engine/input/InputCapabilityDescriptors.js` |
| 88 | + |
| 89 | +## Manual Validation |
| 90 | + |
| 91 | +1. Open Input Mapping V2. |
| 92 | +2. Confirm the center column order is Capture, Gestures, Captured Mappings. |
| 93 | +3. Add/select an action tile. |
| 94 | +4. Click Capture Keyboard and confirm Mouse/Game Controller gestures are disabled. |
| 95 | +5. Click Capture Mouse and confirm Keyboard/Game Controller gestures are disabled. |
| 96 | +6. With a mocked or real game controller exposed, click that game controller capture button and confirm Keyboard/Mouse gestures are disabled. |
| 97 | +7. Confirm Game Controller shows `Btn Press`, `Btn Hold`, and `Btn Release`, and does not show `Button`. |
| 98 | +8. Capture a controller release by holding a button, selecting `Btn Release`, then releasing; the tile should show `Btn Release`. |
| 99 | + |
| 100 | +## Out Of Scope |
| 101 | + |
| 102 | +- Sample JSON changes. |
| 103 | +- Full samples smoke test. |
0 commit comments