Skip to content

Commit ea0ca26

Browse files
committed
Move Controls action and object selection into mappings footer - PR_26161_023-controls-footer-action-object-selection
1 parent 52362d5 commit ea0ca26

9 files changed

Lines changed: 362 additions & 235 deletions

File tree

docs_build/dev/reports/codex_changed_files.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ M docs_build/dev/reports/coverage_changed_js_guardrail.txt
55
M toolbox/controls/index.html
66
M toolbox/input-mapping-v2/index.html
77
M toolbox/input-mapping-v2/input-mapping-v2.js
8-
?? docs_build/dev/reports/controls-action-descriptions-report.md
8+
?? docs_build/dev/reports/controls-footer-action-object-selection-report.md
99

1010
# git ls-files --others --exclude-standard
11-
docs_build/dev/reports/controls-action-descriptions-report.md
11+
docs_build/dev/reports/controls-footer-action-object-selection-report.md
1212

1313
# git diff --stat
1414
.../dev/reports/coverage_changed_js_guardrail.txt | 2 +-
15-
.../dev/reports/playwright_v8_coverage_report.txt | 8 ++---
16-
tests/playwright/tools/InputMappingV2Tool.spec.mjs | 29 +++++++++++++---
17-
toolbox/controls/index.html | 6 ----
18-
toolbox/input-mapping-v2/index.html | 6 ----
19-
toolbox/input-mapping-v2/input-mapping-v2.js | 40 +++++++++++++---------
20-
6 files changed, 54 insertions(+), 37 deletions(-)
15+
.../dev/reports/playwright_v8_coverage_report.txt | 4 +--
16+
tests/playwright/tools/InputMappingV2Tool.spec.mjs | 19 ++++++++------
17+
toolbox/controls/index.html | 30 +++++++++++++---------
18+
toolbox/input-mapping-v2/index.html | 30 +++++++++++++---------
19+
toolbox/input-mapping-v2/input-mapping-v2.js | 27 ++++++++-----------
20+
6 files changed, 61 insertions(+), 51 deletions(-)

docs_build/dev/reports/codex_review.diff

Lines changed: 231 additions & 176 deletions
Large diffs are not rendered by default.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# PR_26161_023 Controls Footer Action Object Selection Report
2+
3+
## Branch Validation
4+
- Current branch: `main`
5+
- Expected branch: `main`
6+
- Result: PASS
7+
8+
## Summary
9+
- Moved the Action and Object creation selectors into the Table Input > Mappings footer.
10+
- Replaced the prior Selected Action / Selected Object text with footer dropdown controls.
11+
- Kept the Action dropdown backed by the Controls action registry.
12+
- Kept the Object dropdown backed by shared DB/mock-adapter Object records.
13+
- Removed duplicate Action/Object selectors from Controls > Actions.
14+
- Converted Controls > Actions into a reference-only action catalog with Action Name and Description.
15+
- Preserved action descriptions from PR_26161_022.
16+
- Preserved device-specific input capture, Controller Profile center placement, State explanation, table editing, Add Mapping, Cancel, Edit, Trash, DB reload persistence, and Wireframe status.
17+
18+
## Impacted Lane
19+
- runtime
20+
- recovery/UAT
21+
22+
## Playwright Impacted
23+
- Yes
24+
25+
## Testing Performed
26+
- `node --check toolbox/input-mapping-v2/input-mapping-v2.js` - PASS
27+
- `node --check tests/playwright/tools/InputMappingV2Tool.spec.mjs` - PASS
28+
- `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
29+
- `git diff --check` - PASS
30+
- `npx playwright test tests/playwright/tools/InputMappingV2Tool.spec.mjs --workers=1 --reporter=line` - PASS, 5 passed
31+
32+
## Playwright Behavior Covered
33+
- Mappings footer contains Action and Object dropdowns.
34+
- Controls > Actions no longer contains Action/Object selectors.
35+
- Controls > Actions displays Action Name and Description reference catalog.
36+
- Action catalog descriptions remain visible and alphabetically ordered by action name.
37+
- Object dropdown loads DB-backed Object records, including seeded Hero object.
38+
- Footer Action/Object dropdown selections drive Add Mapping defaults.
39+
- Captured mappings persist after reload.
40+
- Device-specific capture still works.
41+
42+
## V8 Coverage
43+
- Report: `docs_build/dev/reports/playwright_v8_coverage_report.txt`
44+
- Changed runtime JS covered: `toolbox/input-mapping-v2/input-mapping-v2.js`
45+
- Coverage result: 91% function coverage, 105/116 functions
46+
47+
## Manual Validation Steps
48+
1. Open `/toolbox/input-mapping-v2/index.html`.
49+
2. Confirm Controls > Actions shows only the Action Name / Description catalog.
50+
3. Confirm the Mappings footer shows Action and Object dropdowns next to Add Mapping and Reset Mappings.
51+
4. Add or seed an Object record and confirm it appears in the footer Object dropdown.
52+
5. Choose an Action and Object in the footer, click Add Mapping, and confirm the edit row uses those defaults.
53+
6. Capture an input, save, reload, and confirm the mapping persists.
54+
55+
## Skipped Lanes
56+
- Full samples validation was skipped as required by the PR instructions; this change is scoped to Controls/Input Mapping UI and targeted behavior tests.
57+
- Full workspace contract lane was skipped because no Workspace V2 contract/runtime files changed; workspace return remains covered by targeted Controls Playwright.
58+
59+
## Runtime Scope Confirmation
60+
- Controls remains Wireframe.
61+
- Controls mapping and controller profile data remain persisted through the shared DB/mock adapter.
62+
- No sample JSON alignment, auth behavior, production DB behavior, engine runtime behavior, or unrelated rewrites were added.

docs_build/dev/reports/coverage_changed_js_guardrail.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +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-
(91%) toolbox/input-mapping-v2/input-mapping-v2.js - executed lines 1133/1133; executed functions 105/116
9+
(91%) toolbox/input-mapping-v2/input-mapping-v2.js - executed lines 1129/1129; executed functions 105/116
1010

1111
Guardrail warnings:
1212
(100%) none - no changed runtime JS coverage warnings

docs_build/dev/reports/playwright_v8_coverage_report.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ Exercised tool entry points detected:
1717
(59%) Theme V2 Shared JS - exercised 2 runtime JS files
1818

1919
Changed runtime JS files covered:
20-
(91%) toolbox/input-mapping-v2/input-mapping-v2.js - executed lines 1133/1133; executed functions 105/116
20+
(91%) toolbox/input-mapping-v2/input-mapping-v2.js - executed lines 1129/1129; executed functions 105/116
2121

2222
Files with executed line/function counts where available:
2323
(53%) src/engine/api/server-api-client.js - executed lines 159/159; executed functions 10/19
2424
(58%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 603/603; executed functions 30/52
2525
(64%) assets/theme-v2/js/tool-display-mode.js - executed lines 209/209; executed functions 9/14
2626
(75%) toolbox/tool-registry-api-client.js - executed lines 152/152; executed functions 21/28
27-
(91%) toolbox/input-mapping-v2/input-mapping-v2.js - executed lines 1133/1133; executed functions 105/116
27+
(91%) toolbox/input-mapping-v2/input-mapping-v2.js - executed lines 1129/1129; executed functions 105/116
2828
(100%) toolbox/input-mapping-v2/input-mapping-api-client.js - executed lines 12/12; executed functions 2/2
2929
(100%) toolbox/objects/objects-api-client.js - executed lines 10/10; executed functions 2/2
3030

tests/playwright/tools/InputMappingV2Tool.spec.mjs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ test("Controls Input Mapping launch panels, defaults, diagnostics, and workspace
154154
await expect(page.locator(".tool-workspace")).toBeVisible();
155155
await expect(page.locator("style, [style], script:not([src])")).toHaveCount(0);
156156
await expect(page.locator("summary").filter({ hasText: "Actions" })).toBeVisible();
157+
await expect(page.locator("aside").first().locator("[data-input-action-select]")).toHaveCount(0);
158+
await expect(page.locator("aside").first().locator("[data-input-object-select]")).toHaveCount(0);
159+
await expect(page.locator("[data-input-action-catalog] th")).toHaveText(["Action Name", "Description"]);
157160
await expect(page.locator("summary").filter({ hasText: "Capture" })).toHaveCount(0);
158161
await expect(page.locator("aside").first().locator("summary").filter({ hasText: "Controller Profiles" })).toHaveCount(0);
159162
await expect(page.locator(".tool-center-panel [data-controller-profile-planning]")).toBeVisible();
@@ -192,9 +195,10 @@ test("Controls Input Mapping launch panels, defaults, diagnostics, and workspace
192195
await expect(page.locator("[data-input-mapping-table] tfoot [data-input-add-mapping]")).toBeVisible();
193196
await expect(page.locator("[data-input-mapping-table] tfoot [data-input-reset-mappings]")).toBeVisible();
194197
await expect(page.locator("[data-input-mapping-table] tfoot [data-input-selected-context]")).toBeVisible();
195-
await expect(page.locator("[data-input-selected-action]")).toHaveText("Selected Action: Cancel");
196-
await expect(page.locator("[data-input-selected-object]")).toHaveText("Selected Object: Global");
197-
await expect(page.locator("[data-input-action-select] option")).toHaveText(DEFAULT_ACTION_LABELS);
198+
await expect(page.locator("[data-input-mapping-table] tfoot [data-input-action-select]")).toBeVisible();
199+
await expect(page.locator("[data-input-mapping-table] tfoot [data-input-object-select]")).toBeVisible();
200+
await expect(page.locator("[data-input-mapping-table] tfoot [data-input-action-select] option")).toHaveText(DEFAULT_ACTION_LABELS);
201+
await expect(page.locator("[data-input-mapping-table] tfoot [data-input-object-select] option")).toHaveText(["Global"]);
198202
await expect(page.locator("[data-input-action-label]")).toHaveText(DEFAULT_ACTION_LABELS);
199203
await expect(page.locator("[data-input-action-description]")).toHaveText(DEFAULT_ACTION_DESCRIPTIONS);
200204
expect(DEFAULT_ACTION_LABELS).toEqual([...DEFAULT_ACTION_LABELS].sort((left, right) => left.localeCompare(right)));
@@ -217,8 +221,7 @@ test("Controls Input Mapping launch panels, defaults, diagnostics, and workspace
217221
await expect(page.locator("[data-input-source-diagnostics]")).toContainText("GamepadInputAdapter");
218222

219223
await page.locator("[data-input-action-select]").selectOption("moveLeft");
220-
await expect(page.locator("[data-input-selected-action]")).toHaveText("Selected Action: Move Left");
221-
await expect(page.locator("[data-input-selected-object]")).toHaveText("Selected Object: Global");
224+
await expect(page.locator("[data-input-status-log]")).toHaveText("Selected Move Left action for new mappings.");
222225
await page.getByRole("button", { name: "Refresh Devices" }).click();
223226
await expect(page.locator("[data-input-status-log]")).toHaveText("Device diagnostics refreshed.");
224227

@@ -439,11 +442,11 @@ test("Controls Input Mapping captures KeyA, keeps input click safe, and deletes
439442
try {
440443
await seedHeroObject(page);
441444
await page.reload({ waitUntil: "networkidle" });
442-
await expect(page.locator("[data-input-object-select] option")).toContainText(["Global", "Hero"]);
445+
await expect(page.locator("[data-input-mapping-table] tfoot [data-input-object-select] option")).toContainText(["Global", "Hero"]);
443446
await page.locator("[data-input-object-select]").selectOption("hero");
444447
await page.locator("[data-input-action-select]").selectOption("moveLeft");
445-
await expect(page.locator("[data-input-selected-action]")).toHaveText("Selected Action: Move Left");
446-
await expect(page.locator("[data-input-selected-object]")).toHaveText("Selected Object: Hero");
448+
await expect(page.locator("[data-input-mapping-table] tfoot [data-input-action-select]")).toHaveValue("moveLeft");
449+
await expect(page.locator("[data-input-mapping-table] tfoot [data-input-object-select]")).toHaveValue("hero");
447450

448451
await page.locator("[data-input-add-mapping]").click();
449452
await expect(page.locator("[data-input-row-object]")).toHaveValue("hero");

toolbox/controls/index.html

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ <h2>Controls</h2>
3333
<details class="vertical-accordion" open>
3434
<summary>Actions</summary>
3535
<div class="accordion-body content-stack">
36-
<label>
37-
Action
38-
<select data-input-action-select></select>
39-
</label>
40-
<label>
41-
Object
42-
<select data-input-object-select></select>
43-
</label>
44-
<ul data-input-default-actions></ul>
36+
<table class="data-table" aria-label="Controls action catalog" data-input-action-catalog>
37+
<thead>
38+
<tr>
39+
<th>Action Name</th>
40+
<th>Description</th>
41+
</tr>
42+
</thead>
43+
<tbody data-input-default-actions></tbody>
44+
</table>
4545
</div>
4646
</details>
4747
</div>
@@ -84,9 +84,15 @@ <h3>Mappings</h3>
8484
<button class="btn" type="button" data-input-add-mapping>Add Mapping</button>
8585
<button class="btn" type="button" data-input-reset-mappings>Reset Mappings</button>
8686
</div>
87-
<div class="action-group action-group--end" aria-label="Selected mapping context" data-input-selected-context>
88-
<span class="status" data-input-selected-action>Selected Action: Cancel</span>
89-
<span class="status" data-input-selected-object>Selected Object: Global</span>
87+
<div class="action-group action-group--end" aria-label="Mapping creation selections" data-input-selected-context>
88+
<label>
89+
Action
90+
<select data-input-action-select></select>
91+
</label>
92+
<label>
93+
Object
94+
<select data-input-object-select></select>
95+
</label>
9096
</div>
9197
</div>
9298
</td>

toolbox/input-mapping-v2/index.html

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ <h2>Controls</h2>
3333
<details class="vertical-accordion" open>
3434
<summary>Actions</summary>
3535
<div class="accordion-body content-stack">
36-
<label>
37-
Action
38-
<select data-input-action-select></select>
39-
</label>
40-
<label>
41-
Object
42-
<select data-input-object-select></select>
43-
</label>
44-
<ul data-input-default-actions></ul>
36+
<table class="data-table" aria-label="Controls action catalog" data-input-action-catalog>
37+
<thead>
38+
<tr>
39+
<th>Action Name</th>
40+
<th>Description</th>
41+
</tr>
42+
</thead>
43+
<tbody data-input-default-actions></tbody>
44+
</table>
4545
</div>
4646
</details>
4747
</div>
@@ -84,9 +84,15 @@ <h3>Mappings</h3>
8484
<button class="btn" type="button" data-input-add-mapping>Add Mapping</button>
8585
<button class="btn" type="button" data-input-reset-mappings>Reset Mappings</button>
8686
</div>
87-
<div class="action-group action-group--end" aria-label="Selected mapping context" data-input-selected-context>
88-
<span class="status" data-input-selected-action>Selected Action: Cancel</span>
89-
<span class="status" data-input-selected-object>Selected Object: Global</span>
87+
<div class="action-group action-group--end" aria-label="Mapping creation selections" data-input-selected-context>
88+
<label>
89+
Action
90+
<select data-input-action-select></select>
91+
</label>
92+
<label>
93+
Object
94+
<select data-input-object-select></select>
95+
</label>
9096
</div>
9197
</div>
9298
</td>

0 commit comments

Comments
 (0)