Skip to content

Commit 9b5058f

Browse files
committed
Move Controls to wireframe and add controller profile planning - PR_26161_018-controls-wireframe-controller-profiles
1 parent 2167eb5 commit 9b5058f

9 files changed

Lines changed: 1607 additions & 306 deletions

File tree

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
# git status --short
2-
M docs_build/dev/reports/coverage_changed_js_guardrail.txt
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
35
M docs_build/dev/reports/playwright_v8_coverage_report.txt
6+
M src/dev-runtime/guest-seeds/tool-metadata-inventory.js
47
M tests/playwright/tools/InputMappingV2Tool.spec.mjs
58
M toolbox/controls/index.html
69
M toolbox/input-mapping-v2/index.html
7-
M toolbox/input-mapping-v2/input-mapping-v2.js
8-
?? docs_build/dev/reports/controls-table-first-input-report.md
10+
?? docs_build/dev/reports/controls-wireframe-controller-profiles-report.md
911

1012
# git ls-files --others --exclude-standard
11-
docs_build/dev/reports/controls-table-first-input-report.md
13+
docs_build/dev/reports/controls-wireframe-controller-profiles-report.md
1214

1315
# git diff --stat
14-
.../dev/reports/coverage_changed_js_guardrail.txt | 4 +-
15-
.../dev/reports/playwright_v8_coverage_report.txt | 12 ++--
16-
tests/playwright/tools/InputMappingV2Tool.spec.mjs | 68 ++++++++++++++++++++++
17-
toolbox/controls/index.html | 14 +++--
18-
toolbox/input-mapping-v2/index.html | 14 +++--
19-
toolbox/input-mapping-v2/input-mapping-v2.js | 5 +-
20-
6 files changed, 97 insertions(+), 20 deletions(-)
16+
docs_build/dev/reports/codex_changed_files.txt | 26 +-
17+
docs_build/dev/reports/codex_review.diff | 1100 +++++++++++++++-----
18+
.../dev/reports/coverage_changed_js_guardrail.txt | 7 -
19+
.../dev/reports/playwright_v8_coverage_report.txt | 11 -
20+
.../guest-seeds/tool-metadata-inventory.js | 4 +-
21+
tests/playwright/tools/InputMappingV2Tool.spec.mjs | 21 +-
22+
toolbox/controls/index.html | 32 +
23+
toolbox/input-mapping-v2/index.html | 32 +
24+
8 files changed, 927 insertions(+), 306 deletions(-)

docs_build/dev/reports/codex_review.diff

Lines changed: 1431 additions & 275 deletions
Large diffs are not rendered by default.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# PR_26161_018 Controls Wireframe Controller Profiles Report
2+
3+
## Branch Validation
4+
5+
- PASS: Current branch was `main`.
6+
- Expected branch: `main`.
7+
- Worktree was clean before PR_26161_018 edits.
8+
9+
## Scope
10+
11+
- Impacted lane: Controls/Input Mapping tool recovery/UAT.
12+
- Playwright impacted: Yes.
13+
- Full samples validation: SKIPPED. Samples are out of scope for this Controls wireframe/profile planning change, and no sample JSON alignment was requested.
14+
- Engine runtime behavior: Unchanged. No production controller runtime, sample runtime, auth behavior, or unrelated rewrite was added.
15+
16+
## Requirement Checklist
17+
18+
- PASS: Read `docs_build/dev/PROJECT_INSTRUCTIONS.md`.
19+
- PASS: Reviewed `docs_build/tools/input-mapping-v2/uat.md`.
20+
- PASS: Verified branch `main` before edits.
21+
- PASS: Continued from PR_26161_017 table-first Controls behavior.
22+
- PASS: Controls metadata moved away from beta to Wireframe with `releaseChannel: "wireframe"`.
23+
- PASS: Controller profile planning was added inside Controls, not as a separate tool.
24+
- PASS: Wireframe UI includes Device Type, Controller Name, Controller ID, Mapping Profile, Input, and Action.
25+
- PASS: Unknown controller status gives an actionable Refresh Devices step and future Create Profile path.
26+
- PASS: Existing mapping table behavior and DB persistence were preserved.
27+
- PASS: No production controller runtime or engine behavior was added.
28+
29+
## Files Changed
30+
31+
- `src/dev-runtime/guest-seeds/tool-metadata-inventory.js`
32+
- `toolbox/input-mapping-v2/index.html`
33+
- `toolbox/controls/index.html`
34+
- `tests/playwright/tools/InputMappingV2Tool.spec.mjs`
35+
- `docs_build/dev/reports/controls-wireframe-controller-profiles-report.md`
36+
- `docs_build/dev/reports/codex_review.diff`
37+
- `docs_build/dev/reports/codex_changed_files.txt`
38+
- `docs_build/dev/reports/playwright_v8_coverage_report.txt`
39+
- `docs_build/dev/reports/coverage_changed_js_guardrail.txt`
40+
41+
## Testing Performed
42+
43+
- PASS: `node --check src/dev-runtime/guest-seeds/tool-metadata-inventory.js`
44+
- PASS: `node --check tests/playwright/tools/InputMappingV2Tool.spec.mjs`
45+
- PASS: `node --check toolbox/input-mapping-v2/input-mapping-v2.js`
46+
- PASS: HTML restriction scan for inline scripts, style blocks, inline styles, and inline event handlers in both Controls routes.
47+
- PASS: `git diff --check`
48+
- Note: Git reported CRLF normalization warnings on touched files only.
49+
- PASS: `npx playwright test tests/playwright/tools/InputMappingV2Tool.spec.mjs --workers=1 --reporter=line`
50+
- Final result: 4 passed.
51+
- Initial run found only a test expectation mismatch because the registry API returns normalized `wireframe`; the assertion was corrected and the final run passed.
52+
53+
## Playwright Coverage
54+
55+
- Generated `docs_build/dev/reports/playwright_v8_coverage_report.txt`.
56+
- Generated `docs_build/dev/reports/coverage_changed_js_guardrail.txt`.
57+
- Coverage report includes an advisory WARN for `src/dev-runtime/guest-seeds/tool-metadata-inventory.js` because server-side seed metadata is not collected by browser V8 coverage.
58+
- Controls browser runtime coverage was collected for `toolbox/input-mapping-v2/input-mapping-v2.js`.
59+
60+
## Manual Validation Steps
61+
62+
1. Open `/toolbox/input-mapping-v2/index.html`.
63+
2. Confirm Controls shows as Wireframe in registry-backed tool metadata.
64+
3. Confirm Actions, Capture, Controller Profiles, Mappings, Mapping JSON, Devices, and Status panels appear.
65+
4. Confirm Controller Profiles shows Device Type, Controller Name, Controller ID, Mapping Profile, Input, and Action.
66+
5. Confirm the unknown controller status recommends Refresh Devices and points to the future Create Profile flow.
67+
6. Add a mapping row, save it, reload, and confirm it persists.
68+
7. Capture `KeyA`, confirm the mapping appears in the table and Mapping JSON, then click the token to delete it.
69+
70+
## Skipped Lanes
71+
72+
- Full samples smoke: SKIPPED because samples and sample JSON alignment are explicitly out of scope.
73+
- Broad workspace suite: SKIPPED because this PR only changes the Controls tool surface, Controls metadata, and targeted Controls Playwright coverage.
74+
- Engine tests: SKIPPED because no engine runtime files or controller runtime behavior changed.

docs_build/dev/reports/coverage_changed_js_guardrail.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,7 @@ Source: Playwright/Chromium built-in V8 coverage from the active Playwright run.
77

88
Changed runtime JS files considered:
99
(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-
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
1310
(92%) toolbox/input-mapping-v2/input-mapping-v2.js - executed lines 703/703; executed functions 80/87
14-
(100%) toolbox/input-mapping-v2/input-mapping-api-client.js - executed lines 12/12; executed functions 2/2
1511

1612
Guardrail warnings:
1713
(0%) src/dev-runtime/guest-seeds/tool-metadata-inventory.js - WARNING: changed runtime JS file missing from coverage; advisory only
18-
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: changed runtime JS file missing from coverage; advisory only
19-
(0%) src/dev-runtime/persistence/tool-repositories/input-mapping-mock-repository.js - WARNING: changed runtime JS file missing from coverage; advisory only
20-
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file missing from coverage; advisory only

docs_build/dev/reports/playwright_v8_coverage_report.txt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@ Exercised tool entry points detected:
1818

1919
Changed runtime JS files covered:
2020
(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-
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
2421
(92%) toolbox/input-mapping-v2/input-mapping-v2.js - executed lines 703/703; executed functions 80/87
25-
(100%) toolbox/input-mapping-v2/input-mapping-api-client.js - executed lines 12/12; executed functions 2/2
2622

2723
Files with executed line/function counts where available:
2824
(53%) src/engine/api/server-api-client.js - executed lines 159/159; executed functions 10/19
@@ -35,15 +31,8 @@ Files with executed line/function counts where available:
3531

3632
Uncovered or low-coverage changed JS files:
3733
(0%) src/dev-runtime/guest-seeds/tool-metadata-inventory.js - WARNING: uncovered changed runtime JS file; advisory only
38-
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: uncovered changed runtime JS file; advisory only
39-
(0%) src/dev-runtime/persistence/tool-repositories/input-mapping-mock-repository.js - WARNING: uncovered changed runtime JS file; advisory only
40-
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: uncovered changed runtime JS file; advisory only
4134

4235
Changed JS files considered:
4336
(0%) src/dev-runtime/guest-seeds/tool-metadata-inventory.js - changed JS file not collected as browser runtime coverage
44-
(0%) src/dev-runtime/persistence/mock-db-store.js - changed JS file not collected as browser runtime coverage
45-
(0%) src/dev-runtime/persistence/tool-repositories/input-mapping-mock-repository.js - changed JS file not collected as browser runtime coverage
46-
(0%) src/dev-runtime/server/mock-api-router.mjs - changed JS file not collected as browser runtime coverage
4737
(0%) tests/playwright/tools/InputMappingV2Tool.spec.mjs - changed JS file not collected as browser runtime coverage
4838
(92%) toolbox/input-mapping-v2/input-mapping-v2.js - changed JS file with browser V8 coverage
49-
(100%) toolbox/input-mapping-v2/input-mapping-api-client.js - changed JS file with browser V8 coverage

src/dev-runtime/guest-seeds/tool-metadata-inventory.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,8 +730,10 @@ export const TOOL_REGISTRY = Object.freeze([
730730
"requiredForTestable": true,
731731
"requiredForPublish": true,
732732
"requires": [],
733-
"status": "beta",
733+
"status": "Wireframe",
734+
"releaseChannel": "wireframe",
734735
"progressChecklist": [
736+
"Plan controller profiles",
735737
"Map object actions",
736738
"Capture keyboard, mouse, and gamepad inputs",
737739
"Persist mappings through shared DB adapter"

tests/playwright/tools/InputMappingV2Tool.spec.mjs

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,25 @@ test("Controls Input Mapping launch panels, defaults, diagnostics, and workspace
129129
await expect(page.locator("style, [style], script:not([src])")).toHaveCount(0);
130130
await expect(page.locator("summary").filter({ hasText: "Actions" })).toBeVisible();
131131
await expect(page.locator("summary").filter({ hasText: "Capture" })).toBeVisible();
132+
await expect(page.locator("summary").filter({ hasText: "Controller Profiles" })).toBeVisible();
132133
await expect(page.getByRole("heading", { name: "Mappings" })).toBeVisible();
133134
await expect(page.getByText("Mapping JSON", { exact: true })).toBeVisible();
134135
await expect(page.getByText("Devices", { exact: true })).toBeVisible();
135136
await expect(page.getByText("Status", { exact: true })).toBeVisible();
136137
await expect(page.locator("[data-input-return-workspace]")).toBeVisible();
138+
await expect(page.locator("[data-controller-profile-table] th")).toHaveText([
139+
"Device Type",
140+
"Controller Name",
141+
"Controller ID",
142+
"Mapping Profile",
143+
"Input",
144+
"Action",
145+
]);
146+
await expect(page.locator("[data-controller-profile-table]")).toContainText("Unknown Controller");
147+
await expect(page.locator("[data-controller-profile-table]")).toContainText("Create Profile Needed");
148+
await expect(page.locator("[data-controller-profile-status]")).toContainText("WARN: Unknown controller.");
149+
await expect(page.locator("[data-controller-profile-status]")).toContainText("future Create Profile flow");
150+
await expect(page.locator("[data-controller-profile-planning]")).toContainText("Future game launch will match Controller ID to a saved Mapping Profile");
137151
await expect(page.locator("[data-input-mapping-table] th")).toHaveText([
138152
"Object",
139153
"Action",
@@ -175,7 +189,10 @@ test("Controls Input Mapping launch panels, defaults, diagnostics, and workspace
175189

176190
const registryEntry = await controlsRegistryEntry(page);
177191
expect(registryEntry.path).toBe("toolbox/input-mapping-v2/index.html");
178-
expect(registryEntry.status).toBe("beta");
192+
expect(registryEntry.status).toBe("wireframe");
193+
expect(registryEntry.status).not.toBe("beta");
194+
expect(registryEntry.releaseChannel).toBe("wireframe");
195+
expect(registryEntry.releaseChannelLabel).toBe("Wireframe");
179196

180197
await expectNoPageFailures(failures);
181198
} finally {
@@ -303,6 +320,8 @@ test("Controls compatibility route uses rebuilt Input Mapping surface", async ({
303320

304321
try {
305322
await expect(page.getByRole("heading", { name: "Input Mapping" })).toBeVisible();
323+
await expect(page.locator("summary").filter({ hasText: "Controller Profiles" })).toBeVisible();
324+
await expect(page.locator("[data-controller-profile-table]")).toContainText("Mapping Profile");
306325
await expect(page.locator("[data-input-mapping-table]")).toBeVisible();
307326
await expect(page.locator("main")).not.toContainText(/Static wireframe only|Not implemented yet|no database|no runtime behavior/i);
308327
await expectNoPageFailures(failures);

toolbox/controls/index.html

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,38 @@ <h2>Controls</h2>
5656
<p class="status" role="status" data-input-capture-status>Choose an action and capture an input.</p>
5757
</div>
5858
</details>
59+
<details class="vertical-accordion" open>
60+
<summary>Controller Profiles</summary>
61+
<div class="accordion-body content-stack" data-controller-profile-planning>
62+
<p>Plan how gamepad identities will match saved mapping profiles.</p>
63+
<div class="table-wrapper">
64+
<table class="data-table" aria-label="Controller profile planning" data-controller-profile-table>
65+
<thead>
66+
<tr>
67+
<th>Device Type</th>
68+
<th>Controller Name</th>
69+
<th>Controller ID</th>
70+
<th>Mapping Profile</th>
71+
<th>Input</th>
72+
<th>Action</th>
73+
</tr>
74+
</thead>
75+
<tbody>
76+
<tr>
77+
<td>Gamepad</td>
78+
<td>Unknown Controller</td>
79+
<td>Awaiting Device</td>
80+
<td>Create Profile Needed</td>
81+
<td>Button or Axis</td>
82+
<td>Select Action</td>
83+
</tr>
84+
</tbody>
85+
</table>
86+
</div>
87+
<p>Future game launch will match Controller ID to a saved Mapping Profile before applying inputs.</p>
88+
<p class="status" role="status" data-controller-profile-status>WARN: Unknown controller. Refresh Devices after connecting a controller; future Create Profile flow will save the controller identity.</p>
89+
</div>
90+
</details>
5991
</div>
6092
</aside>
6193
<div data-tool-display-mode data-asset-root="assets/theme-v2/images" data-tool-slug="controls" data-tool-icon-src="assets/theme-v2/images/badges/controls.png" data-tool-character-src="assets/theme-v2/images/tools/controls.png"></div>

toolbox/input-mapping-v2/index.html

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,38 @@ <h2>Controls</h2>
5656
<p class="status" role="status" data-input-capture-status>Choose an action and capture an input.</p>
5757
</div>
5858
</details>
59+
<details class="vertical-accordion" open>
60+
<summary>Controller Profiles</summary>
61+
<div class="accordion-body content-stack" data-controller-profile-planning>
62+
<p>Plan how gamepad identities will match saved mapping profiles.</p>
63+
<div class="table-wrapper">
64+
<table class="data-table" aria-label="Controller profile planning" data-controller-profile-table>
65+
<thead>
66+
<tr>
67+
<th>Device Type</th>
68+
<th>Controller Name</th>
69+
<th>Controller ID</th>
70+
<th>Mapping Profile</th>
71+
<th>Input</th>
72+
<th>Action</th>
73+
</tr>
74+
</thead>
75+
<tbody>
76+
<tr>
77+
<td>Gamepad</td>
78+
<td>Unknown Controller</td>
79+
<td>Awaiting Device</td>
80+
<td>Create Profile Needed</td>
81+
<td>Button or Axis</td>
82+
<td>Select Action</td>
83+
</tr>
84+
</tbody>
85+
</table>
86+
</div>
87+
<p>Future game launch will match Controller ID to a saved Mapping Profile before applying inputs.</p>
88+
<p class="status" role="status" data-controller-profile-status>WARN: Unknown controller. Refresh Devices after connecting a controller; future Create Profile flow will save the controller identity.</p>
89+
</div>
90+
</details>
5991
</div>
6092
</aside>
6193
<div data-tool-display-mode data-asset-root="assets/theme-v2/images" data-tool-slug="controls" data-tool-icon-src="assets/theme-v2/images/badges/controls.png" data-tool-character-src="assets/theme-v2/images/tools/controls.png"></div>

0 commit comments

Comments
 (0)