Skip to content

Commit 6f6cb03

Browse files
committed
Convert Game Design Project Design fields to table layout - PR_26156_120-game-design-project-design-table
1 parent 04dfaf6 commit 6f6cb03

6 files changed

Lines changed: 153 additions & 34 deletions

File tree

docs_build/dev/codex_commands.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,3 +645,29 @@ Required reports:
645645
- `docs_build/dev/reports/testing_lane_execution_report.md`
646646
- `docs_build/dev/reports/codex_changed_files.txt`
647647
- `docs_build/dev/reports/codex_review.diff`
648+
649+
650+
## PR_26156_120
651+
652+
Changes:
653+
- Read `docs_build/dev/PROJECT_INSTRUCTIONS.md`.
654+
- Updated `toolbox/game-design/index.html` so Design Fields > Project Design uses a two-column Theme V2 table.
655+
- Kept labels in the left column and controls in the right column with existing IDs, values, data hooks, and form behavior preserved.
656+
- Added targeted Game Design Playwright/MSJ coverage for the table structure and label/control pair preservation.
657+
- Documented Theme V2 gaps for reusable right-aligned table labels and table-cell control fill behavior.
658+
- Did not add CSS, inline styles, style blocks, script blocks, inline event handlers, or tool-local/page-local assets.
659+
- Did not modify unrelated Game Design sections.
660+
- Did not modify `start_of_day`.
661+
662+
Validation:
663+
- `node --check tests/playwright/tools/GameDesignMockRepository.spec.mjs`
664+
- `npm run test:lane:game-design`
665+
- Scoped `git diff --check` for changed implementation/test/report files.
666+
- Targeted changed-file scan confirmed no inline styles, style blocks, inline scripts, inline event handlers, or `start_of_day` references were introduced.
667+
- Full samples smoke: skipped by request.
668+
669+
Required reports:
670+
- `docs_build/dev/reports/game-design-project-design-table-report.md`
671+
- `docs_build/dev/reports/testing_lane_execution_report.md`
672+
- `docs_build/dev/reports/codex_changed_files.txt`
673+
- `docs_build/dev/reports/codex_review.diff`

docs_build/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Link Build Path tools and badges - PR_26156_119-build-path-tool-links-badges
1+
Convert Game Design Project Design form to Theme V2 table - PR_26156_120-game-design-project-design-table
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# PR_26156_120 Game Design Project Design Table Report
2+
3+
## Scope
4+
5+
- Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` first.
6+
- Updated only `toolbox/game-design/index.html` and the targeted Game Design Playwright/MSJ coverage.
7+
- Converted the Design Fields > Project Design form body into a two-column Theme V2 table.
8+
- Preserved existing control IDs, labels, data hooks, values, and submit behavior.
9+
- Did not modify unrelated Game Design sections.
10+
- Did not modify `start_of_day`.
11+
12+
## Implementation Notes
13+
14+
- Replaced the stacked label/control form layout with:
15+
- `div.table-wrapper`
16+
- `table.data-table`
17+
- first-column `th scope="row"` cells containing the existing labels
18+
- second-column `td` cells containing the existing select/textarea controls
19+
- Preserved hooks:
20+
- `data-game-design-form`
21+
- `data-game-design-type`
22+
- `data-game-design-genre`
23+
- `data-game-design-play-style`
24+
- `data-game-design-summary`
25+
- `data-game-design-capability-notes`
26+
- Added `data-game-design-project-design-table` for targeted validation.
27+
28+
## Theme V2 Gap Findings
29+
30+
- Existing Theme V2 supports the table structure through `table-wrapper` and `data-table`.
31+
- Existing Theme V2 does not provide a reusable table/form utility that right-aligns row-header labels.
32+
- Existing Theme V2 does not provide a table-specific form-control fill utility for select/textarea controls inside table cells.
33+
- No CSS was added. The right-aligned label and table-cell control-fill refinements should be handled later as reusable Theme V2 patterns if design-system ownership approves them.
34+
35+
## Validation Notes
36+
37+
- Impacted lane: `game-design`.
38+
- Skipped lanes: all other lanes, because this PR only changes Game Design form markup and the targeted Game Design UI/runtime test.
39+
- Ran `node --check tests/playwright/tools/GameDesignMockRepository.spec.mjs`.
40+
- Ran `npm run test:lane:game-design`.
41+
- Ran scoped `git diff --check` for changed implementation/test/report files.
42+
- Ran a changed-file static scan confirming no inline styles, style blocks, inline scripts, inline event handlers, or `start_of_day` references were introduced.
43+
- Full samples smoke: skipped by request.
44+
45+
## Manual Test Notes
46+
47+
- Verified by targeted Playwright that `Project Design fields` renders as a visible `data-table`.
48+
- Verified the table contains five two-cell rows.
49+
- Verified first-column labels keep their `for` attributes.
50+
- Verified second-column controls keep the original select/textarea IDs.
51+
- Verified existing Game Type, Genre, Play Style, Design Summary, and Capability Demo Notes controls still accept input.
52+
- Verified Save Game Design still saves/updates against the active project.

docs_build/dev/reports/testing_lane_execution_report.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Testing Lane Execution Report
22

3-
Generated: 2026-06-05T12:43:20.792Z
3+
Generated: 2026-06-05T12:57:13.655Z
44
Dry run: No
55

66
## Summary
@@ -9,7 +9,7 @@ PASS: 1
99
WARN: 0
1010
FAIL: 0
1111
SKIP: 13
12-
Total lane elapsed time: 25.73s
12+
Total lane elapsed time: 15.67s
1313
Actual browser launches: 1
1414

1515
## Full Samples Smoke
@@ -21,7 +21,7 @@ Reason: Skipped because changed files do not modify sample JSON or shared sample
2121

2222
Status: PASS
2323
Reason: Runner preflight and Playwright structure audit passed before expensive lane execution.
24-
Command: C:\nvm4w\nodejs\node.exe scripts/audit-playwright-test-locations.mjs --discovery-report docs_build/dev/reports/playwright_discovery_ownership_report.md --scope-report docs_build/dev/reports/playwright_discovery_scope_report.md --scan-report docs_build/dev/reports/filesystem_scan_reduction_report.md --lanes build-path --targets tests/playwright/tools/BuildPathProgressSimplification.spec.mjs --helpers tests/helpers/playwrightRepoServer.mjs,tests/helpers/playwrightStorageIsolation.mjs,tests/helpers/playwrightV8CoverageReporter.mjs,tests/helpers/workspaceV2CoverageReporter.mjs
24+
Command: C:\nvm4w\nodejs\node.exe scripts/audit-playwright-test-locations.mjs --discovery-report docs_build/dev/reports/playwright_discovery_ownership_report.md --scope-report docs_build/dev/reports/playwright_discovery_scope_report.md --scan-report docs_build/dev/reports/filesystem_scan_reduction_report.md --lanes game-design --targets tests/playwright/tools/GameDesignMockRepository.spec.mjs --helpers tests/helpers/playwrightRepoServer.mjs,tests/helpers/playwrightStorageIsolation.mjs,tests/helpers/playwrightV8CoverageReporter.mjs,tests/helpers/workspaceV2CoverageReporter.mjs
2525
Details: none
2626

2727
## Dependency Gate
@@ -32,7 +32,7 @@ Reason: No deterministic dependency failures before runtime.
3232
## Runtime Scheduling
3333

3434
Status: PASS
35-
Scheduled lane order: build-path
35+
Scheduled lane order: game-design
3636
Reused runtime sessions: 0
3737
Reused lane snapshots: 0
3838
Reused warm-start lanes: 0
@@ -61,7 +61,7 @@ Prevented broad lane escalation: 0
6161
## Discovery Scope
6262

6363
Status: PASS
64-
Target files: tests/playwright/tools/BuildPathProgressSimplification.spec.mjs
64+
Target files: tests/playwright/tools/GameDesignMockRepository.spec.mjs
6565
Required shared helpers: tests/helpers/playwrightRepoServer.mjs, tests/helpers/playwrightStorageIsolation.mjs, tests/helpers/playwrightV8CoverageReporter.mjs, tests/helpers/workspaceV2CoverageReporter.mjs
6666
Required fixtures: none
6767
Targeted file/helper reads: 5
@@ -71,24 +71,24 @@ Prevented fallback expansion: Yes; no ownership or scope blocker widened into br
7171
## Targeted File Manifests
7272

7373
Status: PASS
74-
Generated manifests: build-path:PASS
74+
Generated manifests: game-design:PASS
7575
Prevented discovery expansion: Yes
7676
Prevented redundant scans: 4
77-
Persistent manifest events: build-path:INVALIDATED
77+
Persistent manifest events: game-design:INVALIDATED
7878

7979
## Warm-Start Reuse
8080

8181
Status: PASS
82-
Warm-start events: build-path:INVALIDATED
83-
Dependency hydration events: build-path:INVALIDATED
82+
Warm-start events: game-design:INVALIDATED
83+
Dependency hydration events: game-design:INVALIDATED
8484
Prevented redundant initialization: 0
8585
Prevented helper resolution passes: 0
8686
Prevented fixture ownership traversal: 0
8787

8888
## Lane Snapshots
8989

9090
Status: PASS
91-
Snapshot events: build-path:INVALIDATED
91+
Snapshot events: game-design:INVALIDATED
9292
Reused snapshots: 0
9393
Invalidated snapshots: 1
9494
Prevented graph rebuilds: 0
@@ -107,9 +107,9 @@ Prevented Workspace lane reruns: 0
107107
| --- | --- | --- | --- | --- | --- | --- |
108108
| workspace-contract | SKIP | 0ms | 0 | Lane was not selected for this targeted run. | Root tools future-state navigation and Tool Template V2 contract | repo-served root tools page; Tool Template V2 future-state page; Theme V2 shared partials and assets |
109109
| project-workspace | SKIP | 0ms | 0 | Lane was not selected for this targeted run. | Project Workspace mock repository, Project Workspace UI, and Toolbox Progress/Build Path project-state bridge | repo-served Project Workspace page; repo-served Toolbox page with role simulation; in-memory SQL-shaped mock project repository |
110-
| game-design | SKIP | 0ms | 0 | Lane was not selected for this targeted run. | Game Design mock repository, project purpose flow, validation overlay, capability demo authoring, and Toolbox progress handoff | repo-served Game Design page; repo-served Toolbox Progress and Build Path views; in-memory SQL-shaped Game Design mock repository; Project Workspace mock project context |
110+
| game-design | PASS | 15.67s | 1 | Game Design rebuild slice validates the active project context, design save/update, actionable validation, capability demo authoring, and Toolbox progress handoff without exercising unrelated toolbox routes. | Game Design mock repository, project purpose flow, validation overlay, capability demo authoring, and Toolbox progress handoff | repo-served Game Design page; repo-served Toolbox Progress and Build Path views; in-memory SQL-shaped Game Design mock repository; Project Workspace mock project context |
111111
| game-configuration | SKIP | 0ms | 0 | Lane was not selected for this targeted run. | Game Configuration mock repository, Game Design handoff, configuration validation, user-facing output, and Toolbox progress handoff | repo-served Game Configuration page; repo-served Game Design page for handoff checks; repo-served Toolbox Progress and Build Path views; in-memory SQL-shaped Game Configuration mock repository; Game Design mock repository handoff |
112-
| build-path | PASS | 25.73s | 1 | Build Path simplification validates removal of the separate Progress view, workflow-order status/completion table behavior, contributor N/A rows, and Admin Tools Progress navigation without exercising unrelated toolbox routes. | Toolbox Build Path simplification, workflow status table, and Admin Tools Progress navigation | repo-served Toolbox page; repo-served Admin Tools Progress page; Project Workspace mock project context; Toolbox role simulation |
112+
| build-path | SKIP | 0ms | 0 | Lane was not selected for this targeted run. | Toolbox Build Path simplification, workflow status table, and Admin Tools Progress navigation | repo-served Toolbox page; repo-served Admin Tools Progress page; Project Workspace mock project context; Toolbox role simulation |
113113
| tools-progress | SKIP | 0ms | 0 | Lane was not selected for this targeted run. | Admin Tools Progress hydration, Toolbox Group view color model, and Project Build Path separation | repo-served Admin Tools Progress page; repo-served Toolbox Group view; Toolbox registry build sequence; Project Build Path workflow table |
114114
| tool-navigation | SKIP | 0ms | 0 | Lane was not selected for this targeted run. | Admin Tools Progress tool route links, Tool Display Mode build-order previous/next controls, and Toolbox group fallback routing | repo-served Admin Tools Progress page; repo-served Project Workspace, Game Design, and Game Configuration tool pages; repo-served Toolbox Group view with URL-selected accordion; Toolbox registry build sequence and route metadata |
115115
| tool-display-mode | SKIP | 0ms | 0 | Lane was not selected for this targeted run. | Tool Display Mode identity row, registry-owned previous/next links, disabled text fallback, and multi-path group routing | repo-served Project Workspace, Game Design, Game Configuration, and AI Assistant tool pages; repo-served Toolbox Group view with URL-selected accordion; Toolbox registry build sequence and route metadata; shared Theme V2 Tool Display Mode script |
@@ -124,10 +124,10 @@ Prevented Workspace lane reruns: 0
124124

125125
| Lane | Duration | Test |
126126
| --- | --- | --- |
127-
| build-path | 6.00s | tests\playwright\tools\BuildPathProgressSimplification.spec.mjs:139:1 > Build Path tool names link to registered routes and render badge images |
128-
| build-path | 4.30s | tests\playwright\tools\BuildPathProgressSimplification.spec.mjs:74:1 > Toolbox removes Progress view and renders Build Path workflow table |
129-
| build-path | 2.60s | tests\playwright\tools\BuildPathProgressSimplification.spec.mjs:114:1 > Build Path shows N/A only for non-required contributor-focused tools |
130-
| build-path | 2.20s | tests\playwright\tools\BuildPathProgressSimplification.spec.mjs:181:1 > Admin navigation exposes Tools Progress and removes Project Progress |
127+
| game-design | 3.20s | tests\playwright\tools\GameDesignMockRepository.spec.mjs:185:1 > Toolbox Build Path view shows the Game Design handoff |
128+
| game-design | 2.00s | tests\playwright\tools\GameDesignMockRepository.spec.mjs:80:1 > Game Design saves and updates design fields against the active project |
129+
| game-design | 1.70s | tests\playwright\tools\GameDesignMockRepository.spec.mjs:55:1 > Game Design shows an actionable overlay when project context is missing |
130+
| game-design | 1.60s | tests\playwright\tools\GameDesignMockRepository.spec.mjs:159:1 > Game Design authors capability demos as Project Workspace projects |
131131

132132
## Commands
133133

@@ -138,13 +138,13 @@ Prevented Workspace lane reruns: 0
138138
- SKIP
139139

140140
### game-design
141-
- SKIP
141+
- PASS 15.67s C:\nvm4w\nodejs\node.exe C:\Users\davidq\Documents\GitHub\HTML-JavaScript-Gaming\node_modules\@playwright\test\cli.js test tests/playwright/tools/GameDesignMockRepository.spec.mjs --project=playwright --workers=1 --reporter=list
142142

143143
### game-configuration
144144
- SKIP
145145

146146
### build-path
147-
- PASS 25.72s C:\nvm4w\nodejs\node.exe C:\Users\davidq\Documents\GitHub\HTML-JavaScript-Gaming\node_modules\@playwright\test\cli.js test tests/playwright/tools/BuildPathProgressSimplification.spec.mjs --project=playwright --workers=1 --reporter=list
147+
- SKIP
148148

149149
### tools-progress
150150
- SKIP

tests/playwright/tools/GameDesignMockRepository.spec.mjs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,36 @@ test("Game Design saves and updates design fields against the active project", a
8787
await expect(page.locator("[data-game-design-active-project], [data-game-design-project-purpose], [data-game-design-project-status], [data-game-design-project-select]")).toHaveCount(0);
8888
await expect(page.locator(".tool-center-panel [data-game-design-form]")).toBeVisible();
8989
await expect(page.locator("aside [data-game-design-form]")).toHaveCount(0);
90+
await expect(page.locator("[data-game-design-form] style, [data-game-design-form] [style], [data-game-design-form] script:not([src])")).toHaveCount(0);
91+
const projectDesignTable = page.locator("[data-game-design-project-design-table]");
92+
await expect(projectDesignTable).toBeVisible();
93+
await expect(projectDesignTable).toHaveClass(/data-table/);
94+
await expect(projectDesignTable.locator("tbody tr")).toHaveCount(5);
95+
await expect(projectDesignTable.locator("th[scope='row'] label")).toHaveText([
96+
"Game Type",
97+
"Genre",
98+
"Play Style",
99+
"Design Summary",
100+
"Capability Demo Notes"
101+
]);
102+
const projectDesignPairs = await projectDesignTable.locator("tbody tr").evaluateAll((rows) => rows.map((row) => {
103+
const label = row.querySelector("th label");
104+
const control = row.querySelector("td select, td textarea");
105+
return {
106+
cellCount: row.children.length,
107+
controlId: control?.id ?? null,
108+
controlTag: control?.tagName.toLowerCase() ?? null,
109+
labelFor: label?.getAttribute("for") ?? null,
110+
labelText: label?.textContent.trim() ?? null
111+
};
112+
}));
113+
expect(projectDesignPairs).toEqual([
114+
{ cellCount: 2, controlId: "gameDesignType", controlTag: "select", labelFor: "gameDesignType", labelText: "Game Type" },
115+
{ cellCount: 2, controlId: "gameDesignGenre", controlTag: "select", labelFor: "gameDesignGenre", labelText: "Genre" },
116+
{ cellCount: 2, controlId: "gameDesignPlayStyle", controlTag: "select", labelFor: "gameDesignPlayStyle", labelText: "Play Style" },
117+
{ cellCount: 2, controlId: "gameDesignSummary", controlTag: "textarea", labelFor: "gameDesignSummary", labelText: "Design Summary" },
118+
{ cellCount: 2, controlId: "gameDesignCapabilityNotes", controlTag: "textarea", labelFor: "gameDesignCapabilityNotes", labelText: "Capability Demo Notes" }
119+
]);
90120
await expect(page.locator("[data-game-design-output] pre, [data-game-design-output] code")).toHaveCount(0);
91121
await expect(page.locator("[data-game-design-output]")).toContainText("Design Summary");
92122
await expect(page.locator("[data-game-design-output]")).toContainText("Validation Status");

0 commit comments

Comments
 (0)