Skip to content

Commit fb05eab

Browse files
committed
Clean Game Design context layout and hide JSON output - PR_26155_077-079-game-design-layout-cleanup
1 parent f6c688c commit fb05eab

10 files changed

Lines changed: 253 additions & 134 deletions
1.95 MB
Loading

docs_build/dev/reports/coverage_changed_js_guardrail.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ 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-
(0%) toolbox/project-workspace/project-workspace.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
10-
(79%) toolbox/project-workspace/project-workspace-mock-repository.js - executed lines 384/384; executed functions 26/33
119
(89%) toolbox/tools-page-accordions.js - executed lines 1690/1690; executed functions 51/57
12-
(95%) toolbox/game-design/game-design-mock-repository.js - executed lines 310/310; executed functions 36/38
13-
(96%) toolbox/game-design/game-design.js - executed lines 255/255; executed functions 23/24
10+
(92%) toolbox/game-design/game-design-mock-repository.js - executed lines 310/310; executed functions 34/37
11+
(100%) toolbox/game-design/game-design.js - executed lines 224/224; executed functions 21/21
1412

1513
Guardrail warnings:
16-
(0%) toolbox/project-workspace/project-workspace.js - WARNING: changed runtime JS file missing from coverage; advisory only
14+
(100%) none - no changed runtime JS coverage warnings
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Game Design Center Fields Layout
2+
3+
PR: PR_26155_078-game-design-center-fields-layout
4+
5+
Status: PASS
6+
7+
## Changes
8+
9+
Design Fields moved from the left column into the center workspace column.
10+
11+
Left column now focuses on:
12+
- Project Context
13+
- Purpose Flow
14+
- Actions
15+
16+
Center column now owns the editable Game Design form:
17+
- Game Type
18+
- Genre
19+
- Play Style
20+
- Design Summary
21+
- Capability Demo Notes
22+
- Save Game Design
23+
24+
Right column remains focused on:
25+
- Output
26+
- Validation
27+
- Repository Tables
28+
- Toolbox Progress Handoff
29+
- Status Log
30+
31+
No page-local CSS, tool-local CSS, inline styles, or style blocks were added.
32+
33+
## Validation Notes
34+
35+
Impacted lane: `game-design`.
36+
37+
Targeted Playwright verified:
38+
- Design Fields render inside `.tool-center-panel`.
39+
- Design Fields no longer render in either `aside`.
40+
- save/update behavior still works.
41+
- no console errors.
42+
43+
Manual test:
44+
- Open `toolbox/game-design/index.html`.
45+
- Confirm the editable fields are in the center column under Project Design.
46+
- Confirm the left column is setup/context/actions only.
47+
- Confirm the right column contains status, validation, output, and handoff guidance.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Game Design Output No JSON
2+
3+
PR: PR_26155_079-game-design-output-no-json
4+
5+
Status: PASS
6+
7+
## Changes
8+
9+
Game Design Output no longer renders raw JSON.
10+
11+
The right-column Output section now shows user-facing summary text:
12+
- Design Summary
13+
- Validation Status
14+
- Next Step
15+
- Missing Requirements
16+
- Capability Demo
17+
18+
Raw/internal payload visibility is deferred to future Debug, Saved Data, or Admin surfaces if needed.
19+
20+
## Validation Notes
21+
22+
Impacted lane: `game-design`.
23+
24+
Targeted Playwright verified:
25+
- output contains no raw `{` JSON object display.
26+
- output contains no quoted internal payload fields such as `"gameType"`.
27+
- readable summary sections remain visible.
28+
- save/update/validation still work.
29+
- no console errors.
30+
31+
Additional checks:
32+
- `node --check toolbox/game-design/game-design.js`
33+
- `node --check tests/playwright/tools/GameDesignMockRepository.spec.mjs`
34+
- `git diff --check`
35+
- searched for inline script/style/event handlers and persistence hooks.
36+
- no `assets/theme-v2/css` files changed.
37+
38+
Skipped lanes:
39+
- `npm run test:workspace-v2` was skipped because shared launch/contract wiring did not change. The command name is legacy; user-facing language is Project Workspace.
40+
- full samples smoke was skipped because samples are out of scope.
41+
42+
Manual test:
43+
- Open `toolbox/game-design/index.html`.
44+
- Save a complete Game Design.
45+
- Confirm Output shows readable Design Summary, Validation Status, Next Step, Missing Requirements, and Capability Demo text.
46+
- Confirm no raw JSON is visible in normal output.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Game Design Project Context Cleanup
2+
3+
PR: PR_26155_077-game-design-project-context-cleanup
4+
5+
Status: PASS
6+
7+
## Changes
8+
9+
Game Design now renders Project Context once in the left setup column as text only.
10+
11+
Current display pattern:
12+
13+
`Demo Project - Game Project`
14+
15+
Removed duplicate split displays:
16+
- Active Project
17+
- Project Purpose
18+
- Project Status
19+
- Project Context selector
20+
21+
The Project Context value is not rendered as a duplicate card/header and does not contain controls.
22+
23+
## Validation Notes
24+
25+
Impacted lane: `game-design`.
26+
27+
Targeted Playwright verified:
28+
- Project Context appears once on the default Game Design page.
29+
- Project Context is text-only.
30+
- old duplicate context hooks are absent.
31+
- missing project context still shows an actionable validation overlay.
32+
- no console errors.
33+
34+
Skipped lanes:
35+
- `project-workspace`: not run separately because Game Design lane directly exercises active Project Workspace context dependency.
36+
- `workspace-contract`: skipped because shared launch/header/template wiring did not change.
37+
- full samples smoke: skipped because samples are out of scope.
38+
39+
Manual test:
40+
- Open `toolbox/game-design/index.html`.
41+
- Confirm the left Project Context section shows `Demo Project - Game Project` once.
42+
- Confirm there is no duplicate Project Context card/header or Project Context dropdown.

docs_build/dev/reports/playwright_structure_audit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Playwright Structure Audit
22

3-
Generated: 2026-06-04T23:06:53.944Z
3+
Generated: 2026-06-04T23:26:02.777Z
44
Status: PASS
55

66
## Lane Directories

docs_build/dev/reports/playwright_v8_coverage_report.txt

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,24 @@ Exercised tool entry points detected:
1717
(71%) Theme V2 Shared JS - exercised 2 runtime JS files
1818

1919
Changed runtime JS files covered:
20-
(0%) toolbox/project-workspace/project-workspace.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
21-
(79%) toolbox/project-workspace/project-workspace-mock-repository.js - executed lines 384/384; executed functions 26/33
2220
(89%) toolbox/tools-page-accordions.js - executed lines 1690/1690; executed functions 51/57
23-
(95%) toolbox/game-design/game-design-mock-repository.js - executed lines 310/310; executed functions 36/38
24-
(96%) toolbox/game-design/game-design.js - executed lines 255/255; executed functions 23/24
21+
(92%) toolbox/game-design/game-design-mock-repository.js - executed lines 310/310; executed functions 34/37
22+
(100%) toolbox/game-design/game-design.js - executed lines 224/224; executed functions 21/21
2523

2624
Files with executed line/function counts where available:
2725
(55%) assets/theme-v2/js/tool-display-mode.js - executed lines 113/113; executed functions 6/11
2826
(79%) toolbox/project-workspace/project-workspace-mock-repository.js - executed lines 384/384; executed functions 26/33
2927
(80%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 204/204; executed functions 16/20
3028
(89%) toolbox/tools-page-accordions.js - executed lines 1690/1690; executed functions 51/57
31-
(95%) toolbox/game-design/game-design-mock-repository.js - executed lines 310/310; executed functions 36/38
32-
(96%) toolbox/game-design/game-design.js - executed lines 255/255; executed functions 23/24
29+
(92%) toolbox/game-design/game-design-mock-repository.js - executed lines 310/310; executed functions 34/37
30+
(100%) toolbox/game-design/game-design.js - executed lines 224/224; executed functions 21/21
3331

3432
Uncovered or low-coverage changed JS files:
35-
(0%) toolbox/project-workspace/project-workspace.js - WARNING: uncovered changed runtime JS file; advisory only
33+
(100%) none - no low-coverage changed runtime JS files
3634

3735
Changed JS files considered:
3836
(0%) scripts/run-targeted-test-lanes.mjs - changed JS file not collected as browser runtime coverage
3937
(0%) tests/playwright/tools/GameDesignMockRepository.spec.mjs - changed JS file not collected as browser runtime coverage
40-
(0%) tests/playwright/tools/ProjectWorkspaceMockRepository.spec.mjs - changed JS file not collected as browser runtime coverage
41-
(0%) toolbox/project-workspace/project-workspace.js - changed JS file not collected as browser runtime coverage
42-
(79%) toolbox/project-workspace/project-workspace-mock-repository.js - changed JS file with browser V8 coverage
4338
(89%) toolbox/tools-page-accordions.js - changed JS file with browser V8 coverage
44-
(95%) toolbox/game-design/game-design-mock-repository.js - changed JS file with browser V8 coverage
45-
(96%) toolbox/game-design/game-design.js - changed JS file with browser V8 coverage
39+
(92%) toolbox/game-design/game-design-mock-repository.js - changed JS file with browser V8 coverage
40+
(100%) toolbox/game-design/game-design.js - changed JS file with browser V8 coverage

tests/playwright/tools/GameDesignMockRepository.spec.mjs

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,14 @@ test("Game Design shows an actionable overlay when project context is missing",
6161
await expect(page.locator("[data-game-design-project-overlay]")).toBeVisible();
6262
await expect(page.locator("[data-game-design-validation-overlay]")).toBeVisible();
6363
await expect(page.locator("[data-game-design-validation-list]")).toContainText("Project Context");
64-
await expect(page.locator("[data-game-design-active-project]")).toHaveText("No Project Workspace project");
64+
await expect(page.locator("[data-game-design-project-context]")).toHaveText("No Project Workspace project");
65+
await expect(page.locator("[data-game-design-output]")).not.toContainText("{");
66+
await expect(page.locator("[data-game-design-output]")).not.toContainText('"activeProjectId"');
6567

6668
await page.getByRole("button", { name: "Save Game Design" }).click();
6769
await expect(page.locator("[data-game-design-log]")).toHaveText("Open or seed a project before saving Game Design.");
68-
await expect(page.locator("[data-game-design-output]")).toContainText('"activeProjectId": null');
70+
await expect(page.locator("[data-game-design-output-validation]")).toHaveText("Blocked");
71+
await expect(page.locator("[data-game-design-output-missing]")).toHaveText("Project Context");
6972

7073
await expectNoPageFailures(failures);
7174
} finally {
@@ -78,8 +81,18 @@ test("Game Design saves and updates design fields against the active project", a
7881
const failures = await openRepoPage(page, "/toolbox/game-design/index.html");
7982

8083
try {
81-
await expect(page.locator("[data-game-design-active-project]")).toHaveText("Demo Project");
82-
await expect(page.locator("[data-game-design-project-purpose]")).toHaveText("Game Project");
84+
await expect(page.locator("[data-game-design-project-context]")).toHaveText("Demo Project - Game Project");
85+
await expect(page.getByText("Project Context", { exact: true })).toHaveCount(1);
86+
await expect(page.locator("[data-game-design-project-context] select, [data-game-design-project-context] input, [data-game-design-project-context] button, [data-game-design-project-context] a")).toHaveCount(0);
87+
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);
88+
await expect(page.locator(".tool-center-panel [data-game-design-form]")).toBeVisible();
89+
await expect(page.locator("aside [data-game-design-form]")).toHaveCount(0);
90+
await expect(page.locator("[data-game-design-output] pre, [data-game-design-output] code")).toHaveCount(0);
91+
await expect(page.locator("[data-game-design-output]")).toContainText("Design Summary");
92+
await expect(page.locator("[data-game-design-output]")).toContainText("Validation Status");
93+
await expect(page.locator("[data-game-design-output]")).toContainText("Next Step");
94+
await expect(page.locator("[data-game-design-output]")).not.toContainText("{");
95+
await expect(page.locator("[data-game-design-output]")).not.toContainText('"gameType"');
8396
await expect(page.locator("[data-game-design-validation-overlay]")).toBeVisible();
8497
await expect(page.locator("[data-game-design-validation-list]")).toContainText("Game Type");
8598
await expect(page.locator("[data-game-design-validation-list]")).toContainText("Genre");
@@ -96,12 +109,14 @@ test("Game Design saves and updates design fields against the active project", a
96109
await expect(page.locator("[data-game-design-validation-overlay]")).toBeHidden();
97110
await expect(page.locator("[data-game-design-status]")).toHaveText("Ready");
98111
await expect(page.locator("[data-game-design-recommended-tool]").first()).toHaveText("Game Configuration");
99-
await expect(page.locator("[data-game-design-output]")).toContainText('"gameType": "Puzzle"');
100-
await expect(page.locator("[data-game-design-output]")).toContainText('"genre": "Adventure"');
112+
await expect(page.locator("[data-game-design-output-summary]")).toHaveText("A compact puzzle adventure with one clear project promise.");
113+
await expect(page.locator("[data-game-design-output-validation]")).toHaveText("Ready");
114+
await expect(page.locator("[data-game-design-output-next-step]")).toHaveText("Game Configuration");
115+
await expect(page.locator("[data-game-design-output-missing]")).toHaveText("None");
101116

102117
await page.getByLabel("Genre").selectOption("Fantasy");
103118
await page.getByRole("button", { name: "Save Game Design" }).click();
104-
await expect(page.locator("[data-game-design-output]")).toContainText('"genre": "Fantasy"');
119+
await expect(page.locator("[data-game-design-output]")).not.toContainText('"genre"');
105120
await expect(page.locator("[data-game-design-log]")).toHaveText("Saved Demo Project Game Design as ready.");
106121

107122
await expectNoPageFailures(failures);
@@ -115,8 +130,7 @@ test("Game Design authors capability demos as Project Workspace projects", async
115130
const failures = await openRepoPage(page, "/toolbox/game-design/index.html?project=gravity-demo");
116131

117132
try {
118-
await expect(page.locator("[data-game-design-active-project]")).toHaveText("Gravity Demo");
119-
await expect(page.locator("[data-game-design-project-purpose]")).toHaveText("Capability Demo");
133+
await expect(page.locator("[data-game-design-project-context]")).toHaveText("Gravity Demo - Capability Demo");
120134
await expect(page.getByText("Capability demos remain Project Workspace projects.")).toBeVisible();
121135
await expect(page.locator("[data-game-design-capability-demos]")).toContainText("Gravity Demo: Project Workspace project");
122136
await expect(page.getByLabel("Game Type")).toHaveValue("Capability Demo");
@@ -126,9 +140,9 @@ test("Game Design authors capability demos as Project Workspace projects", async
126140

127141
await page.getByLabel("Capability Demo Notes").fill("Gravity demo remains project-owned authoring data.");
128142
await page.getByRole("button", { name: "Save Game Design" }).click();
129-
await expect(page.locator("[data-game-design-output]")).toContainText('"activeProjectId": "gravity-demo"');
130-
await expect(page.locator("[data-game-design-output]")).toContainText('"projectPurpose": "Capability Demo"');
131-
await expect(page.locator("[data-game-design-output]")).toContainText('"capabilityDemoAuthoring": true');
143+
await expect(page.locator("[data-game-design-output]")).not.toContainText("{");
144+
await expect(page.locator("[data-game-design-output]")).not.toContainText('"capabilityDemoAuthoring"');
145+
await expect(page.locator("[data-game-design-output-capability]")).toHaveText("Gravity Demo remains a Project Workspace project.");
132146
await expect(page.locator("[data-game-design-table-counts]")).toContainText("game_design_capability_demos");
133147

134148
await expectNoPageFailures(failures);

0 commit comments

Comments
 (0)