Skip to content

Commit 58584e4

Browse files
author
DavidQ
committed
Align workspace schemas and move preview ownership into Asset Manager image roles - PR_26127_007-schema-alignment-preview-role-and-workspace-filtering
1 parent 6db9cf5 commit 58584e4

16 files changed

Lines changed: 244 additions & 163 deletions
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# PR_26127_007-schema-alignment-preview-role-and-workspace-filtering
2+
3+
## Scope
4+
- Reviewed `docs/dev/PROJECT_INSTRUCTIONS.md` before implementation.
5+
- Reviewed attached schema bundle `tools/schemas.zip` entries for `schemas/workspace.manifest.schema.json` and `schemas/tools/asset-manager-v2.schema.json` without extracting or modifying the ZIP.
6+
- Kept scope limited to Workspace Manager V2, Asset Manager V2, Preview Generator V2 launch hydration, manifests, schema, and dedicated Playwright coverage.
7+
- Did not modify deprecated `tools/workspace-v2`.
8+
- Did not modify sample JSON.
9+
10+
## Schema Alignment Notes
11+
- `tools/schemas/workspace.manifest.schema.json` already required only `palette-manager-v2` and `asset-manager-v2`; that SSoT requirement remains unchanged.
12+
- Removed `previewImagePath` from the Asset Manager V2 payload schema and from Asteroids manifest data.
13+
- Changed image role naming to `preview`; removed `bezel` and `preview-image` from active Asset Manager V2 image roles.
14+
- Moved stretch override allowance from `assets.image.bezel.*` to `assets.image.preview.*`.
15+
- Updated Asteroids preview/bezel manifest data to a single `assets.image.preview.bezel` entry with role `preview` and `stretchOverride`.
16+
17+
## Workspace Launch Notes
18+
- Preview Generator V2 now derives the preview target from Asset Manager V2 image assets with role `preview`.
19+
- Workspace-launched Preview Generator V2 shows only Games as the visible Target Source; Samples and Tools are hidden and disabled.
20+
- Workspace Manager V2 moves the template tile to Viewers and displays it as `Tool Starter V2`.
21+
- UAT seeding now loads `games/_template/workspace-manager-v2-UAT.manifest.json` as a `_template` game context with `games/_template/` and `games/_template/assets`.
22+
- The active game selector displays the explicit `Template UAT` context while UAT is active.
23+
- No Asteroids-specific fallback was added for UAT.
24+
25+
## Validation
26+
- `node --check` passed for changed runtime JS files and changed Playwright specs.
27+
- JSON parse validation passed for changed schema/manifest JSON files.
28+
- Workspace manifest service validation passed for:
29+
- `games/Asteroids/game.manifest.json`
30+
- `games/_template/workspace-manager-v2-UAT.manifest.json`
31+
- `npm run test:workspace-v2` passed: 24 passed.
32+
- Full samples smoke test skipped because this PR is Workspace V2/tool UAT scoped and sample JSON is out of scope.
33+
34+
## Manual Validation Notes
35+
- Launch Workspace Manager V2, load Asteroids, confirm the exported manifest has no `previewImagePath` and includes `assets.image.preview.bezel`.
36+
- Launch Asset Manager V2 from Workspace Manager V2 and confirm image roles are `sprite`, `background`, `preview`, and `ui`.
37+
- Pick image files containing `preview` or `bezel` and confirm role/id use `preview`.
38+
- Launch Preview Generator V2 from Workspace Manager V2 and confirm only Games is visible under Target Source.
39+
- Open Workspace Manager V2 with `?workspace=uat`, seed UAT, and confirm the context uses `games/_template/`.

games/Asteroids/game.manifest.json

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@
8080
"version": 1,
8181
"name": "Asteroids Asset Manager V2 Registry",
8282
"source": "manifest",
83-
"previewImagePath": "assets/images/bezel.png",
8483
"assets": {
8584
"assets.audio.music.beat-1": {
8685
"path": "assets/audio/beat1.wav",
@@ -166,22 +165,15 @@
166165
"role": "background",
167166
"source": "manifest"
168167
},
169-
"assets.image.bezel.bezel": {
168+
"assets.image.preview.bezel": {
170169
"path": "assets/images/bezel.png",
171170
"type": "image",
172171
"kind": "png",
173-
"role": "bezel",
172+
"role": "preview",
174173
"source": "manifest",
175174
"stretchOverride": {
176175
"uniformEdgeStretchPx": 10
177176
}
178-
},
179-
"assets.image.preview-image.bezel": {
180-
"path": "assets/images/bezel.png",
181-
"type": "image",
182-
"kind": "png",
183-
"role": "preview-image",
184-
"source": "manifest"
185177
}
186178
}
187179
},

games/_template/workspace-manager-v2-UAT.manifest.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
"documentKind": "workspace-manifest",
44
"schema": "html-js-gaming.project",
55
"version": 1,
6-
"id": "workspace-manager-v2-UAT-Asteroids",
7-
"name": "Workspace Manager V2 UAT Context",
8-
"gameId": "Asteroids",
9-
"gameRoot": "games/Asteroids/",
10-
"assetsPath": "games/Asteroids/assets",
6+
"id": "workspace-manager-v2-UAT-template",
7+
"name": "Workspace Manager V2 UAT Template Context",
8+
"gameId": "_template",
9+
"gameRoot": "games/_template/",
10+
"assetsPath": "games/_template/assets",
1111
"repoRoot": "HTML-JavaScript-Gaming",
1212
"tools": {
1313
"palette-manager-v2": {

0 commit comments

Comments
 (0)