Skip to content

Commit 08603bb

Browse files
committed
Reorder Input Mapping V2 capture device and gesture flow - PR_26140_114-reorder-input-mapping-v2-capture-device-and-gesture-flow
1 parent 1944059 commit 08603bb

8 files changed

Lines changed: 372 additions & 99 deletions

File tree

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
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.

src/engine/input/InputCapabilityDescriptors.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ const GESTURE_DEFINITIONS = Object.freeze([
7878
wheelGesture('MouseWheelLeft', 'Wheel Left', 'Mouse Wheel Left. Use for horizontal scrolling or cycling selections.'),
7979
wheelGesture('MouseWheelRight', 'Wheel Right', 'Mouse Wheel Right. Use for horizontal scrolling or cycling selections.'),
8080
comboGesture('MouseCombo', 'Mouse', ['mouse'], 'Mouse Combo. Use for combinations such as Shift + Mouse Right Button. Capture keyboard, mouse, wheel, or controller inputs for one selected action.'),
81-
gameControllerGesture('GameControllerButton', 'Button', 'Game controller button. Use for face buttons, shoulder buttons, and digital controller controls.', 'gameController'),
8281
gameControllerGesture('GameControllerButtonPress', 'Btn Press', 'Game controller button press. Use when an action should trigger on the transition from up to down.', 'gameController'),
8382
gameControllerGesture('GameControllerButtonHold', 'Btn Hold', 'Game controller button hold. Use while a game controller button remains held.', 'gameController'),
8483
gameControllerGesture('GameControllerButtonRelease', 'Btn Release', 'Game controller button release. Use when an action should trigger after a held button is released.', 'gameController'),

0 commit comments

Comments
 (0)