You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Added focused Workspace V2 Playwright assertions for the requested capture-device label behavior.
6
+
- Active `docs/pr/BUILD_PR.md` was for an unrelated Level 18 rebase, so the inline `PR_26140_094-polish-input-mapping-v2-capture-device-labels` BUILD request was used as the source of truth.
7
+
- No schemas were changed.
8
+
- No sample JSON was touched.
9
+
10
+
## Failing Tool Before
11
+
- Input Mapping V2 capture buttons exposed raw gamepad IDs in one line.
12
+
- Captured gamepad mapping tiles included `(Gamepad N)` clutter in visible tile text.
13
+
- Capture buttons did not visibly stay active while waiting for keyboard, mouse, or gamepad input.
14
+
- Mapping tiles were still 175px wide.
15
+
16
+
## Tool Fixed
17
+
- Input Mapping V2.
18
+
19
+
## Changes
20
+
- Gamepad capture buttons now use multiline labels:
21
+
- generic USB gamepad: `Capture (Gamepad N)`, vendor/product, display name;
22
+
- named USB gamepad: `Capture <device name>`, vendor/product, display name.
23
+
- Vendor/product parsing normalizes browser gamepad IDs and removes dangling punctuation from the visible line.
24
+
- Keyboard, mouse, and gamepad capture buttons get a consistent `is-capturing` highlight while waiting.
25
+
- Capture highlight clears after capture completion, timeout, failed device capture, or action-selection cancellation.
26
+
- Gamepad capture is now armed and completed by auto polling when a matching device input becomes active.
27
+
- Captured mapping tiles are 225x175, increasing width by 50px while preserving height.
28
+
- Tile tokens render concise source/input text, such as `Logitech RumblePad 2` and `Button 2`, without visible `(Gamepad N)` clutter.
29
+
- Token hover/title preserves detailed device information, including USB transport, mapping type, vendor/product, and input name.
30
+
- Persisted payloads still emit only the existing schema fields: `source`, `binding`, `label`, and `engine`.
- generic USB gamepad capture button multiline label;
41
+
- named gamepad capture button multiline label;
42
+
- capture button highlight while waiting;
43
+
- capture button unhighlight after capture;
44
+
- mapping tile width increased to 225px while height remains 175px;
45
+
- tile text omits `(Gamepad 1)` USB ID clutter;
46
+
- hover/title includes full device/vendor/product/input details;
47
+
- keyboard and mouse capture still work;
48
+
- existing auto gamepad polling and selected mapping indication remain covered.
49
+
50
+
Expected pass behavior:
51
+
- Browser-exposed gamepads appear with readable multiline capture labels.
52
+
- Capture buttons show a selected/waiting highlight until capture completes.
53
+
- Captured gamepad tiles show concise device/input lines and detailed title text.
54
+
- Tool JSON remains schema-compatible.
55
+
56
+
Expected fail behavior:
57
+
- If raw USB IDs, dangling punctuation, missing capture highlight, tile-size regression, or schema-drifted display metadata returns, the focused Input Mapping V2 Playwright tests fail.
58
+
59
+
## Validation
60
+
- PASS: targeted syntax validation for changed Input Mapping V2 JS files and the touched Workspace V2 Playwright spec.
`npx playwright test tests/playwright/tools/WorkspaceManagerV2.spec.mjs -g "auto-polls Input Mapping V2 gamepads on load|launches Input Mapping V2 and captures keyboard mappings" --project=playwright --workers=1 --reporter=list`
63
+
- PASS: `npm run test:workspace-v2` with 61 passed.
64
+
- PASS: Input Mapping V2 HTML external JS/CSS contract scan with `rg --pcre2`; no inline scripts, inline styles, or inline event handlers found.
65
+
- PASS: Playwright V8 coverage report generated by the Workspace V2 suite at `docs/dev/reports/playwright_v8_coverage_report.txt`.
66
+
- Full samples smoke test skipped because this PR is limited to Input Mapping V2 capture UI and Workspace V2 coverage; sample JSON is out of scope.
67
+
68
+
## Manual Validation
69
+
1. Launch Input Mapping V2.
70
+
2. Connect or expose a generic USB gamepad and confirm its capture button shows `Capture (Gamepad N)`, a clean vendor/product line, and `USB gamepad`.
71
+
3. Connect or expose a named USB gamepad and confirm its capture button shows `Capture <device name>`, a clean vendor/product line, and the device name.
72
+
4. Click Capture Keyboard, Capture Mouse, and a gamepad capture button; confirm each highlights while waiting and clears after capture.
73
+
5. Capture a gamepad button and confirm the mapping tile shows only the concise device name and button/axis, not `(Gamepad N)`.
74
+
6. Hover the captured gamepad token and confirm the title includes device USB detail, mapping type, vendor/product, and input.
75
+
7. Confirm combo captures still accumulate on the selected tile and selected tile indication still updates when clicked.
await expect(page.locator("#statusLog")).toHaveValue(/WARN Gamepad capture unavailable: Arcade Twin Stick \(Gamepad 1\) is detected, but no live button or axis value is active/);
0 commit comments