Skip to content

Commit c561ea3

Browse files
author
DavidQ
committed
Normalize UAT manifest and rename sample tool mapping file - PR_26140_058-normalize-uat-fixture-and-sample-tool-map
1 parent 837cc06 commit c561ea3

7 files changed

Lines changed: 92 additions & 21 deletions

File tree

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Workspace Cleanup Normalization Report
2+
3+
PR: `PR_26140_058-normalize-uat-fixture-and-sample-tool-map`
4+
5+
## Summary
6+
- Renamed the sample link registry from `samples/sample.to.workspace.json` to `samples/samples.to.tools.json`.
7+
- Preserved the tool-focused schema name `html-js-gaming.sample-tool-links/1`.
8+
- Converted the Workspace V2 UAT fixture to the current game manifest direction used by `games/_template/game.manifest.json`.
9+
- Kept UAT fixture data in `tests/fixtures/workspace-v2/`.
10+
- Preserved Workspace Manager V2 launch/save behavior.
11+
12+
## Sample Tool Map
13+
- `samples/samples.to.tools.json` is the active sample/tool registry.
14+
- The registry uses a tool-first structure:
15+
- `tools.<toolName>[]`
16+
- each entry includes `sampleId` and `phase`
17+
- related sample metadata remains on each link, including `sampleType`, `primaryTool`, and `palettePath`
18+
- Validation confirmed 35 sample/tool links and existing palette paths.
19+
- No unrelated sample JSON files were modified.
20+
21+
## UAT Fixture
22+
- `tests/fixtures/workspace-v2/uat.manifest.json` now uses:
23+
- `$schema: "tools/schemas/game.manifest.schema.json"`
24+
- `schema: "html-js-gaming.game-manifest"`
25+
- Temporary UAT loading now requires a game-manifest-shaped fixture.
26+
- The Workspace Manager V2 runtime still generates the session/toolState context from the UAT game manifest at launch time.
27+
- Playwright coverage now validates the UAT fixture through `validateGameManifest()` and confirms the generated UAT session context loads.
28+
29+
## Active Dependency Audit
30+
- PASS: no active dependency remains on `workspace.manifest.json` in:
31+
- `tools`
32+
- `scripts`
33+
- `tests`
34+
- `games`
35+
- `samples`
36+
- PASS: no active dependency remains on `sample.to.workspace.json` in:
37+
- `tools`
38+
- `scripts`
39+
- `tests`
40+
- `games`
41+
- `samples`
42+
- PASS: no active dependency remains on `html-js-gaming.workspace-manifest.palette-links/1`.
43+
- Historical docs/roadmaps still contain older terminology and were left untouched.
44+
45+
## Validation
46+
- PASS: targeted JSON parse validation for:
47+
- `samples/samples.to.tools.json`
48+
- `tests/fixtures/workspace-v2/uat.manifest.json`
49+
- PASS: targeted syntax/import validation for changed files.
50+
- PASS: sample/tool mapping validation.
51+
- PASS: UAT game manifest validation and temporary UAT load validation.
52+
- PASS: `npm run test:workspace-v2` with 58 passed.
53+
- PASS: active dependency searches for removed schema/path references.
54+
- PASS: `git diff --check`.
55+
56+
## Out Of Scope
57+
- Full samples smoke test was skipped as requested.
58+
- No compatibility shims were added.
59+
- No unrelated sample JSON files were touched.

tests/fixtures/workspace-v2/uat.manifest.json

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
{
2-
"schema": "html-js-gaming.project",
2+
"$schema": "tools/schemas/game.manifest.schema.json",
3+
"schema": "html-js-gaming.game-manifest",
34
"version": 1,
4-
"id": "workspace-manager-v2-UAT-template",
5-
"name": "Workspace Manager V2 UAT Template Context",
6-
"gameId": "_template",
7-
"gameRoot": "games/_template/",
8-
"assetsPath": "games/_template/assets",
9-
"repoRoot": "HTML-JavaScript-Gaming",
10-
"repoPath": "C:/Users/davidq/Documents/GitHub/HTML-JavaScript-Gaming",
5+
"game": {
6+
"id": "_template",
7+
"name": "Template UAT",
8+
"folder": "_template"
9+
},
10+
"launch": {
11+
"directPath": "/games/_template/index.html",
12+
"workspaceManagerPath": "/tools/workspace-manager-v2/index.html?workspace=uat",
13+
"workspaceManagerOptional": true
14+
},
1115
"tools": {
1216
"palette-manager-v2": {
1317
"$schema": "tools/schemas/tools/palette-manager-v2.schema.json",
@@ -24,21 +28,30 @@
2428
"hex": "#7C3AED",
2529
"name": "Signal Violet!",
2630
"source": "UAT Sample",
27-
"tags": ["ui", "accent"]
31+
"tags": [
32+
"ui",
33+
"accent"
34+
]
2835
},
2936
{
3037
"symbol": "G",
3138
"hex": "#22C55E",
3239
"name": "Success Green",
3340
"source": "UAT Sample",
34-
"tags": ["success", "hud"]
41+
"tags": [
42+
"success",
43+
"hud"
44+
]
3545
},
3646
{
3747
"symbol": "A",
3848
"hex": "#F59E0B",
3949
"name": "Alert Amber",
4050
"source": "UAT Sample",
41-
"tags": ["warning", "hud"]
51+
"tags": [
52+
"warning",
53+
"hud"
54+
]
4255
}
4356
]
4457
},

tests/playwright/tools/WorkspaceManagerV2.spec.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12444,7 +12444,7 @@ test.describe("Workspace Manager V2 bootstrap", () => {
1244412444
await page.locator("#seedUatManifestButton").click();
1244512445
const uatManifestValidation = await page.evaluate(async (manifest) => {
1244612446
const { WorkspaceManagerV2ContextService } = await import("/tools/workspace-manager-v2/js/services/WorkspaceManagerV2ContextService.js");
12447-
return new WorkspaceManagerV2ContextService().validateGeneratedManifest(manifest);
12447+
return new WorkspaceManagerV2ContextService().validateGameManifest(manifest);
1244812448
}, uatManifest);
1244912449
expect(uatManifestValidation).toEqual({ ok: true });
1245012450
await expect(page.locator("#activeGameSelect")).toHaveValue("_template");
@@ -12457,12 +12457,12 @@ test.describe("Workspace Manager V2 bootstrap", () => {
1245712457
await expect(page.locator('[data-workspace-tool-id="palette-manager-v2"]')).toContainText("3 palette swatches");
1245812458
await expect(page.locator('[data-workspace-tool-id="preview-generator-v2"]')).toContainText("Preview Not Found");
1245912459
await expect(page.locator('[data-workspace-tool-id="storage-inspector-v2"]')).toContainText("Storage Inspector V2");
12460-
await expect(page.locator("#workspaceContextOutput")).toHaveValue(/"id": "workspace-manager-v2-UAT-template"/);
12460+
await expect(page.locator("#workspaceContextOutput")).toHaveValue(/"id": "workspace-manager-v2-_template"/);
1246112461
await expect(page.locator("#workspaceContextOutput")).toHaveValue(/"gameRoot": "games\/_template\/"/);
1246212462
await expect(page.locator("#workspaceContextOutput")).toHaveValue(/"assetsPath": "games\/_template\/assets"/);
12463-
expect(JSON.parse(await page.locator("#workspaceContextOutput").inputValue()).repoPath).toBe(manifestRepoPath(server));
12463+
expect(JSON.parse(await page.locator("#workspaceContextOutput").inputValue()).repoPath).toBeUndefined();
1246412464
await expect(page.locator("#workspaceContextOutput")).toHaveValue(/"sourceId": "tests\/fixtures\/workspace-v2\/uat.manifest.json"/);
12465-
await expect(page.locator("#statusLog")).toHaveValue(/OK Loaded UAT Workspace Manager V2 manifest workspace-manager-v2-UAT-template from \/tests\/fixtures\/workspace-v2\/uat\.manifest\.json\./);
12465+
await expect(page.locator("#statusLog")).toHaveValue(/OK Loaded UAT game manifest fixture workspace-manager-v2-_template from \/tests\/fixtures\/workspace-v2\/uat\.manifest\.json\./);
1246612466

1246712467
await page.locator('[data-workspace-tool-id="asset-manager-v2"]').click();
1246812468
await expect(page).toHaveURL(/asset-manager-v2\/index\.html.*launch=workspace/);

tools/workspace-manager-v2/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
Workspace Manager V2 is the first-class games-only context surface for Workspace V2 tool launch.
44

5-
It owns the active game, active palette, validated asset registry context, and sessionStorage launch handoff used by workspace-launched V2 tools. Direct production launch uses manifest/toolState context only; temporary `?workspace=UAT` access is owned here and loads `tests/fixtures/workspace-v2/uat.manifest.json` before launching tools.
5+
It owns the active game, active palette, validated asset registry context, and sessionStorage launch handoff used by workspace-launched V2 tools. Direct production launch uses manifest/toolState context only; temporary `?workspace=UAT` access is owned here and loads the game-manifest-shaped fixture at `tests/fixtures/workspace-v2/uat.manifest.json` before launching tools.

tools/workspace-manager-v2/js/WorkspaceManagerV2App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -989,6 +989,6 @@
989989
this.statusLog.info(`Warning: ${result.assetWarning}`);
990990
}
991991
this.reportToolStateHydration();
992-
this.statusLog.ok(`Loaded UAT Workspace Manager V2 manifest ${result.context.id} from /tests/fixtures/workspace-v2/uat.manifest.json.`);
992+
this.statusLog.ok(`Loaded UAT game manifest fixture ${result.context.id} from /tests/fixtures/workspace-v2/uat.manifest.json.`);
993993
}
994994
}

tools/workspace-manager-v2/js/services/WorkspaceManagerV2ContextService.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,11 +1310,10 @@ export class WorkspaceManagerV2ContextService {
13101310
if (!manifestResult.ok) {
13111311
return manifestResult;
13121312
}
1313-
const game = temporaryUatGameFromManifest(manifestResult.manifest);
1314-
if (!game) {
1315-
return { ok: false, message: `${TEMPORARY_UAT_MANIFEST_PATH} is not a valid Workspace Manager V2 UAT template manifest.` };
1313+
if (!isGameManifest(manifestResult.manifest)) {
1314+
return { ok: false, message: `${TEMPORARY_UAT_MANIFEST_PATH} is not a valid Workspace Manager V2 UAT game manifest fixture.` };
13161315
}
1317-
return this.contextResultFromManifest(game, manifestResult.manifest, TEMPORARY_UAT_MANIFEST_PATH);
1316+
return this.buildContextFromManifest(manifestResult.manifest, TEMPORARY_UAT_MANIFEST_PATH);
13181317
}
13191318

13201319
async restorePersistedContext() {

0 commit comments

Comments
 (0)