Skip to content

Commit 965d351

Browse files
committed
Move Controls capture into mapping rows and fix input click behavior - PR_26161_020-controls-row-capture-cleanup
1 parent 2040094 commit 965d351

9 files changed

Lines changed: 972 additions & 3653 deletions

File tree

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,20 @@
11
# git status --short
2-
M docs_build/dev/reports/codex_changed_files.txt
3-
M docs_build/dev/reports/codex_review.diff
4-
M docs_build/dev/reports/coverage_changed_js_guardrail.txt
2+
M docs_build/dev/reports/coverage_changed_js_guardrail.txt
53
M docs_build/dev/reports/playwright_v8_coverage_report.txt
6-
M src/dev-runtime/persistence/mock-db-store.js
7-
M src/dev-runtime/persistence/tool-repositories/input-mapping-mock-repository.js
84
M tests/playwright/tools/InputMappingV2Tool.spec.mjs
95
M toolbox/controls/index.html
106
M toolbox/input-mapping-v2/index.html
117
M toolbox/input-mapping-v2/input-mapping-v2.js
12-
?? docs_build/dev/reports/controls-db-controller-profiles-report.md
8+
?? docs_build/dev/reports/controls-row-capture-cleanup-report.md
139

1410
# git ls-files --others --exclude-standard
15-
docs_build/dev/reports/controls-db-controller-profiles-report.md
11+
docs_build/dev/reports/controls-row-capture-cleanup-report.md
1612

1713
# git diff --stat
18-
docs_build/dev/reports/codex_changed_files.txt | 30 +-
19-
docs_build/dev/reports/codex_review.diff | 2400 ++++++++------------
20-
.../dev/reports/coverage_changed_js_guardrail.txt | 6 +-
21-
.../dev/reports/playwright_v8_coverage_report.txt | 14 +-
22-
src/dev-runtime/persistence/mock-db-store.js | 5 +-
23-
.../input-mapping-mock-repository.js | 98 +-
24-
tests/playwright/tools/InputMappingV2Tool.spec.mjs | 92 +-
25-
toolbox/controls/index.html | 21 +-
26-
toolbox/input-mapping-v2/index.html | 21 +-
27-
toolbox/input-mapping-v2/input-mapping-v2.js | 326 ++-
28-
10 files changed, 1567 insertions(+), 1446 deletions(-)
14+
.../dev/reports/coverage_changed_js_guardrail.txt | 9 +-
15+
.../dev/reports/playwright_v8_coverage_report.txt | 18 +-
16+
tests/playwright/tools/InputMappingV2Tool.spec.mjs | 86 +++++++--
17+
toolbox/controls/index.html | 26 +--
18+
toolbox/input-mapping-v2/index.html | 26 +--
19+
toolbox/input-mapping-v2/input-mapping-v2.js | 204 +++++++++++++--------
20+
6 files changed, 226 insertions(+), 143 deletions(-)

docs_build/dev/reports/codex_review.diff

Lines changed: 669 additions & 3492 deletions
Large diffs are not rendered by default.
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# PR_26161_020 Controls Row Capture Cleanup Report
2+
3+
## Branch Validation
4+
- Current branch: `main`
5+
- Expected branch: `main`
6+
- Result: PASS
7+
8+
## Summary
9+
- Removed the separate Controls/Input Mapping Capture accordion.
10+
- Moved selected Action/Object context into the right side of the mappings table footer next to Add Mapping and Reset Mappings.
11+
- Replaced the row Input free-text editor with row-level capture buttons:
12+
- Capture Keyboard
13+
- Capture Mouse
14+
- Capture Gamepad
15+
- Kept Input display clickable without deleting mappings.
16+
- Kept deletion scoped to the row Trash action.
17+
- Preserved table-first add/edit/cancel, Mapping JSON, Devices, Status, controller profiles, workspace return, and shared DB/mock-adapter persistence.
18+
19+
## Impacted Lane
20+
- runtime
21+
- recovery/UAT
22+
23+
## Playwright Impacted
24+
- Yes
25+
26+
## Testing Performed
27+
- `node --check toolbox/input-mapping-v2/input-mapping-v2.js` - PASS
28+
- `node --check tests/playwright/tools/InputMappingV2Tool.spec.mjs` - PASS
29+
- `rg --pcre2 -n "<style|style=|<script(?![^>]*\\bsrc=)|on(click|change|input|submit|keydown|keyup|pointerdown|mousedown|mouseup)=" toolbox/input-mapping-v2/index.html toolbox/controls/index.html` - PASS, no inline CSS/JS/event handlers found
30+
- `git diff --check` - PASS
31+
- `npx playwright test tests/playwright/tools/InputMappingV2Tool.spec.mjs --workers=1 --reporter=line` - PASS, 5 passed
32+
33+
## Playwright Behavior Covered
34+
- Selected Action/Object display appears in the mappings table footer and updates from the Actions panel.
35+
- Capture accordion is absent.
36+
- Row-level Capture Keyboard, Capture Mouse, and Capture Gamepad buttons appear during row add/edit.
37+
- Keyboard capture updates the active row input and persists after Save/reload.
38+
- Gamepad capture shows actionable WARN when no live gamepad value is available.
39+
- Gamepad capture can populate a row when a live gamepad value is supplied by the test harness.
40+
- Clicking the displayed Input token does not delete the row.
41+
- Trash is the only covered row deletion path.
42+
- Mapping JSON, Devices, Status, controller profiles, and compatibility route continue to render.
43+
44+
## V8 Coverage
45+
- Report: `docs_build/dev/reports/playwright_v8_coverage_report.txt`
46+
- Changed runtime JS covered: `toolbox/input-mapping-v2/input-mapping-v2.js`
47+
- Coverage result: 92% function coverage, 105/114 functions
48+
49+
## Manual Validation Steps
50+
1. Open `/toolbox/input-mapping-v2/index.html`.
51+
2. Confirm the left column shows Actions and Controller Profiles, with no Capture accordion.
52+
3. Confirm Add Mapping and Reset Mappings are on the left side of the table footer.
53+
4. Confirm Selected Action and Selected Object appear on the right side of the table footer.
54+
5. Click Add Mapping and confirm Add Mapping disables while the edit row is active.
55+
6. Click Capture Keyboard, press a key, save the row, reload, and confirm the mapping remains.
56+
7. Click the Input token and confirm the row remains.
57+
8. Click Trash and confirm the row is deleted.
58+
59+
## Skipped Lanes
60+
- Full samples validation was skipped as required by the PR instructions; this change is limited to the Controls/Input Mapping toolbox UI and test coverage.
61+
- Full workspace contract lane was skipped because no Workspace V2 contract/runtime files changed; workspace return visibility is covered in the targeted Controls Playwright test.
62+
63+
## Runtime Scope Confirmation
64+
- Controls remains Wireframe.
65+
- No production controller runtime was added.
66+
- No sample JSON alignment, auth behavior, production DB behavior, engine runtime behavior, or unrelated rewrites were added.
67+
- Controls mapping data remains persisted through the shared DB/mock adapter.

docs_build/dev/reports/coverage_changed_js_guardrail.txt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,7 @@ Missing changed runtime JS files are WARN, not FAIL.
66
Source: Playwright/Chromium built-in V8 coverage from the active Playwright run.
77

88
Changed runtime JS files considered:
9-
(0%) src/dev-runtime/guest-seeds/tool-metadata-inventory.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
10-
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
11-
(0%) src/dev-runtime/persistence/tool-repositories/input-mapping-mock-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
12-
(90%) toolbox/input-mapping-v2/input-mapping-v2.js - executed lines 1000/1000; executed functions 99/110
9+
(92%) toolbox/input-mapping-v2/input-mapping-v2.js - executed lines 1053/1053; executed functions 105/114
1310

1411
Guardrail warnings:
15-
(0%) src/dev-runtime/guest-seeds/tool-metadata-inventory.js - WARNING: changed runtime JS file missing from coverage; advisory only
16-
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: changed runtime JS file missing from coverage; advisory only
17-
(0%) src/dev-runtime/persistence/tool-repositories/input-mapping-mock-repository.js - WARNING: changed runtime JS file missing from coverage; advisory only
12+
None.

docs_build/dev/reports/playwright_v8_coverage_report.txt

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,25 @@ Note: entry percentages use function coverage when available, otherwise line cov
1212
Note: coverage entries are aggregated across every page/tool where coverageReporter.start(page) and coverageReporter.stop(page) ran.
1313

1414
Exercised tool entry points detected:
15-
(87%) Toolbox Index - exercised 4 runtime JS files
15+
(89%) Toolbox Index - exercised 4 runtime JS files
1616
(0%) Tool Template V2 - not exercised by this Playwright run
1717
(59%) Theme V2 Shared JS - exercised 2 runtime JS files
1818

1919
Changed runtime JS files covered:
20-
(0%) src/dev-runtime/guest-seeds/tool-metadata-inventory.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
21-
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
22-
(0%) src/dev-runtime/persistence/tool-repositories/input-mapping-mock-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
23-
(90%) toolbox/input-mapping-v2/input-mapping-v2.js - executed lines 1000/1000; executed functions 99/110
20+
(92%) toolbox/input-mapping-v2/input-mapping-v2.js - executed lines 1053/1053; executed functions 105/114
2421

2522
Files with executed line/function counts where available:
2623
(53%) src/engine/api/server-api-client.js - executed lines 159/159; executed functions 10/19
2724
(58%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 603/603; executed functions 30/52
2825
(64%) assets/theme-v2/js/tool-display-mode.js - executed lines 209/209; executed functions 9/14
2926
(75%) toolbox/tool-registry-api-client.js - executed lines 152/152; executed functions 21/28
30-
(90%) toolbox/input-mapping-v2/input-mapping-v2.js - executed lines 1000/1000; executed functions 99/110
27+
(92%) toolbox/input-mapping-v2/input-mapping-v2.js - executed lines 1053/1053; executed functions 105/114
3128
(100%) toolbox/input-mapping-v2/input-mapping-api-client.js - executed lines 12/12; executed functions 2/2
3229
(100%) toolbox/objects/objects-api-client.js - executed lines 10/10; executed functions 2/2
3330

3431
Uncovered or low-coverage changed JS files:
35-
(0%) src/dev-runtime/guest-seeds/tool-metadata-inventory.js - WARNING: uncovered changed runtime JS file; advisory only
36-
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: uncovered changed runtime JS file; advisory only
37-
(0%) src/dev-runtime/persistence/tool-repositories/input-mapping-mock-repository.js - WARNING: uncovered changed runtime JS file; advisory only
32+
None.
3833

3934
Changed JS files considered:
40-
(0%) src/dev-runtime/guest-seeds/tool-metadata-inventory.js - changed JS file not collected as browser runtime coverage
41-
(0%) src/dev-runtime/persistence/mock-db-store.js - changed JS file not collected as browser runtime coverage
42-
(0%) src/dev-runtime/persistence/tool-repositories/input-mapping-mock-repository.js - changed JS file not collected as browser runtime coverage
4335
(0%) tests/playwright/tools/InputMappingV2Tool.spec.mjs - changed JS file not collected as browser runtime coverage
44-
(90%) toolbox/input-mapping-v2/input-mapping-v2.js - changed JS file with browser V8 coverage
36+
(92%) toolbox/input-mapping-v2/input-mapping-v2.js - changed JS file with browser V8 coverage

0 commit comments

Comments
 (0)