Skip to content

Commit 32133fd

Browse files
author
DavidQ
committed
Continue game manifest and V2 tooling normalization cleanup - PR_26139_021-manifest-tooling-normalization-followup
1 parent 8d2c646 commit 32133fd

14 files changed

Lines changed: 500 additions & 251 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# PR_26139_021 Manifest Tooling Normalization Follow-Up
2+
3+
## Summary
4+
- Tightened `game.manifest.schema.json` so `tools` only accepts current manifest-owned tool payloads.
5+
- Removed stale manifest-owned tool payloads from `vector-arcade-sample` and converted its vector geometry to `object-vector-studio-v2.objects[]`.
6+
- Removed optional Workspace Manager launch entries from manifests that do not have an active `palette-manager-v2` workspace context.
7+
- Removed remaining active `asset-browser` manifest fallback reads from preview/chrome asset resolution.
8+
9+
## Manifest Decisions
10+
- Direct-only manifests now keep only `launch.directPath`: AI Target Dummy, Bouncing Ball, Breakout, Pacman, Solar System, Space Duel, Space Invaders, and Vector Arcade Sample.
11+
- Workspace-capable manifests keep current Workspace Manager V2 paths: Asteroids, Gravity Well, and Pong.
12+
- `vector-arcade-sample` now uses:
13+
- `asset-manager-v2` for the preview asset.
14+
- `object-vector-studio-v2` for five converted objects: UI HUD, large obstacle, small obstacle, player, and UI title.
15+
- Removed from `vector-arcade-sample` because the payloads were stale/non-current manifest ownership:
16+
- `sprite-editor`
17+
- `tile-map-editor`
18+
- `parallax-editor`
19+
- `svg-asset-studio`
20+
- `preview-generator-tool`
21+
22+
## Schema And Runtime Cleanup
23+
- `tools/schemas/game.manifest.schema.json` now rejects unknown manifest tool keys instead of accepting arbitrary objects.
24+
- `palette-manager-v2` is now a first-class game manifest schema property.
25+
- Workspace Manager V2 now preloads/registers `palette-manager-v2.schema.json` when browser-validating game manifests.
26+
- `src/engine/runtime/gameImageConvention.js` resolves chrome/preview image assets from Asset Manager V2 only.
27+
- `games/shared/workspaceGameAssetCatalog.js` resolves manifest asset catalog entries from Asset Manager V2 only.
28+
- `games/shared/workspaceGameLaunchGuard.js` points to `workspace-manager-v2` and no longer emits the old `mount=game` query.
29+
30+
## Validation
31+
- PASS: `npm run build:manifest`
32+
- PASS: `node scripts/validate-json-contracts.mjs --mode=games --details`
33+
- `game_manifest_schema_validation: total=11 invalid=0`
34+
- PASS: manifest normalization audit
35+
- every manifest has `asset-manager-v2`
36+
- every manifest has exactly one preview role asset and the preview file exists
37+
- no stale manifest tool keys remain
38+
- no old Workspace Manager manifest launch paths remain
39+
- PASS: `rg -n '"(asset-browser|primitive-skin-editor|palette-browser|vector-map-editor|preview-generator-tool|sprite-editor|tile-map-editor|parallax-editor|svg-asset-studio)"' games -g 'game.manifest.json'`
40+
- no remaining game manifest matches
41+
- PASS: `npx playwright test tests/playwright/tools/WorkspaceManagerV2.spec.mjs --project=playwright --workers=1 --reporter=list --grep "discovers Active Game options from selected repo manifests"`
42+
- PASS: `npx playwright test tests/playwright/tools/WorkspaceManagerV2.spec.mjs --project=playwright --workers=1 --reporter=list --grep "uses header lifecycle controls and launches tools from fixed Workspace Manager V2 tiles"`
43+
- PASS: `npx playwright test tests/playwright/games/GameIndexPreviewManifestResolution.spec.mjs --project=playwright --workers=1 --reporter=list`
44+
- PASS: `git diff --check`
45+
46+
## Full Samples Smoke Test
47+
- Skipped. This PR is scoped to manifest/tooling normalization plus targeted preview and Workspace Manager validation; it does not broadly change sample loading.

games/AITargetDummy/game.manifest.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
"folder": "AITargetDummy"
99
},
1010
"launch": {
11-
"directPath": "/games/AITargetDummy/index.html",
12-
"workspaceManagerPath": "/tools/Workspace%20Manager/index.html?gameId=AITargetDummy&mount=game",
13-
"workspaceManagerOptional": true
11+
"directPath": "/games/AITargetDummy/index.html"
1412
},
1513
"tools": {
1614
"asset-manager-v2": {

games/Pacman/game.manifest.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
"folder": "Pacman"
99
},
1010
"launch": {
11-
"directPath": "/games/Pacman/index.html",
12-
"workspaceManagerPath": "/tools/Workspace%20Manager/index.html?gameId=Pacman&mount=game",
13-
"workspaceManagerOptional": true
11+
"directPath": "/games/Pacman/index.html"
1412
},
1513
"tools": {
1614
"asset-manager-v2": {

games/SolarSystem/game.manifest.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
"folder": "SolarSystem"
99
},
1010
"launch": {
11-
"directPath": "/games/SolarSystem/index.html",
12-
"workspaceManagerPath": "/tools/Workspace%20Manager/index.html?gameId=SolarSystem&mount=game",
13-
"workspaceManagerOptional": true
11+
"directPath": "/games/SolarSystem/index.html"
1412
},
1513
"tools": {
1614
"asset-manager-v2": {

games/SpaceDuel/game.manifest.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
"folder": "SpaceDuel"
99
},
1010
"launch": {
11-
"directPath": "/games/SpaceDuel/index.html",
12-
"workspaceManagerPath": "/tools/Workspace%20Manager/index.html?gameId=SpaceDuel&mount=game",
13-
"workspaceManagerOptional": true
11+
"directPath": "/games/SpaceDuel/index.html"
1412
},
1513
"tools": {
1614
"asset-manager-v2": {

games/SpaceInvaders/game.manifest.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
"folder": "SpaceInvaders"
99
},
1010
"launch": {
11-
"directPath": "/games/SpaceInvaders/index.html",
12-
"workspaceManagerPath": "/tools/Workspace%20Manager/index.html?gameId=SpaceInvaders&mount=game",
13-
"workspaceManagerOptional": true
11+
"directPath": "/games/SpaceInvaders/index.html"
1412
},
1513
"tools": {
1614
"asset-manager-v2": {

games/bouncing-ball/game.manifest.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
"folder": "Bouncing-ball"
99
},
1010
"launch": {
11-
"directPath": "/games/Bouncing-ball/index.html",
12-
"workspaceManagerPath": "/tools/Workspace%20Manager/index.html?gameId=Bouncing-ball&mount=game",
13-
"workspaceManagerOptional": true
11+
"directPath": "/games/Bouncing-ball/index.html"
1412
},
1513
"tools": {
1614
"asset-manager-v2": {

games/breakout/game.manifest.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
"folder": "Breakout"
99
},
1010
"launch": {
11-
"directPath": "/games/Breakout/index.html",
12-
"workspaceManagerPath": "/tools/Workspace%20Manager/index.html?gameId=Breakout&mount=game",
13-
"workspaceManagerOptional": true
11+
"directPath": "/games/Breakout/index.html"
1412
},
1513
"tools": {
1614
"asset-manager-v2": {

games/shared/workspaceGameAssetCatalog.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,17 +230,12 @@ function normalizeManifestCatalogPayload(payload) {
230230
tools?.["asset-manager-v2"]?.assets,
231231
assetsPath
232232
);
233-
const toolAssetEntries = normalizeCatalogEntries(tools?.["asset-browser"]?.assets);
234-
const entries = {
235-
...toolAssetEntries,
236-
...assetManagerEntries
237-
};
238233
const isValidSchema = schema === GAME_MANIFEST_SCHEMA;
239234
const isValidVersion = Number.isFinite(version) && version >= 1;
240235
return {
241236
schema,
242237
version,
243-
entries,
238+
entries: assetManagerEntries,
244239
valid: isValidSchema && isValidVersion
245240
};
246241
}

games/shared/workspaceGameLaunchGuard.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function resolveWorkspaceHostedContext(normalizedGameId) {
1010
const hosted = params.get("hosted") === "1";
1111
const hostToolId = (params.get("hostToolId") || "").trim().toLowerCase();
1212
const hostContextId = (params.get("hostContextId") || "").trim();
13-
if (!hosted || hostToolId !== "workspace-manager" || !hostContextId) {
13+
if (!hosted || hostToolId !== "workspace-manager-v2" || !hostContextId) {
1414
return null;
1515
}
1616

@@ -32,9 +32,8 @@ export function openGameInWorkspaceManager(gameId) {
3232
if (!normalizedGameId) {
3333
return false;
3434
}
35-
const redirectUrl = new URL("/tools/Workspace%20Manager/index.html", window.location.origin);
35+
const redirectUrl = new URL("/tools/workspace-manager-v2/index.html", window.location.origin);
3636
redirectUrl.searchParams.set("gameId", normalizedGameId);
37-
redirectUrl.searchParams.set("mount", "game");
3837
window.location.replace(redirectUrl.toString());
3938
return true;
4039
}

0 commit comments

Comments
 (0)