Skip to content

Commit 0b961e6

Browse files
committed
Add Controls event tooltips defaults and lock engine pause - PR_26162_049-controls-tooltips-defaults-pause-lock
1 parent 8af1fbc commit 0b961e6

10 files changed

Lines changed: 880 additions & 225 deletions

account/user-controls-page.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ export class AccountUserControlsPage {
351351
row.append(
352352
tableCell(mapping.physicalInput),
353353
tableCell(mapping.normalizedInput || mapping.positiveNormalizedInput || mapping.negativeNormalizedInput || "Unassigned"),
354-
tableCell("Default profile in use"),
354+
tableCell("Default profile"),
355355
);
356356
rowsByFamily.get(family)?.push(row);
357357
});

account/user-controls.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ <h2>Physical Input Mapping</h2>
3434
<details class="vertical-accordion" open data-account-user-controls-section="Keyboard">
3535
<summary>Keyboard</summary>
3636
<div class="accordion-body content-stack">
37-
<p class="status">Default profile in use. Create my profile to save your own keyboard mappings.</p>
37+
<p class="status">Default profile. Create my profile to save your own keyboard mappings.</p>
3838
<div class="table-wrapper">
3939
<table class="data-table" aria-label="Default keyboard fallback" data-account-user-controls-defaults="Keyboard">
4040
<thead>
@@ -68,7 +68,7 @@ <h2>Physical Input Mapping</h2>
6868
<details class="vertical-accordion" open data-account-user-controls-section="Mouse">
6969
<summary>Mouse</summary>
7070
<div class="accordion-body content-stack">
71-
<p class="status">Default profile in use. Create my profile to save your own mouse mappings.</p>
71+
<p class="status">Default profile. Create my profile to save your own mouse mappings.</p>
7272
<div class="table-wrapper">
7373
<table class="data-table" aria-label="Default mouse fallback" data-account-user-controls-defaults="Mouse">
7474
<thead>
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# git status --short
2-
M assets/theme-v2/css/colors.css
3-
M assets/theme-v2/css/forms.css
4-
M docs_build/dev/reports/coverage_changed_js_guardrail.txt
2+
M docs_build/dev/reports/coverage_changed_js_guardrail.txt
53
M docs_build/dev/reports/playwright_v8_coverage_report.txt
64
M tests/playwright/tools/InputMappingV2Tool.spec.mjs
7-
?? docs_build/dev/reports/controls-checkbox-state-styling-report.md
5+
M toolbox/controls/controls.js
6+
M toolbox/controls/index.html
7+
?? docs_build/dev/reports/controls-tooltips-defaults-pause-lock-report.md
88

99
# git ls-files --others --exclude-standard
10-
docs_build/dev/reports/controls-checkbox-state-styling-report.md
10+
docs_build/dev/reports/controls-tooltips-defaults-pause-lock-report.md
1111

1212
# git diff --stat
13-
assets/theme-v2/css/colors.css | 3 +++
14-
assets/theme-v2/css/forms.css | 26 +++++++++++++++++++
15-
.../dev/reports/coverage_changed_js_guardrail.txt | 3 +--
16-
.../dev/reports/playwright_v8_coverage_report.txt | 29 ++++++----------------
17-
tests/playwright/tools/InputMappingV2Tool.spec.mjs | 29 ++++++++++++++++++++++
18-
5 files changed, 66 insertions(+), 24 deletions(-)
13+
.../dev/reports/coverage_changed_js_guardrail.txt | 2 +-
14+
.../dev/reports/playwright_v8_coverage_report.txt | 8 +-
15+
tests/playwright/tools/InputMappingV2Tool.spec.mjs | 100 ++++++++----
16+
toolbox/controls/controls.js | 171 ++++++++++++++++++---
17+
toolbox/controls/index.html | 8 +-
18+
5 files changed, 231 insertions(+), 58 deletions(-)

docs_build/dev/reports/codex_review.diff

Lines changed: 560 additions & 153 deletions
Large diffs are not rendered by default.
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# PR_26162_049-controls-tooltips-defaults-pause-lock
2+
3+
## Branch Validation
4+
- PASS: current branch is `main`.
5+
- Expected branch: `main`.
6+
7+
## Requirement Checklist
8+
- PASS: Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` before edits.
9+
- PASS: Continued from PR_26162_048 without changing the enabled checkbox styling.
10+
- PASS: Added hover/ARIA tooltip text for Game Controls columns:
11+
- `D = Down`
12+
- `H = Hold`
13+
- `U = Up`
14+
- `DC = Double Click / Double Press`
15+
- PASS: Movement default rows now use Hold only.
16+
- PASS: Aim default rows now use Hold only.
17+
- PASS: Movement and aim defaults leave Down, Up, and Double Click unchecked.
18+
- PASS: `action.pause` remains visible in Game Controls.
19+
- PASS: `action.pause` is engine-owned and rendered read-only/locked.
20+
- PASS: `action.pause` cannot be disabled through the UI because no edit action is exposed and loaded/saved pause rows are normalized to enabled.
21+
- PASS: `action.pause` cannot be deleted through the UI because no Trash action is exposed and save/read repair restores it if missing.
22+
- PASS: Game Controls explains `Pause is handled by the engine.`
23+
- PASS: DB-backed Game Controls and Account User Controls separation is preserved.
24+
- PASS: No sample JSON alignment, auth behavior, production account system, or unrelated rewrites were added.
25+
26+
## Changed Files
27+
- `toolbox/controls/index.html`
28+
- `toolbox/controls/controls.js`
29+
- `tests/playwright/tools/InputMappingV2Tool.spec.mjs`
30+
- `docs_build/dev/reports/playwright_v8_coverage_report.txt`
31+
- `docs_build/dev/reports/coverage_changed_js_guardrail.txt`
32+
- `docs_build/dev/reports/controls-tooltips-defaults-pause-lock-report.md`
33+
34+
## Impacted Lanes
35+
- Toolbox Controls runtime lane.
36+
- Playwright impacted: Yes.
37+
38+
## Validation Performed
39+
- PASS: `node --check toolbox/controls/controls.js`
40+
- PASS: `node --check tests/playwright/tools/InputMappingV2Tool.spec.mjs`
41+
- PASS: `git diff --check`
42+
- PASS: `rg -n "<style|style\\s*=|\\son[a-z]+\\s*=" toolbox/controls/index.html toolbox/controls/controls.js` returned no matches.
43+
- PASS: `npx playwright test tests/playwright/tools/InputMappingV2Tool.spec.mjs --grep "Toolbox Controls|Game Controls edits|Game Controls validates|Controls split"`
44+
45+
## Playwright Result
46+
- PASS: 4 targeted Controls tests passed.
47+
- Covered behavior:
48+
- D/H/U/DC hover and ARIA tooltip metadata.
49+
- Movement and aim defaults use Hold only.
50+
- Pause remains visible and locked.
51+
- Pause has no Edit or Trash action.
52+
- Pause remains enabled and canonical after save/reload.
53+
- Existing Controls runtime/Account User Controls separation remains intact.
54+
55+
## V8 Coverage
56+
- Generated: `docs_build/dev/reports/playwright_v8_coverage_report.txt`
57+
- Result: `(94%) toolbox/controls/controls.js - executed lines 667/667; executed functions 68/72`
58+
- Guardrail: no changed runtime JS coverage warnings.
59+
60+
## Skipped Lanes
61+
- Full samples validation skipped: samples are out of scope and no sample JSON, game runtime, or sample launch behavior changed.
62+
- Full workspace suite skipped: this PR only changes the Controls tool UI/runtime behavior and targeted Controls Playwright covers the affected behavior.
63+
- Account/User Controls full behavior lane skipped beyond separation regression: no Account/User Controls files or behavior were changed.
64+
65+
## Manual Validation Steps
66+
1. Open `/toolbox/controls/index.html`.
67+
2. Hover the D, H, U, and DC column headers and confirm their tooltip meanings.
68+
3. Confirm Move and Aim rows show Hold checked and Down, Up, and Double Click unchecked.
69+
4. Confirm `action.pause` / Pause is visible.
70+
5. Confirm the Pause row says `Pause is handled by the engine.`
71+
6. Confirm Pause has no Edit or Trash button.
72+
7. Reload the page and confirm Pause remains visible, enabled, and locked.
73+
74+
## Samples Decision
75+
- SKIP: Full samples validation was not run because this PR does not touch samples, sample data, or production runtime behavior.

docs_build/dev/reports/coverage_changed_js_guardrail.txt

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

88
Changed runtime JS files considered:
9-
(67%) toolbox/controls/controls.js - executed lines 546/546; executed functions 35/52
9+
(94%) toolbox/controls/controls.js - executed lines 667/667; executed functions 68/72
1010

1111
Guardrail warnings:
1212
(100%) none - no changed runtime JS coverage 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,25 +12,25 @@ Note: entry percentages use function coverage when available, otherwise line cov
1212
Note: coverage entries are aggregated across every page/tool where coverageReporter.start(page) and coverageReporter.stop(page) ran.
1313

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

1919
Changed runtime JS files covered:
20-
(67%) toolbox/controls/controls.js - executed lines 546/546; executed functions 35/52
20+
(94%) toolbox/controls/controls.js - executed lines 667/667; executed functions 68/72
2121

2222
Files with executed line/function counts where available:
2323
(29%) src/engine/input/NormalizedInputRegistry.js - executed lines 321/321; executed functions 6/21
2424
(53%) src/engine/api/server-api-client.js - executed lines 159/159; executed functions 10/19
2525
(57%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 625/625; executed functions 30/53
2626
(64%) assets/theme-v2/js/tool-display-mode.js - executed lines 209/209; executed functions 9/14
27-
(67%) toolbox/controls/controls.js - executed lines 546/546; executed functions 35/52
2827
(75%) toolbox/tool-registry-api-client.js - executed lines 152/152; executed functions 21/28
28+
(94%) toolbox/controls/controls.js - executed lines 667/667; executed functions 68/72
2929
(100%) toolbox/controls/controls-api-client.js - executed lines 12/12; executed functions 2/2
3030

3131
Uncovered or low-coverage changed JS files:
3232
(100%) none - no low-coverage changed runtime JS files
3333

3434
Changed JS files considered:
3535
(0%) tests/playwright/tools/InputMappingV2Tool.spec.mjs - changed JS file not collected as browser runtime coverage
36-
(67%) toolbox/controls/controls.js - changed JS file with browser V8 coverage
36+
(94%) toolbox/controls/controls.js - changed JS file with browser V8 coverage

0 commit comments

Comments
 (0)