Skip to content

Commit bfbbc9c

Browse files
committed
Consolidate duplicate input mapping ownership into Controls and deprecate legacy input tool - PR_26161_025-controls-accordion-profile-reset-cleanup
1 parent ce45844 commit bfbbc9c

17 files changed

Lines changed: 3652 additions & 1470 deletions
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# PR_26161_025-controls-authoritative-ownership
2+
3+
## Branch Validation
4+
5+
- Current branch: `main`
6+
- Expected branch: `main`
7+
- Result: PASS
8+
9+
## Scope
10+
11+
- Audited `toolbox/controls/index.html`.
12+
- Audited `toolbox/input-mapping-v2/index.html`.
13+
- Authoritative tool: `Controls` at `toolbox/controls/index.html`.
14+
- Deprecated tool: `Input Mapping V2` at `toolbox/input-mapping-v2/index.html`.
15+
- Impacted lane: Controls/Input Mapping tool, Tool metadata registry, Admin DB viewer ownership display.
16+
- Playwright impacted: Yes.
17+
18+
## Requirement Checklist
19+
20+
- PASS - Controls is the user-facing tool for input mappings.
21+
- PASS - Controls is the single source of truth for input mappings.
22+
- PASS - Controls is the single source of truth for controller profiles.
23+
- PASS - Controls is the single source of truth for device detection UI.
24+
- PASS - Controls is the single source of truth for mapping persistence.
25+
- PASS - `input-mapping-v2` is marked deprecated in tool metadata.
26+
- PASS - `input-mapping-v2` route provides redirect/launch guidance to Controls.
27+
- PASS - Duplicate UI ownership removed from `input-mapping-v2`.
28+
- PASS - Duplicate DB ownership removed from `input-mapping-v2`.
29+
- PASS - Duplicate mapping persistence ownership removed from `input-mapping-v2`.
30+
- PASS - Duplicate controller profile ownership removed from `input-mapping-v2`.
31+
- PASS - Tool metadata identifies Controls as authoritative and Input Mapping V2 as deprecated.
32+
- PASS - No engine runtime behavior changed.
33+
34+
## Implementation Notes
35+
36+
- Moved the active input mapping runtime modules into `toolbox/controls/`.
37+
- Updated Controls to load `toolbox/controls/controls.js`.
38+
- Updated the Controls API client to request the `controls` server tool constants and repository.
39+
- Changed shared mock DB ownership from `input-mapping-v2` to `controls` while preserving existing table names:
40+
- `input_mapping_records`
41+
- `input_controller_profile_records`
42+
- Updated the mock API router to expose mapping/profile repository ownership through `controls`.
43+
- Replaced the old `input-mapping-v2` page with a deprecated guidance page linking to Controls.
44+
- Updated tool metadata so Controls points to `toolbox/controls/index.html` and Input Mapping V2 is hidden/deprecated.
45+
- Updated Admin DB Viewer expectations to show Controls as the owner of input mapping and controller profile tables.
46+
47+
## Remaining Migration Work
48+
49+
- None for required UI ownership, DB ownership, mapping persistence ownership, controller profile ownership, or device detection ownership.
50+
- Future removal PR: delete the deprecated `toolbox/input-mapping-v2/` route when old links no longer need guidance.
51+
- Historical manifest/schema references to old tool keys were not changed because this PR does not change engine runtime contracts.
52+
53+
## Validation Performed
54+
55+
- PASS - `node --check toolbox/controls/controls.js`
56+
- PASS - `node --check toolbox/controls/controls-api-client.js`
57+
- PASS - `node --check src/dev-runtime/server/mock-api-router.mjs`
58+
- PASS - `node --check src/dev-runtime/persistence/tool-repositories/input-mapping-mock-repository.js`
59+
- PASS - `node --check src/dev-runtime/persistence/mock-db-store.js`
60+
- PASS - `node --check src/dev-runtime/guest-seeds/tool-metadata-inventory.js`
61+
- PASS - `node --check tests/playwright/tools/InputMappingV2Tool.spec.mjs`
62+
- PASS - `node --check tests/playwright/tools/ToolboxAdminMetadataSsot.spec.mjs`
63+
- PASS - `node --check tests/playwright/tools/AdminDbViewer.spec.mjs`
64+
- PASS - HTML restriction scan on `toolbox/controls/index.html` and `toolbox/input-mapping-v2/index.html`: no inline script/style/event handler matches.
65+
- PASS - Old ownership scan: no active `input-mapping-v2` server constants, repository client, DB owner, or mock router ownership hooks remain.
66+
- PASS - `git diff --check` passed with line-ending warnings only.
67+
- PASS - `npx playwright test tests/playwright/tools/InputMappingV2Tool.spec.mjs`: 5/5 passed.
68+
- PASS - `npx playwright test tests/playwright/tools/ToolboxAdminMetadataSsot.spec.mjs`: 4/4 passed.
69+
- PASS - `npx playwright test tests/playwright/tools/AdminDbViewer.spec.mjs -g "current read-only Local Mem DB tables|current read-only Local DB tables"`: 2/2 passed.
70+
- WARN - `npx playwright test tests/playwright/tools/AdminDbViewer.spec.mjs`: 6/7 passed; the broader persistence test failed on an existing Colors page asset request for `assets/theme-v2/images/characters/palette-manager.png`, outside this Controls ownership scope.
71+
72+
## V8 Coverage
73+
74+
- PASS - `docs_build/dev/reports/playwright_v8_coverage_report.txt` generated.
75+
- PASS - `toolbox/controls/controls.js`: 91% function coverage in the final Controls run.
76+
- PASS - `toolbox/controls/controls-api-client.js`: 100% function coverage in the final Controls run.
77+
- WARN - Server/dev-runtime changed JS files are not collected by browser V8 coverage; advisory only.
78+
79+
## Manual Validation Steps
80+
81+
1. Open `toolbox/controls/index.html`.
82+
2. Confirm the Controls tool shows Actions, Table Input Mappings, Controller Profile, Devices, and Status.
83+
3. Add a mapping and confirm it persists after reload.
84+
4. Add a controller profile and confirm it persists after reload.
85+
5. Open `toolbox/input-mapping-v2/index.html`.
86+
6. Confirm the page is deprecated guidance only and links to Controls.
87+
7. Open Admin DB Viewer and confirm Controls owns `input_mapping_records` and `input_controller_profile_records`.
88+
89+
## Skipped Lanes
90+
91+
- Full samples validation: SKIPPED. Samples were not in scope and no sample JSON or engine runtime behavior changed.
92+
- Full suite: SKIPPED. Targeted Controls, metadata, and DB ownership lanes covered the changed behavior.
93+
94+
## Artifacts
95+
96+
- PASS - Review diff: `docs_build/dev/reports/codex_review.diff`
97+
- PASS - Changed files: `docs_build/dev/reports/codex_changed_files.txt`
98+
- PASS - Repo-structured delta ZIP: `tmp/PR_26161_025-controls-authoritative-ownership_delta.zip`
Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,42 @@
11
# git status --short
2-
M docs_build/dev/reports/codex_changed_files.txt
2+
M docs_build/dev/reports/codex_changed_files.txt
33
M docs_build/dev/reports/codex_review.diff
44
M docs_build/dev/reports/coverage_changed_js_guardrail.txt
55
M docs_build/dev/reports/playwright_v8_coverage_report.txt
6+
M src/dev-runtime/admin/header-nav.local.html
7+
M src/dev-runtime/guest-seeds/tool-metadata-inventory.js
8+
M src/dev-runtime/persistence/mock-db-store.js
9+
M src/dev-runtime/persistence/tool-repositories/input-mapping-mock-repository.js
10+
M src/dev-runtime/server/mock-api-router.mjs
11+
M tests/playwright/tools/AdminDbViewer.spec.mjs
612
M tests/playwright/tools/InputMappingV2Tool.spec.mjs
13+
M tests/playwright/tools/ToolboxAdminMetadataSsot.spec.mjs
714
M toolbox/controls/index.html
815
M toolbox/input-mapping-v2/index.html
9-
M toolbox/input-mapping-v2/input-mapping-v2.js
10-
?? docs_build/dev/reports/controls-edit-gated-capture-devices-report.md
16+
D toolbox/input-mapping-v2/input-mapping-api-client.js
17+
D toolbox/input-mapping-v2/input-mapping-v2.js
18+
?? docs_build/dev/reports/PR_26161_025-controls-authoritative-ownership-report.md
19+
?? toolbox/controls/controls-api-client.js
20+
?? toolbox/controls/controls.js
1121

1222
# git ls-files --others --exclude-standard
13-
docs_build/dev/reports/controls-edit-gated-capture-devices-report.md
23+
docs_build/dev/reports/PR_26161_025-controls-authoritative-ownership-report.md
24+
toolbox/controls/controls-api-client.js
25+
toolbox/controls/controls.js
1426

15-
# git diff --stat
16-
docs_build/dev/reports/codex_changed_files.txt | 17 +-
17-
docs_build/dev/reports/codex_review.diff | 713 +++++++++++++--------
18-
.../dev/reports/coverage_changed_js_guardrail.txt | 2 +-
19-
.../dev/reports/playwright_v8_coverage_report.txt | 6 +-
20-
tests/playwright/tools/InputMappingV2Tool.spec.mjs | 125 +++-
21-
toolbox/controls/index.html | 6 +
22-
toolbox/input-mapping-v2/index.html | 6 +
23-
toolbox/input-mapping-v2/input-mapping-v2.js | 129 +++-
24-
8 files changed, 684 insertions(+), 320 deletions(-)
27+
# git diff --stat (excluding review artifact files)
28+
.../dev/reports/coverage_changed_js_guardrail.txt | 12 +-
29+
.../dev/reports/playwright_v8_coverage_report.txt | 25 +-
30+
src/dev-runtime/admin/header-nav.local.html | 2 +-
31+
.../guest-seeds/tool-metadata-inventory.js | 41 +-
32+
src/dev-runtime/persistence/mock-db-store.js | 4 +-
33+
.../input-mapping-mock-repository.js | 2 +-
34+
src/dev-runtime/server/mock-api-router.mjs | 12 +-
35+
tests/playwright/tools/AdminDbViewer.spec.mjs | 12 +
36+
tests/playwright/tools/InputMappingV2Tool.spec.mjs | 35 +-
37+
.../tools/ToolboxAdminMetadataSsot.spec.mjs | 47 +-
38+
toolbox/controls/index.html | 2 +-
39+
toolbox/input-mapping-v2/index.html | 165 +--
40+
.../input-mapping-v2/input-mapping-api-client.js | 15 -
41+
toolbox/input-mapping-v2/input-mapping-v2.js | 1333 --------------------
42+
14 files changed, 156 insertions(+), 1551 deletions(-)

0 commit comments

Comments
 (0)