Skip to content

Commit 9d81680

Browse files
author
DavidQ
committed
Wire Object Vector Studio V2 into Workspace Manager V2 and add Asteroids object vector assets - PR_26132_010-object-vector-workspace-asteroids-assets
1 parent e9fdb84 commit 9d81680

9 files changed

Lines changed: 694 additions & 36 deletions

File tree

docs/dev/reports/playwright_v8_coverage.txt

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ Exercised tool entry points detected:
2020
(0%) Workspace Manager - not exercised by this Playwright run
2121

2222
Changed runtime JS files covered:
23-
(80%) tools/object-vector-studio-v2/js/bootstrap.js - executed lines 70/70; executed functions 4/5
24-
(90%) tools/object-vector-studio-v2/js/ToolStarterApp.js - executed lines 1592/1592; executed functions 170/189
23+
(86%) tools/workspace-manager-v2/js/WorkspaceManagerV2App.js - executed lines 963/963; executed functions 42/49
24+
(91%) tools/workspace-manager-v2/js/services/WorkspaceManagerV2ContextService.js - executed lines 1598/1598; executed functions 145/159
2525
(92%) tools/object-vector-studio-v2/js/services/ObjectVectorStudioV2SchemaService.js - executed lines 286/286; executed functions 33/36
26+
(92%) tools/object-vector-studio-v2/js/ToolStarterApp.js - executed lines 1595/1595; executed functions 174/189
27+
(93%) tools/workspace-manager-v2/js/controls/ToolTilesControl.js - executed lines 137/137; executed functions 14/15
2628

2729
Files with executed line/function counts where available:
2830
(2%) src/engine/input/ActionInputService.js - executed lines 397/397; executed functions 1/51
@@ -46,7 +48,6 @@ Files with executed line/function counts where available:
4648
(14%) src/engine/scene/TransitionScene.js - executed lines 58/58; executed functions 1/7
4749
(15%) games/Asteroids/game/AsteroidsAttractAdapter.js - executed lines 229/229; executed functions 3/20
4850
(15%) src/engine/audio/MediaTrackService.js - executed lines 139/139; executed functions 2/13
49-
(16%) samples/shared/sampleDetailPageEnhancement.js - executed lines 471/471; executed functions 5/32
5051
(16%) src/engine/audio/AudioService.js - executed lines 258/258; executed functions 4/25
5152
(17%) src/engine/camera/Camera2D.js - executed lines 44/44; executed functions 1/6
5253
(17%) src/engine/collision/polygon.js - executed lines 73/73; executed functions 1/6
@@ -93,7 +94,6 @@ Files with executed line/function counts where available:
9394
(33%) src/engine/persistence/WorldSerializer.js - executed lines 12/12; executed functions 1/3
9495
(33%) src/engine/runtime/MobileRuntimeTweaks.js - executed lines 21/21; executed functions 1/3
9596
(33%) src/engine/scene/SceneTransitionController.js - executed lines 22/22; executed functions 1/3
96-
(33%) src/shared/number/numberUtils.js - executed lines 14/14; executed functions 1/3
9797
(33%) tools/shared/projectSystemValueUtils.js - executed lines 9/9; executed functions 1/3
9898
(33%) tools/shared/uiSafeUtils.js - executed lines 32/32; executed functions 2/6
9999
(36%) games/Asteroids/index.js - executed lines 179/179; executed functions 4/11
@@ -145,6 +145,7 @@ Files with executed line/function counts where available:
145145
(64%) games/Pong/game/PongScene.js - executed lines 521/521; executed functions 21/33
146146
(65%) tools/palette-manager-v2/controls/SourcePaletteBrowserControl.js - executed lines 121/121; executed functions 15/23
147147
(67%) games/Asteroids/utils/math.js - executed lines 14/14; executed functions 2/3
148+
(67%) src/shared/number/numberUtils.js - executed lines 14/14; executed functions 2/3
148149
(67%) tools/asset-manager-v2/js/controls/AssetManagerShellControl.js - executed lines 100/100; executed functions 8/12
149150
(67%) tools/palette-manager-v2/modules/paletteUtils.js - executed lines 41/41; executed functions 6/9
150151
(67%) tools/world-vector-studio-v2/js/controls/ToolStarterShellControl.js - executed lines 111/111; executed functions 8/12
@@ -180,6 +181,7 @@ Files with executed line/function counts where available:
180181
(80%) tools/preview-generator-v2/PreviewGeneratorV2Logger.js - executed lines 19/19; executed functions 4/5
181182
(80%) tools/workspace-manager-v2/js/controls/AccordionSection.js - executed lines 27/27; executed functions 4/5
182183
(80%) tools/world-vector-studio-v2/js/controls/AccordionSection.js - executed lines 27/27; executed functions 4/5
184+
(81%) samples/shared/sampleDetailPageEnhancement.js - executed lines 471/471; executed functions 35/43
183185
(82%) src/engine/rendering/CanvasRenderer.js - executed lines 100/100; executed functions 9/11
184186
(82%) tools/session-inspector-v2/js/controls/EntryListControl.js - executed lines 59/59; executed functions 9/11
185187
(83%) tools/palette-manager-v2/main.js - executed lines 227/227; executed functions 15/18
@@ -188,29 +190,29 @@ Files with executed line/function counts where available:
188190
(86%) games/shared/workspaceGameAssetCatalog.js - executed lines 253/253; executed functions 18/21
189191
(86%) tools/asset-manager-v2/js/controls/AssetCatalogControl.js - executed lines 134/134; executed functions 12/14
190192
(86%) tools/workspace-manager-v2/js/controls/RepoDestinationControl.js - executed lines 25/25; executed functions 6/7
191-
(86%) tools/workspace-manager-v2/js/WorkspaceManagerV2App.js - executed lines 945/945; executed functions 42/49
193+
(86%) tools/workspace-manager-v2/js/WorkspaceManagerV2App.js - executed lines 963/963; executed functions 42/49
192194
(88%) games/Pong/game/PongInputController.js - executed lines 77/77; executed functions 7/8
193195
(88%) tools/preview-generator-v2/PreviewGeneratorV2App.js - executed lines 1498/1498; executed functions 107/121
194196
(88%) tools/shared/toolLaunchSSoTData.js - executed lines 112/112; executed functions 14/16
195197
(88%) tools/text2speech-V2/js/controls/TextInputControl.js - executed lines 24/24; executed functions 7/8
196198
(88%) tools/world-vector-studio-v2/js/controls/SourceInputControl.js - executed lines 33/33; executed functions 7/8
197199
(89%) tools/asset-manager-v2/js/services/AssetSchemaValidator.js - executed lines 295/295; executed functions 25/28
198200
(89%) tools/preview-generator-v2/controls/StatusLogControl.js - executed lines 32/32; executed functions 8/9
199-
(90%) tools/object-vector-studio-v2/js/ToolStarterApp.js - executed lines 1592/1592; executed functions 170/189
200201
(90%) tools/palette-manager-v2/modules/PaletteValidationService.js - executed lines 88/88; executed functions 9/10
201202
(90%) tools/text2speech-V2/js/controls/ActionNavControl.js - executed lines 117/117; executed functions 19/21
202203
(90%) tools/text2speech-V2/js/TextToSpeechToolApp.js - executed lines 807/807; executed functions 62/69
203204
(91%) games/Asteroids/entities/Asteroid.js - executed lines 72/72; executed functions 10/11
204205
(91%) tools/object-vector-studio-v2/js/controls/ActionNavControl.js - executed lines 75/75; executed functions 10/11
205206
(91%) tools/toolRegistry.js - executed lines 526/526; executed functions 10/11
206-
(91%) tools/workspace-manager-v2/js/services/WorkspaceManagerV2ContextService.js - executed lines 1583/1583; executed functions 145/159
207+
(91%) tools/workspace-manager-v2/js/services/WorkspaceManagerV2ContextService.js - executed lines 1598/1598; executed functions 145/159
207208
(92%) tools/object-vector-studio-v2/js/controls/ToolStarterShellControl.js - executed lines 112/112; executed functions 11/12
208209
(92%) tools/object-vector-studio-v2/js/services/ObjectVectorStudioV2SchemaService.js - executed lines 286/286; executed functions 33/36
210+
(92%) tools/object-vector-studio-v2/js/ToolStarterApp.js - executed lines 1595/1595; executed functions 174/189
209211
(93%) tools/asset-manager-v2/js/services/WorkspaceBridge.js - executed lines 305/305; executed functions 25/27
210212
(93%) tools/session-inspector-v2/js/SessionInspectorV2App.js - executed lines 337/337; executed functions 42/45
211213
(93%) tools/text2speech-V2/js/controls/QueueControl.js - executed lines 122/122; executed functions 26/28
212214
(93%) tools/workspace-manager-v2/js/controls/GameSelectorControl.js - executed lines 59/59; executed functions 13/14
213-
(93%) tools/workspace-manager-v2/js/controls/ToolTilesControl.js - executed lines 130/130; executed functions 14/15
215+
(93%) tools/workspace-manager-v2/js/controls/ToolTilesControl.js - executed lines 137/137; executed functions 14/15
214216
(94%) games/shared/workspaceGameMetadataHydrator.js - executed lines 106/106; executed functions 16/17
215217
(94%) tools/common/PaletteSortService.js - executed lines 103/103; executed functions 17/18
216218
(95%) tools/session-inspector-v2/js/services/SessionInspectorV2StorageService.js - executed lines 142/142; executed functions 18/19
@@ -294,6 +296,8 @@ Uncovered or low-coverage changed JS files:
294296
Changed JS files considered:
295297
(0%) tests/playwright/tools/WorkspaceManagerV2.spec.mjs - changed JS file not collected as browser runtime coverage
296298
(0%) tools/object-vector-studio-v2/tests/playwright/FirstClassToolStarter.spec.mjs - changed JS file not collected as browser runtime coverage
297-
(80%) tools/object-vector-studio-v2/js/bootstrap.js - changed JS file with browser V8 coverage
298-
(90%) tools/object-vector-studio-v2/js/ToolStarterApp.js - changed JS file with browser V8 coverage
299+
(86%) tools/workspace-manager-v2/js/WorkspaceManagerV2App.js - changed JS file with browser V8 coverage
300+
(91%) tools/workspace-manager-v2/js/services/WorkspaceManagerV2ContextService.js - changed JS file with browser V8 coverage
299301
(92%) tools/object-vector-studio-v2/js/services/ObjectVectorStudioV2SchemaService.js - changed JS file with browser V8 coverage
302+
(92%) tools/object-vector-studio-v2/js/ToolStarterApp.js - changed JS file with browser V8 coverage
303+
(93%) tools/workspace-manager-v2/js/controls/ToolTilesControl.js - changed JS file with browser V8 coverage
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# PR_26132_010-object-vector-workspace-asteroids-assets
2+
3+
## Purpose
4+
5+
Wire Object Vector Studio V2 into Workspace Manager V2 launch/session flow and seed Asteroids with schema-valid object vector assets.
6+
7+
## Scope
8+
9+
- Added Object Vector Studio V2 to Workspace Manager V2 launchable tool tiles.
10+
- Added Object Vector Studio V2 schema validation to Workspace Manager V2 tool payload validation.
11+
- Added Asteroids `root.tools.object-vector-studio-v2` durable object asset data for:
12+
- Asteroids Ship
13+
- Large Asteroid
14+
- Medium Asteroid
15+
- Small Asteroid
16+
- Large UFO
17+
- Small UFO
18+
- Kept palette data out of the Object Vector Studio V2 object payload.
19+
- Prefer the active workspace palette session on workspace launch before runtime palette cache.
20+
- Added tile detail/count display for Object Vector Studio V2 object assets.
21+
- Added workspace launch logging that names the object payload source and separate palette session source.
22+
23+
## Validation
24+
25+
Commands run:
26+
27+
```powershell
28+
node -e "const fs=require('fs'); for (const p of ['games/Asteroids/game.manifest.json','tools/schemas/workspace.manifest.schema.json']) { JSON.parse(fs.readFileSync(p,'utf8').replace(/^\uFEFF/,'')); } console.log('json ok')"
29+
@'
30+
const fs = require('fs');
31+
const path = require('path');
32+
const { pathToFileURL } = require('url');
33+
(async () => {
34+
const root = process.cwd();
35+
const { ObjectVectorStudioV2SchemaService } = await import(pathToFileURL(path.join(root, 'tools/object-vector-studio-v2/js/services/ObjectVectorStudioV2SchemaService.js')).href);
36+
const service = new ObjectVectorStudioV2SchemaService({
37+
fetchRef: async (url) => ({
38+
ok: true,
39+
json: async () => JSON.parse(fs.readFileSync(new URL(url), 'utf8').replace(/^\uFEFF/, ''))
40+
})
41+
});
42+
await service.loadSchema();
43+
const manifest = JSON.parse(fs.readFileSync('games/Asteroids/game.manifest.json', 'utf8').replace(/^\uFEFF/, ''));
44+
const result = service.validatePayload(manifest.game.workspace.tools['object-vector-studio-v2']);
45+
console.log(JSON.stringify({ ok: result.ok, errors: result.errors, objects: result.payload?.objects?.length }, null, 2));
46+
})();
47+
'@ | node -
48+
npm run test:workspace-v2
49+
```
50+
51+
Result:
52+
53+
```text
54+
39 passed
55+
```
56+
57+
## Playwright Coverage
58+
59+
Workspace Manager V2 coverage now verifies:
60+
61+
- Object Vector Studio V2 is listed as a Workspace Manager V2 tile.
62+
- Asteroids enables the Object Vector Studio V2 tile after repo/game selection.
63+
- Workspace Manager V2 launches Object Vector Studio V2 with `launch=workspace`, `fromTool=workspace-manager-v2`, and `hostContextId`.
64+
- Asteroids manifest/session exposes ship, asteroid, and UFO object vector assets.
65+
- Object Vector Studio V2 loads palette data from `workspace.tools.palette-manager-v2.data`, not the object schema payload.
66+
- Object Vector Studio V2 object JSON does not include `palette`.
67+
68+
## Coverage Report
69+
70+
Runtime JavaScript changed, so `docs/dev/reports/playwright_v8_coverage.txt` was refreshed from the Workspace Manager V2 Playwright run.
71+
72+
## Known Issue
73+
74+
All games fullscreen currently fullscreen the page but not the game canvas. This PR documents the issue only and does not change fullscreen game behavior.
75+
76+
Recommended follow-up PR:
77+
78+
```text
79+
PR_26132_FOLLOWUP-fullscreen-canvas-behavior
80+
- Audit shared game fullscreen behavior.
81+
- Ensure each game fullscreen action expands the canvas/render surface, not only the page shell.
82+
- Add targeted Playwright coverage for canvas dimensions before/after fullscreen.
83+
```
84+
85+
## Full Samples Smoke Test
86+
87+
Skipped. This PR is limited to Workspace Manager V2 Object Vector Studio V2 launch wiring, Asteroids object-vector payload data, and targeted Workspace Manager V2 Playwright coverage.
88+
89+
## Out Of Scope
90+
91+
- World Vector Studio V2 changes.
92+
- Deprecated Primitive Skin Editor or Vector Map Editor deletion/rename.
93+
- Fullscreen canvas behavior fix.
94+
- Full samples smoke test.
95+
96+
## Commit Comment
97+
98+
```text
99+
PR_26132_010 wires Object Vector Studio V2 into Workspace Manager V2, adds strict Asteroids object vector assets for ship/asteroids/UFOs without embedded palette data, validates workspace launch/session palette sourcing, and documents the fullscreen canvas follow-up.
100+
```

0 commit comments

Comments
 (0)