Skip to content

Commit 39f34d8

Browse files
committed
Validate Controls mappings against DB-backed Objects and Actions - PR_26161_026-controls-object-action-mapping-validation
1 parent bfbbc9c commit 39f34d8

8 files changed

Lines changed: 1206 additions & 3452 deletions

File tree

‎docs_build/dev/reports/codex_changed_files.txt‎

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,18 @@
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
126
M tests/playwright/tools/InputMappingV2Tool.spec.mjs
13-
M tests/playwright/tools/ToolboxAdminMetadataSsot.spec.mjs
7+
M toolbox/controls/controls.js
148
M toolbox/controls/index.html
15-
M toolbox/input-mapping-v2/index.html
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
9+
?? docs_build/dev/reports/controls-object-action-mapping-validation-report.md
2110

2211
# git ls-files --others --exclude-standard
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
12+
docs_build/dev/reports/controls-object-action-mapping-validation-report.md
2613

2714
# 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(-)
15+
.../dev/reports/coverage_changed_js_guardrail.txt | 2 +-
16+
.../dev/reports/playwright_v8_coverage_report.txt | 8 +-
17+
tests/playwright/tools/InputMappingV2Tool.spec.mjs | 220 +++++++++++++++++++++
18+
toolbox/controls/controls.js | 205 +++++++++++++++++--
19+
toolbox/controls/index.html | 5 +
20+
5 files changed, 416 insertions(+), 24 deletions(-)

‎docs_build/dev/reports/codex_review.diff‎

Lines changed: 680 additions & 3397 deletions
Large diffs are not rendered by default.
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# PR_26161_026-controls-object-action-mapping-validation
2+
3+
## Branch Validation
4+
5+
- Current branch: `main`
6+
- Expected branch: `main`
7+
- Result: PASS
8+
9+
## Scope
10+
11+
- Impacted lane: Controls/Input Mapping tool.
12+
- Playwright impacted: Yes.
13+
- Controls status: Wireframe preserved.
14+
- Runtime engine behavior: Not changed.
15+
- Samples: Skipped.
16+
17+
## Requirement Checklist
18+
19+
- PASS - Controls data remains DB-backed through the shared DB/mock adapter.
20+
- PASS - Object dropdown loads DB-backed Objects records through the Objects repository client.
21+
- PASS - Footer Action dropdown filters from the selected Object.
22+
- PASS - Inline row Action dropdown filters from the row Object.
23+
- PASS - Collectible objects do not expose Move Left, Move Right, or Jump.
24+
- PASS - Hero objects expose movement and interaction actions.
25+
- PASS - Projectile objects expose fire/launch actions.
26+
- PASS - Invalid Object/Action combinations show creator-facing row validation.
27+
- PASS - Invalid Object/Action combinations are blocked from UI save.
28+
- PASS - Existing invalid persisted mappings are visible as `Pending Setup`.
29+
- PASS - Valid Object/Action combinations save and persist after reload.
30+
- PASS - Object Summary information appears in the mappings footer:
31+
- Selected Object
32+
- Object Role/Template
33+
- Available Actions
34+
- PASS - Controller profiles and device detection behavior preserved.
35+
- PASS - Edit-gated capture preserved.
36+
- PASS - Accordion layout preserved.
37+
- PASS - Reset confirmation preserved and covered.
38+
- PASS - Theme V2 only; no inline CSS, inline JS, script blocks, style blocks, or inline event handlers added.
39+
- PASS - No sample JSON alignment, auth behavior, production game runtime behavior, or unrelated rewrites added.
40+
41+
## Implementation Notes
42+
43+
- Added object/template action rules in `toolbox/controls/controls.js`.
44+
- Preserved Objects as the source for selectable object records and carried object role/capability metadata into Controls.
45+
- Updated footer Action options whenever the selected Object changes.
46+
- Updated row Action options whenever the row Object changes.
47+
- Added row-level validation for saved mappings that reference invalid Object/Action combinations.
48+
- Added a save guard so invalid combinations cannot be newly saved from the Controls UI.
49+
- Added footer Object Summary display in `toolbox/controls/index.html`.
50+
- Added reset confirmation before clearing mappings.
51+
52+
## Validation Performed
53+
54+
- PASS - `node --check toolbox/controls/controls.js`
55+
- PASS - `node --check tests/playwright/tools/InputMappingV2Tool.spec.mjs`
56+
- PASS - HTML restriction scan on `toolbox/controls/index.html`
57+
- PASS - `git diff --check` passed with line-ending warnings only.
58+
- PASS - `npx playwright test tests/playwright/tools/InputMappingV2Tool.spec.mjs`: 6/6 passed.
59+
60+
## Playwright Behavior Coverage
61+
62+
- PASS - Object dropdown loads DB-backed Hero, Coin, and Bolt records.
63+
- PASS - Collectible action list filters to Confirm, Interact, and Select.
64+
- PASS - Hero action list includes movement, Jump, and Interact.
65+
- PASS - Projectile action list filters to Fire, Rotate Left, Rotate Right, and Thrust.
66+
- PASS - Valid Projectile + Fire mapping saves and persists after reload.
67+
- PASS - Invalid Coin + Move Left persisted mapping shows actionable row validation.
68+
- PASS - Repairing the invalid row to Coin + Interact saves and persists.
69+
- PASS - Device refresh still detects a mocked gamepad.
70+
- PASS - Reset confirmation cancel preserves mappings.
71+
- PASS - Reset confirmation accept clears mappings through the shared DB adapter.
72+
73+
## V8 Coverage
74+
75+
- PASS - `docs_build/dev/reports/playwright_v8_coverage_report.txt` generated.
76+
- PASS - `toolbox/controls/controls.js`: 93% function coverage in the final Controls run.
77+
- PASS - `toolbox/controls/controls-api-client.js`: 100% function coverage in the final Controls run.
78+
- WARN - The coverage helper also lists JS files changed in `HEAD` from the prior PR as advisory WARN entries; those files are not part of this PR's git status and were not modified here.
79+
80+
## Skipped Lanes
81+
82+
- Full samples validation: SKIPPED. Samples were not in scope and no sample JSON changed.
83+
- Full suite: SKIPPED. Targeted Controls/Input Mapping Playwright covered the changed behavior.
84+
- Production game runtime validation: SKIPPED. No production game runtime behavior changed.
85+
86+
## Manual Validation Steps
87+
88+
1. Open `toolbox/controls/index.html`.
89+
2. Confirm the mappings footer shows Action, Object, and Object Summary.
90+
3. Select a Collectible object and confirm movement actions are not available.
91+
4. Select a Hero object and confirm movement and Interact actions are available.
92+
5. Select a Projectile object and confirm fire/launch actions are available.
93+
6. Add a valid mapping, reload, and confirm it remains.
94+
7. Confirm an invalid persisted mapping shows a row warning and can be repaired by editing the row.
95+
96+
## Artifacts
97+
98+
- PASS - Review diff: `docs_build/dev/reports/codex_review.diff`
99+
- PASS - Changed files: `docs_build/dev/reports/codex_changed_files.txt`
100+
- PASS - V8 coverage: `docs_build/dev/reports/playwright_v8_coverage_report.txt`
101+
- PASS - Repo-structured delta ZIP: `tmp/PR_26161_026-controls-object-action-mapping-validation_delta.zip`

‎docs_build/dev/reports/coverage_changed_js_guardrail.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Changed runtime JS files considered:
1010
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
1111
(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
1212
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
13-
(91%) toolbox/controls/controls.js - executed lines 1225/1225; executed functions 117/128
13+
(93%) toolbox/controls/controls.js - executed lines 1379/1379; executed functions 138/149
1414
(100%) toolbox/controls/controls-api-client.js - executed lines 12/12; executed functions 2/2
1515

1616
Guardrail warnings:

‎docs_build/dev/reports/playwright_v8_coverage_report.txt‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ 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-
(89%) Toolbox Index - exercised 4 runtime JS files
15+
(90%) 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

@@ -21,15 +21,15 @@ Changed runtime JS files covered:
2121
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
2222
(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
2323
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
24-
(91%) toolbox/controls/controls.js - executed lines 1225/1225; executed functions 117/128
24+
(93%) toolbox/controls/controls.js - executed lines 1379/1379; executed functions 138/149
2525
(100%) toolbox/controls/controls-api-client.js - executed lines 12/12; executed functions 2/2
2626

2727
Files with executed line/function counts where available:
2828
(53%) src/engine/api/server-api-client.js - executed lines 159/159; executed functions 10/19
2929
(58%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 603/603; executed functions 30/52
3030
(64%) assets/theme-v2/js/tool-display-mode.js - executed lines 209/209; executed functions 9/14
3131
(75%) toolbox/tool-registry-api-client.js - executed lines 152/152; executed functions 21/28
32-
(91%) toolbox/controls/controls.js - executed lines 1225/1225; executed functions 117/128
32+
(93%) toolbox/controls/controls.js - executed lines 1379/1379; executed functions 138/149
3333
(100%) toolbox/controls/controls-api-client.js - executed lines 12/12; executed functions 2/2
3434
(100%) toolbox/objects/objects-api-client.js - executed lines 10/10; executed functions 2/2
3535

@@ -47,5 +47,5 @@ Changed JS files considered:
4747
(0%) tests/playwright/tools/AdminDbViewer.spec.mjs - changed JS file not collected as browser runtime coverage
4848
(0%) tests/playwright/tools/InputMappingV2Tool.spec.mjs - changed JS file not collected as browser runtime coverage
4949
(0%) tests/playwright/tools/ToolboxAdminMetadataSsot.spec.mjs - changed JS file not collected as browser runtime coverage
50-
(91%) toolbox/controls/controls.js - changed JS file with browser V8 coverage
50+
(93%) toolbox/controls/controls.js - changed JS file with browser V8 coverage
5151
(100%) toolbox/controls/controls-api-client.js - changed JS file with browser V8 coverage

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Validate Controls mappings against DB-backed Objects and Actions - PR… · ToolboxAid/HTML-JavaScript-Gaming@39f34d8 · GitHub
Skip to content

Commit 39f34d8

Browse files
committed
Validate Controls mappings against DB-backed Objects and Actions - PR_26161_026-controls-object-action-mapping-validation
1 parent bfbbc9c commit 39f34d8

8 files changed

Lines changed: 1206 additions & 3452 deletions

File tree

‎docs_build/dev/reports/codex_changed_files.txt‎

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,18 @@
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
126
M tests/playwright/tools/InputMappingV2Tool.spec.mjs
13-
M tests/playwright/tools/ToolboxAdminMetadataSsot.spec.mjs
7+
M toolbox/controls/controls.js
148
M toolbox/controls/index.html
15-
M toolbox/input-mapping-v2/index.html
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
9+
?? docs_build/dev/reports/controls-object-action-mapping-validation-report.md
2110

2211
# git ls-files --others --exclude-standard
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
12+
docs_build/dev/reports/controls-object-action-mapping-validation-report.md
2613

2714
# 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(-)
15+
.../dev/reports/coverage_changed_js_guardrail.txt | 2 +-
16+
.../dev/reports/playwright_v8_coverage_report.txt | 8 +-
17+
tests/playwright/tools/InputMappingV2Tool.spec.mjs | 220 +++++++++++++++++++++
18+
toolbox/controls/controls.js | 205 +++++++++++++++++--
19+
toolbox/controls/index.html | 5 +
20+
5 files changed, 416 insertions(+), 24 deletions(-)

‎docs_build/dev/reports/codex_review.diff‎

Lines changed: 680 additions & 3397 deletions
Large diffs are not rendered by default.
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# PR_26161_026-controls-object-action-mapping-validation
2+
3+
## Branch Validation
4+
5+
- Current branch: `main`
6+
- Expected branch: `main`
7+
- Result: PASS
8+
9+
## Scope
10+
11+
- Impacted lane: Controls/Input Mapping tool.
12+
- Playwright impacted: Yes.
13+
- Controls status: Wireframe preserved.
14+
- Runtime engine behavior: Not changed.
15+
- Samples: Skipped.
16+
17+
## Requirement Checklist
18+
19+
- PASS - Controls data remains DB-backed through the shared DB/mock adapter.
20+
- PASS - Object dropdown loads DB-backed Objects records through the Objects repository client.
21+
- PASS - Footer Action dropdown filters from the selected Object.
22+
- PASS - Inline row Action dropdown filters from the row Object.
23+
- PASS - Collectible objects do not expose Move Left, Move Right, or Jump.
24+
- PASS - Hero objects expose movement and interaction actions.
25+
- PASS - Projectile objects expose fire/launch actions.
26+
- PASS - Invalid Object/Action combinations show creator-facing row validation.
27+
- PASS - Invalid Object/Action combinations are blocked from UI save.
28+
- PASS - Existing invalid persisted mappings are visible as `Pending Setup`.
29+
- PASS - Valid Object/Action combinations save and persist after reload.
30+
- PASS - Object Summary information appears in the mappings footer:
31+
- Selected Object
32+
- Object Role/Template
33+
- Available Actions
34+
- PASS - Controller profiles and device detection behavior preserved.
35+
- PASS - Edit-gated capture preserved.
36+
- PASS - Accordion layout preserved.
37+
- PASS - Reset confirmation preserved and covered.
38+
- PASS - Theme V2 only; no inline CSS, inline JS, script blocks, style blocks, or inline event handlers added.
39+
- PASS - No sample JSON alignment, auth behavior, production game runtime behavior, or unrelated rewrites added.
40+
41+
## Implementation Notes
42+
43+
- Added object/template action rules in `toolbox/controls/controls.js`.
44+
- Preserved Objects as the source for selectable object records and carried object role/capability metadata into Controls.
45+
- Updated footer Action options whenever the selected Object changes.
46+
- Updated row Action options whenever the row Object changes.
47+
- Added row-level validation for saved mappings that reference invalid Object/Action combinations.
48+
- Added a save guard so invalid combinations cannot be newly saved from the Controls UI.
49+
- Added footer Object Summary display in `toolbox/controls/index.html`.
50+
- Added reset confirmation before clearing mappings.
51+
52+
## Validation Performed
53+
54+
- PASS - `node --check toolbox/controls/controls.js`
55+
- PASS - `node --check tests/playwright/tools/InputMappingV2Tool.spec.mjs`
56+
- PASS - HTML restriction scan on `toolbox/controls/index.html`
57+
- PASS - `git diff --check` passed with line-ending warnings only.
58+
- PASS - `npx playwright test tests/playwright/tools/InputMappingV2Tool.spec.mjs`: 6/6 passed.
59+
60+
## Playwright Behavior Coverage
61+
62+
- PASS - Object dropdown loads DB-backed Hero, Coin, and Bolt records.
63+
- PASS - Collectible action list filters to Confirm, Interact, and Select.
64+
- PASS - Hero action list includes movement, Jump, and Interact.
65+
- PASS - Projectile action list filters to Fire, Rotate Left, Rotate Right, and Thrust.
66+
- PASS - Valid Projectile + Fire mapping saves and persists after reload.
67+
- PASS - Invalid Coin + Move Left persisted mapping shows actionable row validation.
68+
- PASS - Repairing the invalid row to Coin + Interact saves and persists.
69+
- PASS - Device refresh still detects a mocked gamepad.
70+
- PASS - Reset confirmation cancel preserves mappings.
71+
- PASS - Reset confirmation accept clears mappings through the shared DB adapter.
72+
73+
## V8 Coverage
74+
75+
- PASS - `docs_build/dev/reports/playwright_v8_coverage_report.txt` generated.
76+
- PASS - `toolbox/controls/controls.js`: 93% function coverage in the final Controls run.
77+
- PASS - `toolbox/controls/controls-api-client.js`: 100% function coverage in the final Controls run.
78+
- WARN - The coverage helper also lists JS files changed in `HEAD` from the prior PR as advisory WARN entries; those files are not part of this PR's git status and were not modified here.
79+
80+
## Skipped Lanes
81+
82+
- Full samples validation: SKIPPED. Samples were not in scope and no sample JSON changed.
83+
- Full suite: SKIPPED. Targeted Controls/Input Mapping Playwright covered the changed behavior.
84+
- Production game runtime validation: SKIPPED. No production game runtime behavior changed.
85+
86+
## Manual Validation Steps
87+
88+
1. Open `toolbox/controls/index.html`.
89+
2. Confirm the mappings footer shows Action, Object, and Object Summary.
90+
3. Select a Collectible object and confirm movement actions are not available.
91+
4. Select a Hero object and confirm movement and Interact actions are available.
92+
5. Select a Projectile object and confirm fire/launch actions are available.
93+
6. Add a valid mapping, reload, and confirm it remains.
94+
7. Confirm an invalid persisted mapping shows a row warning and can be repaired by editing the row.
95+
96+
## Artifacts
97+
98+
- PASS - Review diff: `docs_build/dev/reports/codex_review.diff`
99+
- PASS - Changed files: `docs_build/dev/reports/codex_changed_files.txt`
100+
- PASS - V8 coverage: `docs_build/dev/reports/playwright_v8_coverage_report.txt`
101+
- PASS - Repo-structured delta ZIP: `tmp/PR_26161_026-controls-object-action-mapping-validation_delta.zip`

‎docs_build/dev/reports/coverage_changed_js_guardrail.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Changed runtime JS files considered:
1010
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
1111
(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
1212
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
13-
(91%) toolbox/controls/controls.js - executed lines 1225/1225; executed functions 117/128
13+
(93%) toolbox/controls/controls.js - executed lines 1379/1379; executed functions 138/149
1414
(100%) toolbox/controls/controls-api-client.js - executed lines 12/12; executed functions 2/2
1515

1616
Guardrail warnings:

‎docs_build/dev/reports/playwright_v8_coverage_report.txt‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ 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-
(89%) Toolbox Index - exercised 4 runtime JS files
15+
(90%) 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

@@ -21,15 +21,15 @@ Changed runtime JS files covered:
2121
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
2222
(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
2323
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
24-
(91%) toolbox/controls/controls.js - executed lines 1225/1225; executed functions 117/128
24+
(93%) toolbox/controls/controls.js - executed lines 1379/1379; executed functions 138/149
2525
(100%) toolbox/controls/controls-api-client.js - executed lines 12/12; executed functions 2/2
2626

2727
Files with executed line/function counts where available:
2828
(53%) src/engine/api/server-api-client.js - executed lines 159/159; executed functions 10/19
2929
(58%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 603/603; executed functions 30/52
3030
(64%) assets/theme-v2/js/tool-display-mode.js - executed lines 209/209; executed functions 9/14
3131
(75%) toolbox/tool-registry-api-client.js - executed lines 152/152; executed functions 21/28
32-
(91%) toolbox/controls/controls.js - executed lines 1225/1225; executed functions 117/128
32+
(93%) toolbox/controls/controls.js - executed lines 1379/1379; executed functions 138/149
3333
(100%) toolbox/controls/controls-api-client.js - executed lines 12/12; executed functions 2/2
3434
(100%) toolbox/objects/objects-api-client.js - executed lines 10/10; executed functions 2/2
3535

@@ -47,5 +47,5 @@ Changed JS files considered:
4747
(0%) tests/playwright/tools/AdminDbViewer.spec.mjs - changed JS file not collected as browser runtime coverage
4848
(0%) tests/playwright/tools/InputMappingV2Tool.spec.mjs - changed JS file not collected as browser runtime coverage
4949
(0%) tests/playwright/tools/ToolboxAdminMetadataSsot.spec.mjs - changed JS file not collected as browser runtime coverage
50-
(91%) toolbox/controls/controls.js - changed JS file with browser V8 coverage
50+
(93%) toolbox/controls/controls.js - changed JS file with browser V8 coverage
5151
(100%) toolbox/controls/controls-api-client.js - changed JS file with browser V8 coverage

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Validate Controls mappings against DB-backed Objects and Actions - PR… · ToolboxAid/HTML-JavaScript-Gaming@39f34d8 · GitHub
Skip to content

Commit 39f34d8

Browse files
committed
Validate Controls mappings against DB-backed Objects and Actions - PR_26161_026-controls-object-action-mapping-validation
1 parent bfbbc9c commit 39f34d8

8 files changed

Lines changed: 1206 additions & 3452 deletions

File tree

‎docs_build/dev/reports/codex_changed_files.txt‎

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,18 @@
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
126
M tests/playwright/tools/InputMappingV2Tool.spec.mjs
13-
M tests/playwright/tools/ToolboxAdminMetadataSsot.spec.mjs
7+
M toolbox/controls/controls.js
148
M toolbox/controls/index.html
15-
M toolbox/input-mapping-v2/index.html
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
9+
?? docs_build/dev/reports/controls-object-action-mapping-validation-report.md
2110

2211
# git ls-files --others --exclude-standard
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
12+
docs_build/dev/reports/controls-object-action-mapping-validation-report.md
2613

2714
# 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(-)
15+
.../dev/reports/coverage_changed_js_guardrail.txt | 2 +-
16+
.../dev/reports/playwright_v8_coverage_report.txt | 8 +-
17+
tests/playwright/tools/InputMappingV2Tool.spec.mjs | 220 +++++++++++++++++++++
18+
toolbox/controls/controls.js | 205 +++++++++++++++++--
19+
toolbox/controls/index.html | 5 +
20+
5 files changed, 416 insertions(+), 24 deletions(-)

‎docs_build/dev/reports/codex_review.diff‎

Lines changed: 680 additions & 3397 deletions
Large diffs are not rendered by default.
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# PR_26161_026-controls-object-action-mapping-validation
2+
3+
## Branch Validation
4+
5+
- Current branch: `main`
6+
- Expected branch: `main`
7+
- Result: PASS
8+
9+
## Scope
10+
11+
- Impacted lane: Controls/Input Mapping tool.
12+
- Playwright impacted: Yes.
13+
- Controls status: Wireframe preserved.
14+
- Runtime engine behavior: Not changed.
15+
- Samples: Skipped.
16+
17+
## Requirement Checklist
18+
19+
- PASS - Controls data remains DB-backed through the shared DB/mock adapter.
20+
- PASS - Object dropdown loads DB-backed Objects records through the Objects repository client.
21+
- PASS - Footer Action dropdown filters from the selected Object.
22+
- PASS - Inline row Action dropdown filters from the row Object.
23+
- PASS - Collectible objects do not expose Move Left, Move Right, or Jump.
24+
- PASS - Hero objects expose movement and interaction actions.
25+
- PASS - Projectile objects expose fire/launch actions.
26+
- PASS - Invalid Object/Action combinations show creator-facing row validation.
27+
- PASS - Invalid Object/Action combinations are blocked from UI save.
28+
- PASS - Existing invalid persisted mappings are visible as `Pending Setup`.
29+
- PASS - Valid Object/Action combinations save and persist after reload.
30+
- PASS - Object Summary information appears in the mappings footer:
31+
- Selected Object
32+
- Object Role/Template
33+
- Available Actions
34+
- PASS - Controller profiles and device detection behavior preserved.
35+
- PASS - Edit-gated capture preserved.
36+
- PASS - Accordion layout preserved.
37+
- PASS - Reset confirmation preserved and covered.
38+
- PASS - Theme V2 only; no inline CSS, inline JS, script blocks, style blocks, or inline event handlers added.
39+
- PASS - No sample JSON alignment, auth behavior, production game runtime behavior, or unrelated rewrites added.
40+
41+
## Implementation Notes
42+
43+
- Added object/template action rules in `toolbox/controls/controls.js`.
44+
- Preserved Objects as the source for selectable object records and carried object role/capability metadata into Controls.
45+
- Updated footer Action options whenever the selected Object changes.
46+
- Updated row Action options whenever the row Object changes.
47+
- Added row-level validation for saved mappings that reference invalid Object/Action combinations.
48+
- Added a save guard so invalid combinations cannot be newly saved from the Controls UI.
49+
- Added footer Object Summary display in `toolbox/controls/index.html`.
50+
- Added reset confirmation before clearing mappings.
51+
52+
## Validation Performed
53+
54+
- PASS - `node --check toolbox/controls/controls.js`
55+
- PASS - `node --check tests/playwright/tools/InputMappingV2Tool.spec.mjs`
56+
- PASS - HTML restriction scan on `toolbox/controls/index.html`
57+
- PASS - `git diff --check` passed with line-ending warnings only.
58+
- PASS - `npx playwright test tests/playwright/tools/InputMappingV2Tool.spec.mjs`: 6/6 passed.
59+
60+
## Playwright Behavior Coverage
61+
62+
- PASS - Object dropdown loads DB-backed Hero, Coin, and Bolt records.
63+
- PASS - Collectible action list filters to Confirm, Interact, and Select.
64+
- PASS - Hero action list includes movement, Jump, and Interact.
65+
- PASS - Projectile action list filters to Fire, Rotate Left, Rotate Right, and Thrust.
66+
- PASS - Valid Projectile + Fire mapping saves and persists after reload.
67+
- PASS - Invalid Coin + Move Left persisted mapping shows actionable row validation.
68+
- PASS - Repairing the invalid row to Coin + Interact saves and persists.
69+
- PASS - Device refresh still detects a mocked gamepad.
70+
- PASS - Reset confirmation cancel preserves mappings.
71+
- PASS - Reset confirmation accept clears mappings through the shared DB adapter.
72+
73+
## V8 Coverage
74+
75+
- PASS - `docs_build/dev/reports/playwright_v8_coverage_report.txt` generated.
76+
- PASS - `toolbox/controls/controls.js`: 93% function coverage in the final Controls run.
77+
- PASS - `toolbox/controls/controls-api-client.js`: 100% function coverage in the final Controls run.
78+
- WARN - The coverage helper also lists JS files changed in `HEAD` from the prior PR as advisory WARN entries; those files are not part of this PR's git status and were not modified here.
79+
80+
## Skipped Lanes
81+
82+
- Full samples validation: SKIPPED. Samples were not in scope and no sample JSON changed.
83+
- Full suite: SKIPPED. Targeted Controls/Input Mapping Playwright covered the changed behavior.
84+
- Production game runtime validation: SKIPPED. No production game runtime behavior changed.
85+
86+
## Manual Validation Steps
87+
88+
1. Open `toolbox/controls/index.html`.
89+
2. Confirm the mappings footer shows Action, Object, and Object Summary.
90+
3. Select a Collectible object and confirm movement actions are not available.
91+
4. Select a Hero object and confirm movement and Interact actions are available.
92+
5. Select a Projectile object and confirm fire/launch actions are available.
93+
6. Add a valid mapping, reload, and confirm it remains.
94+
7. Confirm an invalid persisted mapping shows a row warning and can be repaired by editing the row.
95+
96+
## Artifacts
97+
98+
- PASS - Review diff: `docs_build/dev/reports/codex_review.diff`
99+
- PASS - Changed files: `docs_build/dev/reports/codex_changed_files.txt`
100+
- PASS - V8 coverage: `docs_build/dev/reports/playwright_v8_coverage_report.txt`
101+
- PASS - Repo-structured delta ZIP: `tmp/PR_26161_026-controls-object-action-mapping-validation_delta.zip`

‎docs_build/dev/reports/coverage_changed_js_guardrail.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Changed runtime JS files considered:
1010
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
1111
(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
1212
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
13-
(91%) toolbox/controls/controls.js - executed lines 1225/1225; executed functions 117/128
13+
(93%) toolbox/controls/controls.js - executed lines 1379/1379; executed functions 138/149
1414
(100%) toolbox/controls/controls-api-client.js - executed lines 12/12; executed functions 2/2
1515

1616
Guardrail warnings:

‎docs_build/dev/reports/playwright_v8_coverage_report.txt‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ 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-
(89%) Toolbox Index - exercised 4 runtime JS files
15+
(90%) 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

@@ -21,15 +21,15 @@ Changed runtime JS files covered:
2121
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
2222
(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
2323
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
24-
(91%) toolbox/controls/controls.js - executed lines 1225/1225; executed functions 117/128
24+
(93%) toolbox/controls/controls.js - executed lines 1379/1379; executed functions 138/149
2525
(100%) toolbox/controls/controls-api-client.js - executed lines 12/12; executed functions 2/2
2626

2727
Files with executed line/function counts where available:
2828
(53%) src/engine/api/server-api-client.js - executed lines 159/159; executed functions 10/19
2929
(58%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 603/603; executed functions 30/52
3030
(64%) assets/theme-v2/js/tool-display-mode.js - executed lines 209/209; executed functions 9/14
3131
(75%) toolbox/tool-registry-api-client.js - executed lines 152/152; executed functions 21/28
32-
(91%) toolbox/controls/controls.js - executed lines 1225/1225; executed functions 117/128
32+
(93%) toolbox/controls/controls.js - executed lines 1379/1379; executed functions 138/149
3333
(100%) toolbox/controls/controls-api-client.js - executed lines 12/12; executed functions 2/2
3434
(100%) toolbox/objects/objects-api-client.js - executed lines 10/10; executed functions 2/2
3535

@@ -47,5 +47,5 @@ Changed JS files considered:
4747
(0%) tests/playwright/tools/AdminDbViewer.spec.mjs - changed JS file not collected as browser runtime coverage
4848
(0%) tests/playwright/tools/InputMappingV2Tool.spec.mjs - changed JS file not collected as browser runtime coverage
4949
(0%) tests/playwright/tools/ToolboxAdminMetadataSsot.spec.mjs - changed JS file not collected as browser runtime coverage
50-
(91%) toolbox/controls/controls.js - changed JS file with browser V8 coverage
50+
(93%) toolbox/controls/controls.js - changed JS file with browser V8 coverage
5151
(100%) toolbox/controls/controls-api-client.js - changed JS file with browser V8 coverage

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Validate Controls mappings against DB-backed Objects and Actions - PR… · ToolboxAid/HTML-JavaScript-Gaming@39f34d8 · GitHub
Skip to content

Commit 39f34d8

Browse files
committed
Validate Controls mappings against DB-backed Objects and Actions - PR_26161_026-controls-object-action-mapping-validation
1 parent bfbbc9c commit 39f34d8

8 files changed

Lines changed: 1206 additions & 3452 deletions

File tree

‎docs_build/dev/reports/codex_changed_files.txt‎

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,18 @@
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
126
M tests/playwright/tools/InputMappingV2Tool.spec.mjs
13-
M tests/playwright/tools/ToolboxAdminMetadataSsot.spec.mjs
7+
M toolbox/controls/controls.js
148
M toolbox/controls/index.html
15-
M toolbox/input-mapping-v2/index.html
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
9+
?? docs_build/dev/reports/controls-object-action-mapping-validation-report.md
2110

2211
# git ls-files --others --exclude-standard
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
12+
docs_build/dev/reports/controls-object-action-mapping-validation-report.md
2613

2714
# 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(-)
15+
.../dev/reports/coverage_changed_js_guardrail.txt | 2 +-
16+
.../dev/reports/playwright_v8_coverage_report.txt | 8 +-
17+
tests/playwright/tools/InputMappingV2Tool.spec.mjs | 220 +++++++++++++++++++++
18+
toolbox/controls/controls.js | 205 +++++++++++++++++--
19+
toolbox/controls/index.html | 5 +
20+
5 files changed, 416 insertions(+), 24 deletions(-)

‎docs_build/dev/reports/codex_review.diff‎

Lines changed: 680 additions & 3397 deletions
Large diffs are not rendered by default.
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# PR_26161_026-controls-object-action-mapping-validation
2+
3+
## Branch Validation
4+
5+
- Current branch: `main`
6+
- Expected branch: `main`
7+
- Result: PASS
8+
9+
## Scope
10+
11+
- Impacted lane: Controls/Input Mapping tool.
12+
- Playwright impacted: Yes.
13+
- Controls status: Wireframe preserved.
14+
- Runtime engine behavior: Not changed.
15+
- Samples: Skipped.
16+
17+
## Requirement Checklist
18+
19+
- PASS - Controls data remains DB-backed through the shared DB/mock adapter.
20+
- PASS - Object dropdown loads DB-backed Objects records through the Objects repository client.
21+
- PASS - Footer Action dropdown filters from the selected Object.
22+
- PASS - Inline row Action dropdown filters from the row Object.
23+
- PASS - Collectible objects do not expose Move Left, Move Right, or Jump.
24+
- PASS - Hero objects expose movement and interaction actions.
25+
- PASS - Projectile objects expose fire/launch actions.
26+
- PASS - Invalid Object/Action combinations show creator-facing row validation.
27+
- PASS - Invalid Object/Action combinations are blocked from UI save.
28+
- PASS - Existing invalid persisted mappings are visible as `Pending Setup`.
29+
- PASS - Valid Object/Action combinations save and persist after reload.
30+
- PASS - Object Summary information appears in the mappings footer:
31+
- Selected Object
32+
- Object Role/Template
33+
- Available Actions
34+
- PASS - Controller profiles and device detection behavior preserved.
35+
- PASS - Edit-gated capture preserved.
36+
- PASS - Accordion layout preserved.
37+
- PASS - Reset confirmation preserved and covered.
38+
- PASS - Theme V2 only; no inline CSS, inline JS, script blocks, style blocks, or inline event handlers added.
39+
- PASS - No sample JSON alignment, auth behavior, production game runtime behavior, or unrelated rewrites added.
40+
41+
## Implementation Notes
42+
43+
- Added object/template action rules in `toolbox/controls/controls.js`.
44+
- Preserved Objects as the source for selectable object records and carried object role/capability metadata into Controls.
45+
- Updated footer Action options whenever the selected Object changes.
46+
- Updated row Action options whenever the row Object changes.
47+
- Added row-level validation for saved mappings that reference invalid Object/Action combinations.
48+
- Added a save guard so invalid combinations cannot be newly saved from the Controls UI.
49+
- Added footer Object Summary display in `toolbox/controls/index.html`.
50+
- Added reset confirmation before clearing mappings.
51+
52+
## Validation Performed
53+
54+
- PASS - `node --check toolbox/controls/controls.js`
55+
- PASS - `node --check tests/playwright/tools/InputMappingV2Tool.spec.mjs`
56+
- PASS - HTML restriction scan on `toolbox/controls/index.html`
57+
- PASS - `git diff --check` passed with line-ending warnings only.
58+
- PASS - `npx playwright test tests/playwright/tools/InputMappingV2Tool.spec.mjs`: 6/6 passed.
59+
60+
## Playwright Behavior Coverage
61+
62+
- PASS - Object dropdown loads DB-backed Hero, Coin, and Bolt records.
63+
- PASS - Collectible action list filters to Confirm, Interact, and Select.
64+
- PASS - Hero action list includes movement, Jump, and Interact.
65+
- PASS - Projectile action list filters to Fire, Rotate Left, Rotate Right, and Thrust.
66+
- PASS - Valid Projectile + Fire mapping saves and persists after reload.
67+
- PASS - Invalid Coin + Move Left persisted mapping shows actionable row validation.
68+
- PASS - Repairing the invalid row to Coin + Interact saves and persists.
69+
- PASS - Device refresh still detects a mocked gamepad.
70+
- PASS - Reset confirmation cancel preserves mappings.
71+
- PASS - Reset confirmation accept clears mappings through the shared DB adapter.
72+
73+
## V8 Coverage
74+
75+
- PASS - `docs_build/dev/reports/playwright_v8_coverage_report.txt` generated.
76+
- PASS - `toolbox/controls/controls.js`: 93% function coverage in the final Controls run.
77+
- PASS - `toolbox/controls/controls-api-client.js`: 100% function coverage in the final Controls run.
78+
- WARN - The coverage helper also lists JS files changed in `HEAD` from the prior PR as advisory WARN entries; those files are not part of this PR's git status and were not modified here.
79+
80+
## Skipped Lanes
81+
82+
- Full samples validation: SKIPPED. Samples were not in scope and no sample JSON changed.
83+
- Full suite: SKIPPED. Targeted Controls/Input Mapping Playwright covered the changed behavior.
84+
- Production game runtime validation: SKIPPED. No production game runtime behavior changed.
85+
86+
## Manual Validation Steps
87+
88+
1. Open `toolbox/controls/index.html`.
89+
2. Confirm the mappings footer shows Action, Object, and Object Summary.
90+
3. Select a Collectible object and confirm movement actions are not available.
91+
4. Select a Hero object and confirm movement and Interact actions are available.
92+
5. Select a Projectile object and confirm fire/launch actions are available.
93+
6. Add a valid mapping, reload, and confirm it remains.
94+
7. Confirm an invalid persisted mapping shows a row warning and can be repaired by editing the row.
95+
96+
## Artifacts
97+
98+
- PASS - Review diff: `docs_build/dev/reports/codex_review.diff`
99+
- PASS - Changed files: `docs_build/dev/reports/codex_changed_files.txt`
100+
- PASS - V8 coverage: `docs_build/dev/reports/playwright_v8_coverage_report.txt`
101+
- PASS - Repo-structured delta ZIP: `tmp/PR_26161_026-controls-object-action-mapping-validation_delta.zip`

‎docs_build/dev/reports/coverage_changed_js_guardrail.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Changed runtime JS files considered:
1010
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
1111
(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
1212
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
13-
(91%) toolbox/controls/controls.js - executed lines 1225/1225; executed functions 117/128
13+
(93%) toolbox/controls/controls.js - executed lines 1379/1379; executed functions 138/149
1414
(100%) toolbox/controls/controls-api-client.js - executed lines 12/12; executed functions 2/2
1515

1616
Guardrail warnings:

‎docs_build/dev/reports/playwright_v8_coverage_report.txt‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ 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-
(89%) Toolbox Index - exercised 4 runtime JS files
15+
(90%) 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

@@ -21,15 +21,15 @@ Changed runtime JS files covered:
2121
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
2222
(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
2323
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
24-
(91%) toolbox/controls/controls.js - executed lines 1225/1225; executed functions 117/128
24+
(93%) toolbox/controls/controls.js - executed lines 1379/1379; executed functions 138/149
2525
(100%) toolbox/controls/controls-api-client.js - executed lines 12/12; executed functions 2/2
2626

2727
Files with executed line/function counts where available:
2828
(53%) src/engine/api/server-api-client.js - executed lines 159/159; executed functions 10/19
2929
(58%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 603/603; executed functions 30/52
3030
(64%) assets/theme-v2/js/tool-display-mode.js - executed lines 209/209; executed functions 9/14
3131
(75%) toolbox/tool-registry-api-client.js - executed lines 152/152; executed functions 21/28
32-
(91%) toolbox/controls/controls.js - executed lines 1225/1225; executed functions 117/128
32+
(93%) toolbox/controls/controls.js - executed lines 1379/1379; executed functions 138/149
3333
(100%) toolbox/controls/controls-api-client.js - executed lines 12/12; executed functions 2/2
3434
(100%) toolbox/objects/objects-api-client.js - executed lines 10/10; executed functions 2/2
3535

@@ -47,5 +47,5 @@ Changed JS files considered:
4747
(0%) tests/playwright/tools/AdminDbViewer.spec.mjs - changed JS file not collected as browser runtime coverage
4848
(0%) tests/playwright/tools/InputMappingV2Tool.spec.mjs - changed JS file not collected as browser runtime coverage
4949
(0%) tests/playwright/tools/ToolboxAdminMetadataSsot.spec.mjs - changed JS file not collected as browser runtime coverage
50-
(91%) toolbox/controls/controls.js - changed JS file with browser V8 coverage
50+
(93%) toolbox/controls/controls.js - changed JS file with browser V8 coverage
5151
(100%) toolbox/controls/controls-api-client.js - changed JS file with browser V8 coverage

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' Validate Controls mappings against DB-backed Objects and Actions - PR… · ToolboxAid/HTML-JavaScript-Gaming@39f34d8 · GitHub
Skip to content

Commit 39f34d8

Browse files
committed
Validate Controls mappings against DB-backed Objects and Actions - PR_26161_026-controls-object-action-mapping-validation
1 parent bfbbc9c commit 39f34d8

8 files changed

Lines changed: 1206 additions & 3452 deletions

File tree

‎docs_build/dev/reports/codex_changed_files.txt‎

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,18 @@
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
126
M tests/playwright/tools/InputMappingV2Tool.spec.mjs
13-
M tests/playwright/tools/ToolboxAdminMetadataSsot.spec.mjs
7+
M toolbox/controls/controls.js
148
M toolbox/controls/index.html
15-
M toolbox/input-mapping-v2/index.html
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
9+
?? docs_build/dev/reports/controls-object-action-mapping-validation-report.md
2110

2211
# git ls-files --others --exclude-standard
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
12+
docs_build/dev/reports/controls-object-action-mapping-validation-report.md
2613

2714
# 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(-)
15+
.../dev/reports/coverage_changed_js_guardrail.txt | 2 +-
16+
.../dev/reports/playwright_v8_coverage_report.txt | 8 +-
17+
tests/playwright/tools/InputMappingV2Tool.spec.mjs | 220 +++++++++++++++++++++
18+
toolbox/controls/controls.js | 205 +++++++++++++++++--
19+
toolbox/controls/index.html | 5 +
20+
5 files changed, 416 insertions(+), 24 deletions(-)

‎docs_build/dev/reports/codex_review.diff‎

Lines changed: 680 additions & 3397 deletions
Large diffs are not rendered by default.
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# PR_26161_026-controls-object-action-mapping-validation
2+
3+
## Branch Validation
4+
5+
- Current branch: `main`
6+
- Expected branch: `main`
7+
- Result: PASS
8+
9+
## Scope
10+
11+
- Impacted lane: Controls/Input Mapping tool.
12+
- Playwright impacted: Yes.
13+
- Controls status: Wireframe preserved.
14+
- Runtime engine behavior: Not changed.
15+
- Samples: Skipped.
16+
17+
## Requirement Checklist
18+
19+
- PASS - Controls data remains DB-backed through the shared DB/mock adapter.
20+
- PASS - Object dropdown loads DB-backed Objects records through the Objects repository client.
21+
- PASS - Footer Action dropdown filters from the selected Object.
22+
- PASS - Inline row Action dropdown filters from the row Object.
23+
- PASS - Collectible objects do not expose Move Left, Move Right, or Jump.
24+
- PASS - Hero objects expose movement and interaction actions.
25+
- PASS - Projectile objects expose fire/launch actions.
26+
- PASS - Invalid Object/Action combinations show creator-facing row validation.
27+
- PASS - Invalid Object/Action combinations are blocked from UI save.
28+
- PASS - Existing invalid persisted mappings are visible as `Pending Setup`.
29+
- PASS - Valid Object/Action combinations save and persist after reload.
30+
- PASS - Object Summary information appears in the mappings footer:
31+
- Selected Object
32+
- Object Role/Template
33+
- Available Actions
34+
- PASS - Controller profiles and device detection behavior preserved.
35+
- PASS - Edit-gated capture preserved.
36+
- PASS - Accordion layout preserved.
37+
- PASS - Reset confirmation preserved and covered.
38+
- PASS - Theme V2 only; no inline CSS, inline JS, script blocks, style blocks, or inline event handlers added.
39+
- PASS - No sample JSON alignment, auth behavior, production game runtime behavior, or unrelated rewrites added.
40+
41+
## Implementation Notes
42+
43+
- Added object/template action rules in `toolbox/controls/controls.js`.
44+
- Preserved Objects as the source for selectable object records and carried object role/capability metadata into Controls.
45+
- Updated footer Action options whenever the selected Object changes.
46+
- Updated row Action options whenever the row Object changes.
47+
- Added row-level validation for saved mappings that reference invalid Object/Action combinations.
48+
- Added a save guard so invalid combinations cannot be newly saved from the Controls UI.
49+
- Added footer Object Summary display in `toolbox/controls/index.html`.
50+
- Added reset confirmation before clearing mappings.
51+
52+
## Validation Performed
53+
54+
- PASS - `node --check toolbox/controls/controls.js`
55+
- PASS - `node --check tests/playwright/tools/InputMappingV2Tool.spec.mjs`
56+
- PASS - HTML restriction scan on `toolbox/controls/index.html`
57+
- PASS - `git diff --check` passed with line-ending warnings only.
58+
- PASS - `npx playwright test tests/playwright/tools/InputMappingV2Tool.spec.mjs`: 6/6 passed.
59+
60+
## Playwright Behavior Coverage
61+
62+
- PASS - Object dropdown loads DB-backed Hero, Coin, and Bolt records.
63+
- PASS - Collectible action list filters to Confirm, Interact, and Select.
64+
- PASS - Hero action list includes movement, Jump, and Interact.
65+
- PASS - Projectile action list filters to Fire, Rotate Left, Rotate Right, and Thrust.
66+
- PASS - Valid Projectile + Fire mapping saves and persists after reload.
67+
- PASS - Invalid Coin + Move Left persisted mapping shows actionable row validation.
68+
- PASS - Repairing the invalid row to Coin + Interact saves and persists.
69+
- PASS - Device refresh still detects a mocked gamepad.
70+
- PASS - Reset confirmation cancel preserves mappings.
71+
- PASS - Reset confirmation accept clears mappings through the shared DB adapter.
72+
73+
## V8 Coverage
74+
75+
- PASS - `docs_build/dev/reports/playwright_v8_coverage_report.txt` generated.
76+
- PASS - `toolbox/controls/controls.js`: 93% function coverage in the final Controls run.
77+
- PASS - `toolbox/controls/controls-api-client.js`: 100% function coverage in the final Controls run.
78+
- WARN - The coverage helper also lists JS files changed in `HEAD` from the prior PR as advisory WARN entries; those files are not part of this PR's git status and were not modified here.
79+
80+
## Skipped Lanes
81+
82+
- Full samples validation: SKIPPED. Samples were not in scope and no sample JSON changed.
83+
- Full suite: SKIPPED. Targeted Controls/Input Mapping Playwright covered the changed behavior.
84+
- Production game runtime validation: SKIPPED. No production game runtime behavior changed.
85+
86+
## Manual Validation Steps
87+
88+
1. Open `toolbox/controls/index.html`.
89+
2. Confirm the mappings footer shows Action, Object, and Object Summary.
90+
3. Select a Collectible object and confirm movement actions are not available.
91+
4. Select a Hero object and confirm movement and Interact actions are available.
92+
5. Select a Projectile object and confirm fire/launch actions are available.
93+
6. Add a valid mapping, reload, and confirm it remains.
94+
7. Confirm an invalid persisted mapping shows a row warning and can be repaired by editing the row.
95+
96+
## Artifacts
97+
98+
- PASS - Review diff: `docs_build/dev/reports/codex_review.diff`
99+
- PASS - Changed files: `docs_build/dev/reports/codex_changed_files.txt`
100+
- PASS - V8 coverage: `docs_build/dev/reports/playwright_v8_coverage_report.txt`
101+
- PASS - Repo-structured delta ZIP: `tmp/PR_26161_026-controls-object-action-mapping-validation_delta.zip`

‎docs_build/dev/reports/coverage_changed_js_guardrail.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Changed runtime JS files considered:
1010
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
1111
(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
1212
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
13-
(91%) toolbox/controls/controls.js - executed lines 1225/1225; executed functions 117/128
13+
(93%) toolbox/controls/controls.js - executed lines 1379/1379; executed functions 138/149
1414
(100%) toolbox/controls/controls-api-client.js - executed lines 12/12; executed functions 2/2
1515

1616
Guardrail warnings:

‎docs_build/dev/reports/playwright_v8_coverage_report.txt‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ 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-
(89%) Toolbox Index - exercised 4 runtime JS files
15+
(90%) 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

@@ -21,15 +21,15 @@ Changed runtime JS files covered:
2121
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
2222
(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
2323
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
24-
(91%) toolbox/controls/controls.js - executed lines 1225/1225; executed functions 117/128
24+
(93%) toolbox/controls/controls.js - executed lines 1379/1379; executed functions 138/149
2525
(100%) toolbox/controls/controls-api-client.js - executed lines 12/12; executed functions 2/2
2626

2727
Files with executed line/function counts where available:
2828
(53%) src/engine/api/server-api-client.js - executed lines 159/159; executed functions 10/19
2929
(58%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 603/603; executed functions 30/52
3030
(64%) assets/theme-v2/js/tool-display-mode.js - executed lines 209/209; executed functions 9/14
3131
(75%) toolbox/tool-registry-api-client.js - executed lines 152/152; executed functions 21/28
32-
(91%) toolbox/controls/controls.js - executed lines 1225/1225; executed functions 117/128
32+
(93%) toolbox/controls/controls.js - executed lines 1379/1379; executed functions 138/149
3333
(100%) toolbox/controls/controls-api-client.js - executed lines 12/12; executed functions 2/2
3434
(100%) toolbox/objects/objects-api-client.js - executed lines 10/10; executed functions 2/2
3535

@@ -47,5 +47,5 @@ Changed JS files considered:
4747
(0%) tests/playwright/tools/AdminDbViewer.spec.mjs - changed JS file not collected as browser runtime coverage
4848
(0%) tests/playwright/tools/InputMappingV2Tool.spec.mjs - changed JS file not collected as browser runtime coverage
4949
(0%) tests/playwright/tools/ToolboxAdminMetadataSsot.spec.mjs - changed JS file not collected as browser runtime coverage
50-
(91%) toolbox/controls/controls.js - changed JS file with browser V8 coverage
50+
(93%) toolbox/controls/controls.js - changed JS file with browser V8 coverage
5151
(100%) toolbox/controls/controls-api-client.js - changed JS file with browser V8 coverage

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Validate Controls mappings against DB-backed Objects and Actions - PR… · ToolboxAid/HTML-JavaScript-Gaming@39f34d8 · GitHub
Skip to content

Commit 39f34d8

Browse files
committed
Validate Controls mappings against DB-backed Objects and Actions - PR_26161_026-controls-object-action-mapping-validation
1 parent bfbbc9c commit 39f34d8

8 files changed

Lines changed: 1206 additions & 3452 deletions

File tree

‎docs_build/dev/reports/codex_changed_files.txt‎

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,18 @@
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
126
M tests/playwright/tools/InputMappingV2Tool.spec.mjs
13-
M tests/playwright/tools/ToolboxAdminMetadataSsot.spec.mjs
7+
M toolbox/controls/controls.js
148
M toolbox/controls/index.html
15-
M toolbox/input-mapping-v2/index.html
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
9+
?? docs_build/dev/reports/controls-object-action-mapping-validation-report.md
2110

2211
# git ls-files --others --exclude-standard
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
12+
docs_build/dev/reports/controls-object-action-mapping-validation-report.md
2613

2714
# 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(-)
15+
.../dev/reports/coverage_changed_js_guardrail.txt | 2 +-
16+
.../dev/reports/playwright_v8_coverage_report.txt | 8 +-
17+
tests/playwright/tools/InputMappingV2Tool.spec.mjs | 220 +++++++++++++++++++++
18+
toolbox/controls/controls.js | 205 +++++++++++++++++--
19+
toolbox/controls/index.html | 5 +
20+
5 files changed, 416 insertions(+), 24 deletions(-)

‎docs_build/dev/reports/codex_review.diff‎

Lines changed: 680 additions & 3397 deletions
Large diffs are not rendered by default.
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# PR_26161_026-controls-object-action-mapping-validation
2+
3+
## Branch Validation
4+
5+
- Current branch: `main`
6+
- Expected branch: `main`
7+
- Result: PASS
8+
9+
## Scope
10+
11+
- Impacted lane: Controls/Input Mapping tool.
12+
- Playwright impacted: Yes.
13+
- Controls status: Wireframe preserved.
14+
- Runtime engine behavior: Not changed.
15+
- Samples: Skipped.
16+
17+
## Requirement Checklist
18+
19+
- PASS - Controls data remains DB-backed through the shared DB/mock adapter.
20+
- PASS - Object dropdown loads DB-backed Objects records through the Objects repository client.
21+
- PASS - Footer Action dropdown filters from the selected Object.
22+
- PASS - Inline row Action dropdown filters from the row Object.
23+
- PASS - Collectible objects do not expose Move Left, Move Right, or Jump.
24+
- PASS - Hero objects expose movement and interaction actions.
25+
- PASS - Projectile objects expose fire/launch actions.
26+
- PASS - Invalid Object/Action combinations show creator-facing row validation.
27+
- PASS - Invalid Object/Action combinations are blocked from UI save.
28+
- PASS - Existing invalid persisted mappings are visible as `Pending Setup`.
29+
- PASS - Valid Object/Action combinations save and persist after reload.
30+
- PASS - Object Summary information appears in the mappings footer:
31+
- Selected Object
32+
- Object Role/Template
33+
- Available Actions
34+
- PASS - Controller profiles and device detection behavior preserved.
35+
- PASS - Edit-gated capture preserved.
36+
- PASS - Accordion layout preserved.
37+
- PASS - Reset confirmation preserved and covered.
38+
- PASS - Theme V2 only; no inline CSS, inline JS, script blocks, style blocks, or inline event handlers added.
39+
- PASS - No sample JSON alignment, auth behavior, production game runtime behavior, or unrelated rewrites added.
40+
41+
## Implementation Notes
42+
43+
- Added object/template action rules in `toolbox/controls/controls.js`.
44+
- Preserved Objects as the source for selectable object records and carried object role/capability metadata into Controls.
45+
- Updated footer Action options whenever the selected Object changes.
46+
- Updated row Action options whenever the row Object changes.
47+
- Added row-level validation for saved mappings that reference invalid Object/Action combinations.
48+
- Added a save guard so invalid combinations cannot be newly saved from the Controls UI.
49+
- Added footer Object Summary display in `toolbox/controls/index.html`.
50+
- Added reset confirmation before clearing mappings.
51+
52+
## Validation Performed
53+
54+
- PASS - `node --check toolbox/controls/controls.js`
55+
- PASS - `node --check tests/playwright/tools/InputMappingV2Tool.spec.mjs`
56+
- PASS - HTML restriction scan on `toolbox/controls/index.html`
57+
- PASS - `git diff --check` passed with line-ending warnings only.
58+
- PASS - `npx playwright test tests/playwright/tools/InputMappingV2Tool.spec.mjs`: 6/6 passed.
59+
60+
## Playwright Behavior Coverage
61+
62+
- PASS - Object dropdown loads DB-backed Hero, Coin, and Bolt records.
63+
- PASS - Collectible action list filters to Confirm, Interact, and Select.
64+
- PASS - Hero action list includes movement, Jump, and Interact.
65+
- PASS - Projectile action list filters to Fire, Rotate Left, Rotate Right, and Thrust.
66+
- PASS - Valid Projectile + Fire mapping saves and persists after reload.
67+
- PASS - Invalid Coin + Move Left persisted mapping shows actionable row validation.
68+
- PASS - Repairing the invalid row to Coin + Interact saves and persists.
69+
- PASS - Device refresh still detects a mocked gamepad.
70+
- PASS - Reset confirmation cancel preserves mappings.
71+
- PASS - Reset confirmation accept clears mappings through the shared DB adapter.
72+
73+
## V8 Coverage
74+
75+
- PASS - `docs_build/dev/reports/playwright_v8_coverage_report.txt` generated.
76+
- PASS - `toolbox/controls/controls.js`: 93% function coverage in the final Controls run.
77+
- PASS - `toolbox/controls/controls-api-client.js`: 100% function coverage in the final Controls run.
78+
- WARN - The coverage helper also lists JS files changed in `HEAD` from the prior PR as advisory WARN entries; those files are not part of this PR's git status and were not modified here.
79+
80+
## Skipped Lanes
81+
82+
- Full samples validation: SKIPPED. Samples were not in scope and no sample JSON changed.
83+
- Full suite: SKIPPED. Targeted Controls/Input Mapping Playwright covered the changed behavior.
84+
- Production game runtime validation: SKIPPED. No production game runtime behavior changed.
85+
86+
## Manual Validation Steps
87+
88+
1. Open `toolbox/controls/index.html`.
89+
2. Confirm the mappings footer shows Action, Object, and Object Summary.
90+
3. Select a Collectible object and confirm movement actions are not available.
91+
4. Select a Hero object and confirm movement and Interact actions are available.
92+
5. Select a Projectile object and confirm fire/launch actions are available.
93+
6. Add a valid mapping, reload, and confirm it remains.
94+
7. Confirm an invalid persisted mapping shows a row warning and can be repaired by editing the row.
95+
96+
## Artifacts
97+
98+
- PASS - Review diff: `docs_build/dev/reports/codex_review.diff`
99+
- PASS - Changed files: `docs_build/dev/reports/codex_changed_files.txt`
100+
- PASS - V8 coverage: `docs_build/dev/reports/playwright_v8_coverage_report.txt`
101+
- PASS - Repo-structured delta ZIP: `tmp/PR_26161_026-controls-object-action-mapping-validation_delta.zip`

‎docs_build/dev/reports/coverage_changed_js_guardrail.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Changed runtime JS files considered:
1010
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
1111
(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
1212
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
13-
(91%) toolbox/controls/controls.js - executed lines 1225/1225; executed functions 117/128
13+
(93%) toolbox/controls/controls.js - executed lines 1379/1379; executed functions 138/149
1414
(100%) toolbox/controls/controls-api-client.js - executed lines 12/12; executed functions 2/2
1515

1616
Guardrail warnings:

‎docs_build/dev/reports/playwright_v8_coverage_report.txt‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ 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-
(89%) Toolbox Index - exercised 4 runtime JS files
15+
(90%) 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

@@ -21,15 +21,15 @@ Changed runtime JS files covered:
2121
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
2222
(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
2323
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
24-
(91%) toolbox/controls/controls.js - executed lines 1225/1225; executed functions 117/128
24+
(93%) toolbox/controls/controls.js - executed lines 1379/1379; executed functions 138/149
2525
(100%) toolbox/controls/controls-api-client.js - executed lines 12/12; executed functions 2/2
2626

2727
Files with executed line/function counts where available:
2828
(53%) src/engine/api/server-api-client.js - executed lines 159/159; executed functions 10/19
2929
(58%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 603/603; executed functions 30/52
3030
(64%) assets/theme-v2/js/tool-display-mode.js - executed lines 209/209; executed functions 9/14
3131
(75%) toolbox/tool-registry-api-client.js - executed lines 152/152; executed functions 21/28
32-
(91%) toolbox/controls/controls.js - executed lines 1225/1225; executed functions 117/128
32+
(93%) toolbox/controls/controls.js - executed lines 1379/1379; executed functions 138/149
3333
(100%) toolbox/controls/controls-api-client.js - executed lines 12/12; executed functions 2/2
3434
(100%) toolbox/objects/objects-api-client.js - executed lines 10/10; executed functions 2/2
3535

@@ -47,5 +47,5 @@ Changed JS files considered:
4747
(0%) tests/playwright/tools/AdminDbViewer.spec.mjs - changed JS file not collected as browser runtime coverage
4848
(0%) tests/playwright/tools/InputMappingV2Tool.spec.mjs - changed JS file not collected as browser runtime coverage
4949
(0%) tests/playwright/tools/ToolboxAdminMetadataSsot.spec.mjs - changed JS file not collected as browser runtime coverage
50-
(91%) toolbox/controls/controls.js - changed JS file with browser V8 coverage
50+
(93%) toolbox/controls/controls.js - changed JS file with browser V8 coverage
5151
(100%) toolbox/controls/controls-api-client.js - changed JS file with browser V8 coverage

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Validate Controls mappings against DB-backed Objects and Actions - PR… · ToolboxAid/HTML-JavaScript-Gaming@39f34d8 · GitHub
Skip to content

Commit 39f34d8

Browse files
committed
Validate Controls mappings against DB-backed Objects and Actions - PR_26161_026-controls-object-action-mapping-validation
1 parent bfbbc9c commit 39f34d8

8 files changed

Lines changed: 1206 additions & 3452 deletions

File tree

‎docs_build/dev/reports/codex_changed_files.txt‎

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,18 @@
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
126
M tests/playwright/tools/InputMappingV2Tool.spec.mjs
13-
M tests/playwright/tools/ToolboxAdminMetadataSsot.spec.mjs
7+
M toolbox/controls/controls.js
148
M toolbox/controls/index.html
15-
M toolbox/input-mapping-v2/index.html
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
9+
?? docs_build/dev/reports/controls-object-action-mapping-validation-report.md
2110

2211
# git ls-files --others --exclude-standard
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
12+
docs_build/dev/reports/controls-object-action-mapping-validation-report.md
2613

2714
# 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(-)
15+
.../dev/reports/coverage_changed_js_guardrail.txt | 2 +-
16+
.../dev/reports/playwright_v8_coverage_report.txt | 8 +-
17+
tests/playwright/tools/InputMappingV2Tool.spec.mjs | 220 +++++++++++++++++++++
18+
toolbox/controls/controls.js | 205 +++++++++++++++++--
19+
toolbox/controls/index.html | 5 +
20+
5 files changed, 416 insertions(+), 24 deletions(-)

‎docs_build/dev/reports/codex_review.diff‎

Lines changed: 680 additions & 3397 deletions
Large diffs are not rendered by default.
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# PR_26161_026-controls-object-action-mapping-validation
2+
3+
## Branch Validation
4+
5+
- Current branch: `main`
6+
- Expected branch: `main`
7+
- Result: PASS
8+
9+
## Scope
10+
11+
- Impacted lane: Controls/Input Mapping tool.
12+
- Playwright impacted: Yes.
13+
- Controls status: Wireframe preserved.
14+
- Runtime engine behavior: Not changed.
15+
- Samples: Skipped.
16+
17+
## Requirement Checklist
18+
19+
- PASS - Controls data remains DB-backed through the shared DB/mock adapter.
20+
- PASS - Object dropdown loads DB-backed Objects records through the Objects repository client.
21+
- PASS - Footer Action dropdown filters from the selected Object.
22+
- PASS - Inline row Action dropdown filters from the row Object.
23+
- PASS - Collectible objects do not expose Move Left, Move Right, or Jump.
24+
- PASS - Hero objects expose movement and interaction actions.
25+
- PASS - Projectile objects expose fire/launch actions.
26+
- PASS - Invalid Object/Action combinations show creator-facing row validation.
27+
- PASS - Invalid Object/Action combinations are blocked from UI save.
28+
- PASS - Existing invalid persisted mappings are visible as `Pending Setup`.
29+
- PASS - Valid Object/Action combinations save and persist after reload.
30+
- PASS - Object Summary information appears in the mappings footer:
31+
- Selected Object
32+
- Object Role/Template
33+
- Available Actions
34+
- PASS - Controller profiles and device detection behavior preserved.
35+
- PASS - Edit-gated capture preserved.
36+
- PASS - Accordion layout preserved.
37+
- PASS - Reset confirmation preserved and covered.
38+
- PASS - Theme V2 only; no inline CSS, inline JS, script blocks, style blocks, or inline event handlers added.
39+
- PASS - No sample JSON alignment, auth behavior, production game runtime behavior, or unrelated rewrites added.
40+
41+
## Implementation Notes
42+
43+
- Added object/template action rules in `toolbox/controls/controls.js`.
44+
- Preserved Objects as the source for selectable object records and carried object role/capability metadata into Controls.
45+
- Updated footer Action options whenever the selected Object changes.
46+
- Updated row Action options whenever the row Object changes.
47+
- Added row-level validation for saved mappings that reference invalid Object/Action combinations.
48+
- Added a save guard so invalid combinations cannot be newly saved from the Controls UI.
49+
- Added footer Object Summary display in `toolbox/controls/index.html`.
50+
- Added reset confirmation before clearing mappings.
51+
52+
## Validation Performed
53+
54+
- PASS - `node --check toolbox/controls/controls.js`
55+
- PASS - `node --check tests/playwright/tools/InputMappingV2Tool.spec.mjs`
56+
- PASS - HTML restriction scan on `toolbox/controls/index.html`
57+
- PASS - `git diff --check` passed with line-ending warnings only.
58+
- PASS - `npx playwright test tests/playwright/tools/InputMappingV2Tool.spec.mjs`: 6/6 passed.
59+
60+
## Playwright Behavior Coverage
61+
62+
- PASS - Object dropdown loads DB-backed Hero, Coin, and Bolt records.
63+
- PASS - Collectible action list filters to Confirm, Interact, and Select.
64+
- PASS - Hero action list includes movement, Jump, and Interact.
65+
- PASS - Projectile action list filters to Fire, Rotate Left, Rotate Right, and Thrust.
66+
- PASS - Valid Projectile + Fire mapping saves and persists after reload.
67+
- PASS - Invalid Coin + Move Left persisted mapping shows actionable row validation.
68+
- PASS - Repairing the invalid row to Coin + Interact saves and persists.
69+
- PASS - Device refresh still detects a mocked gamepad.
70+
- PASS - Reset confirmation cancel preserves mappings.
71+
- PASS - Reset confirmation accept clears mappings through the shared DB adapter.
72+
73+
## V8 Coverage
74+
75+
- PASS - `docs_build/dev/reports/playwright_v8_coverage_report.txt` generated.
76+
- PASS - `toolbox/controls/controls.js`: 93% function coverage in the final Controls run.
77+
- PASS - `toolbox/controls/controls-api-client.js`: 100% function coverage in the final Controls run.
78+
- WARN - The coverage helper also lists JS files changed in `HEAD` from the prior PR as advisory WARN entries; those files are not part of this PR's git status and were not modified here.
79+
80+
## Skipped Lanes
81+
82+
- Full samples validation: SKIPPED. Samples were not in scope and no sample JSON changed.
83+
- Full suite: SKIPPED. Targeted Controls/Input Mapping Playwright covered the changed behavior.
84+
- Production game runtime validation: SKIPPED. No production game runtime behavior changed.
85+
86+
## Manual Validation Steps
87+
88+
1. Open `toolbox/controls/index.html`.
89+
2. Confirm the mappings footer shows Action, Object, and Object Summary.
90+
3. Select a Collectible object and confirm movement actions are not available.
91+
4. Select a Hero object and confirm movement and Interact actions are available.
92+
5. Select a Projectile object and confirm fire/launch actions are available.
93+
6. Add a valid mapping, reload, and confirm it remains.
94+
7. Confirm an invalid persisted mapping shows a row warning and can be repaired by editing the row.
95+
96+
## Artifacts
97+
98+
- PASS - Review diff: `docs_build/dev/reports/codex_review.diff`
99+
- PASS - Changed files: `docs_build/dev/reports/codex_changed_files.txt`
100+
- PASS - V8 coverage: `docs_build/dev/reports/playwright_v8_coverage_report.txt`
101+
- PASS - Repo-structured delta ZIP: `tmp/PR_26161_026-controls-object-action-mapping-validation_delta.zip`

‎docs_build/dev/reports/coverage_changed_js_guardrail.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Changed runtime JS files considered:
1010
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
1111
(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
1212
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
13-
(91%) toolbox/controls/controls.js - executed lines 1225/1225; executed functions 117/128
13+
(93%) toolbox/controls/controls.js - executed lines 1379/1379; executed functions 138/149
1414
(100%) toolbox/controls/controls-api-client.js - executed lines 12/12; executed functions 2/2
1515

1616
Guardrail warnings:

‎docs_build/dev/reports/playwright_v8_coverage_report.txt‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ 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-
(89%) Toolbox Index - exercised 4 runtime JS files
15+
(90%) 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

@@ -21,15 +21,15 @@ Changed runtime JS files covered:
2121
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
2222
(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
2323
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
24-
(91%) toolbox/controls/controls.js - executed lines 1225/1225; executed functions 117/128
24+
(93%) toolbox/controls/controls.js - executed lines 1379/1379; executed functions 138/149
2525
(100%) toolbox/controls/controls-api-client.js - executed lines 12/12; executed functions 2/2
2626

2727
Files with executed line/function counts where available:
2828
(53%) src/engine/api/server-api-client.js - executed lines 159/159; executed functions 10/19
2929
(58%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 603/603; executed functions 30/52
3030
(64%) assets/theme-v2/js/tool-display-mode.js - executed lines 209/209; executed functions 9/14
3131
(75%) toolbox/tool-registry-api-client.js - executed lines 152/152; executed functions 21/28
32-
(91%) toolbox/controls/controls.js - executed lines 1225/1225; executed functions 117/128
32+
(93%) toolbox/controls/controls.js - executed lines 1379/1379; executed functions 138/149
3333
(100%) toolbox/controls/controls-api-client.js - executed lines 12/12; executed functions 2/2
3434
(100%) toolbox/objects/objects-api-client.js - executed lines 10/10; executed functions 2/2
3535

@@ -47,5 +47,5 @@ Changed JS files considered:
4747
(0%) tests/playwright/tools/AdminDbViewer.spec.mjs - changed JS file not collected as browser runtime coverage
4848
(0%) tests/playwright/tools/InputMappingV2Tool.spec.mjs - changed JS file not collected as browser runtime coverage
4949
(0%) tests/playwright/tools/ToolboxAdminMetadataSsot.spec.mjs - changed JS file not collected as browser runtime coverage
50-
(91%) toolbox/controls/controls.js - changed JS file with browser V8 coverage
50+
(93%) toolbox/controls/controls.js - changed JS file with browser V8 coverage
5151
(100%) toolbox/controls/controls-api-client.js - changed JS file with browser V8 coverage

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })(); Validate Controls mappings against DB-backed Objects and Actions - PR… · ToolboxAid/HTML-JavaScript-Gaming@39f34d8 · GitHub
Skip to content

Commit 39f34d8

Browse files
committed
Validate Controls mappings against DB-backed Objects and Actions - PR_26161_026-controls-object-action-mapping-validation
1 parent bfbbc9c commit 39f34d8

8 files changed

Lines changed: 1206 additions & 3452 deletions

File tree

‎docs_build/dev/reports/codex_changed_files.txt‎

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,18 @@
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
126
M tests/playwright/tools/InputMappingV2Tool.spec.mjs
13-
M tests/playwright/tools/ToolboxAdminMetadataSsot.spec.mjs
7+
M toolbox/controls/controls.js
148
M toolbox/controls/index.html
15-
M toolbox/input-mapping-v2/index.html
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
9+
?? docs_build/dev/reports/controls-object-action-mapping-validation-report.md
2110

2211
# git ls-files --others --exclude-standard
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
12+
docs_build/dev/reports/controls-object-action-mapping-validation-report.md
2613

2714
# 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(-)
15+
.../dev/reports/coverage_changed_js_guardrail.txt | 2 +-
16+
.../dev/reports/playwright_v8_coverage_report.txt | 8 +-
17+
tests/playwright/tools/InputMappingV2Tool.spec.mjs | 220 +++++++++++++++++++++
18+
toolbox/controls/controls.js | 205 +++++++++++++++++--
19+
toolbox/controls/index.html | 5 +
20+
5 files changed, 416 insertions(+), 24 deletions(-)

‎docs_build/dev/reports/codex_review.diff‎

Lines changed: 680 additions & 3397 deletions
Large diffs are not rendered by default.
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# PR_26161_026-controls-object-action-mapping-validation
2+
3+
## Branch Validation
4+
5+
- Current branch: `main`
6+
- Expected branch: `main`
7+
- Result: PASS
8+
9+
## Scope
10+
11+
- Impacted lane: Controls/Input Mapping tool.
12+
- Playwright impacted: Yes.
13+
- Controls status: Wireframe preserved.
14+
- Runtime engine behavior: Not changed.
15+
- Samples: Skipped.
16+
17+
## Requirement Checklist
18+
19+
- PASS - Controls data remains DB-backed through the shared DB/mock adapter.
20+
- PASS - Object dropdown loads DB-backed Objects records through the Objects repository client.
21+
- PASS - Footer Action dropdown filters from the selected Object.
22+
- PASS - Inline row Action dropdown filters from the row Object.
23+
- PASS - Collectible objects do not expose Move Left, Move Right, or Jump.
24+
- PASS - Hero objects expose movement and interaction actions.
25+
- PASS - Projectile objects expose fire/launch actions.
26+
- PASS - Invalid Object/Action combinations show creator-facing row validation.
27+
- PASS - Invalid Object/Action combinations are blocked from UI save.
28+
- PASS - Existing invalid persisted mappings are visible as `Pending Setup`.
29+
- PASS - Valid Object/Action combinations save and persist after reload.
30+
- PASS - Object Summary information appears in the mappings footer:
31+
- Selected Object
32+
- Object Role/Template
33+
- Available Actions
34+
- PASS - Controller profiles and device detection behavior preserved.
35+
- PASS - Edit-gated capture preserved.
36+
- PASS - Accordion layout preserved.
37+
- PASS - Reset confirmation preserved and covered.
38+
- PASS - Theme V2 only; no inline CSS, inline JS, script blocks, style blocks, or inline event handlers added.
39+
- PASS - No sample JSON alignment, auth behavior, production game runtime behavior, or unrelated rewrites added.
40+
41+
## Implementation Notes
42+
43+
- Added object/template action rules in `toolbox/controls/controls.js`.
44+
- Preserved Objects as the source for selectable object records and carried object role/capability metadata into Controls.
45+
- Updated footer Action options whenever the selected Object changes.
46+
- Updated row Action options whenever the row Object changes.
47+
- Added row-level validation for saved mappings that reference invalid Object/Action combinations.
48+
- Added a save guard so invalid combinations cannot be newly saved from the Controls UI.
49+
- Added footer Object Summary display in `toolbox/controls/index.html`.
50+
- Added reset confirmation before clearing mappings.
51+
52+
## Validation Performed
53+
54+
- PASS - `node --check toolbox/controls/controls.js`
55+
- PASS - `node --check tests/playwright/tools/InputMappingV2Tool.spec.mjs`
56+
- PASS - HTML restriction scan on `toolbox/controls/index.html`
57+
- PASS - `git diff --check` passed with line-ending warnings only.
58+
- PASS - `npx playwright test tests/playwright/tools/InputMappingV2Tool.spec.mjs`: 6/6 passed.
59+
60+
## Playwright Behavior Coverage
61+
62+
- PASS - Object dropdown loads DB-backed Hero, Coin, and Bolt records.
63+
- PASS - Collectible action list filters to Confirm, Interact, and Select.
64+
- PASS - Hero action list includes movement, Jump, and Interact.
65+
- PASS - Projectile action list filters to Fire, Rotate Left, Rotate Right, and Thrust.
66+
- PASS - Valid Projectile + Fire mapping saves and persists after reload.
67+
- PASS - Invalid Coin + Move Left persisted mapping shows actionable row validation.
68+
- PASS - Repairing the invalid row to Coin + Interact saves and persists.
69+
- PASS - Device refresh still detects a mocked gamepad.
70+
- PASS - Reset confirmation cancel preserves mappings.
71+
- PASS - Reset confirmation accept clears mappings through the shared DB adapter.
72+
73+
## V8 Coverage
74+
75+
- PASS - `docs_build/dev/reports/playwright_v8_coverage_report.txt` generated.
76+
- PASS - `toolbox/controls/controls.js`: 93% function coverage in the final Controls run.
77+
- PASS - `toolbox/controls/controls-api-client.js`: 100% function coverage in the final Controls run.
78+
- WARN - The coverage helper also lists JS files changed in `HEAD` from the prior PR as advisory WARN entries; those files are not part of this PR's git status and were not modified here.
79+
80+
## Skipped Lanes
81+
82+
- Full samples validation: SKIPPED. Samples were not in scope and no sample JSON changed.
83+
- Full suite: SKIPPED. Targeted Controls/Input Mapping Playwright covered the changed behavior.
84+
- Production game runtime validation: SKIPPED. No production game runtime behavior changed.
85+
86+
## Manual Validation Steps
87+
88+
1. Open `toolbox/controls/index.html`.
89+
2. Confirm the mappings footer shows Action, Object, and Object Summary.
90+
3. Select a Collectible object and confirm movement actions are not available.
91+
4. Select a Hero object and confirm movement and Interact actions are available.
92+
5. Select a Projectile object and confirm fire/launch actions are available.
93+
6. Add a valid mapping, reload, and confirm it remains.
94+
7. Confirm an invalid persisted mapping shows a row warning and can be repaired by editing the row.
95+
96+
## Artifacts
97+
98+
- PASS - Review diff: `docs_build/dev/reports/codex_review.diff`
99+
- PASS - Changed files: `docs_build/dev/reports/codex_changed_files.txt`
100+
- PASS - V8 coverage: `docs_build/dev/reports/playwright_v8_coverage_report.txt`
101+
- PASS - Repo-structured delta ZIP: `tmp/PR_26161_026-controls-object-action-mapping-validation_delta.zip`

‎docs_build/dev/reports/coverage_changed_js_guardrail.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Changed runtime JS files considered:
1010
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
1111
(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
1212
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
13-
(91%) toolbox/controls/controls.js - executed lines 1225/1225; executed functions 117/128
13+
(93%) toolbox/controls/controls.js - executed lines 1379/1379; executed functions 138/149
1414
(100%) toolbox/controls/controls-api-client.js - executed lines 12/12; executed functions 2/2
1515

1616
Guardrail warnings:

‎docs_build/dev/reports/playwright_v8_coverage_report.txt‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ 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-
(89%) Toolbox Index - exercised 4 runtime JS files
15+
(90%) 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

@@ -21,15 +21,15 @@ Changed runtime JS files covered:
2121
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
2222
(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
2323
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
24-
(91%) toolbox/controls/controls.js - executed lines 1225/1225; executed functions 117/128
24+
(93%) toolbox/controls/controls.js - executed lines 1379/1379; executed functions 138/149
2525
(100%) toolbox/controls/controls-api-client.js - executed lines 12/12; executed functions 2/2
2626

2727
Files with executed line/function counts where available:
2828
(53%) src/engine/api/server-api-client.js - executed lines 159/159; executed functions 10/19
2929
(58%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 603/603; executed functions 30/52
3030
(64%) assets/theme-v2/js/tool-display-mode.js - executed lines 209/209; executed functions 9/14
3131
(75%) toolbox/tool-registry-api-client.js - executed lines 152/152; executed functions 21/28
32-
(91%) toolbox/controls/controls.js - executed lines 1225/1225; executed functions 117/128
32+
(93%) toolbox/controls/controls.js - executed lines 1379/1379; executed functions 138/149
3333
(100%) toolbox/controls/controls-api-client.js - executed lines 12/12; executed functions 2/2
3434
(100%) toolbox/objects/objects-api-client.js - executed lines 10/10; executed functions 2/2
3535

@@ -47,5 +47,5 @@ Changed JS files considered:
4747
(0%) tests/playwright/tools/AdminDbViewer.spec.mjs - changed JS file not collected as browser runtime coverage
4848
(0%) tests/playwright/tools/InputMappingV2Tool.spec.mjs - changed JS file not collected as browser runtime coverage
4949
(0%) tests/playwright/tools/ToolboxAdminMetadataSsot.spec.mjs - changed JS file not collected as browser runtime coverage
50-
(91%) toolbox/controls/controls.js - changed JS file with browser V8 coverage
50+
(93%) toolbox/controls/controls.js - changed JS file with browser V8 coverage
5151
(100%) toolbox/controls/controls-api-client.js - changed JS file with browser V8 coverage

0 commit comments

Comments
 (0)