Skip to content

Commit e9fdb84

Browse files
author
DavidQ
committed
Trim Object Vector Studio V2 schema to durable object data and remove palette/startup state - PR_26132_009-object-vector-studio-v2-schema-trim
1 parent 4864d1b commit e9fdb84

7 files changed

Lines changed: 366 additions & 295 deletions

File tree

docs/dev/reports/playwright_v8_coverage.txt

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ Exercised tool entry points detected:
2121

2222
Changed runtime JS files covered:
2323
(80%) tools/object-vector-studio-v2/js/bootstrap.js - executed lines 70/70; executed functions 4/5
24-
(89%) tools/object-vector-studio-v2/js/ToolStarterApp.js - executed lines 1541/1541; executed functions 166/187
25-
(94%) tools/object-vector-studio-v2/js/services/ObjectVectorStudioV2SchemaService.js - executed lines 249/249; executed functions 31/33
24+
(90%) tools/object-vector-studio-v2/js/ToolStarterApp.js - executed lines 1592/1592; executed functions 170/189
25+
(92%) tools/object-vector-studio-v2/js/services/ObjectVectorStudioV2SchemaService.js - executed lines 286/286; executed functions 33/36
2626

2727
Files with executed line/function counts where available:
2828
(2%) src/engine/input/ActionInputService.js - executed lines 397/397; executed functions 1/51
@@ -46,6 +46,7 @@ Files with executed line/function counts where available:
4646
(14%) src/engine/scene/TransitionScene.js - executed lines 58/58; executed functions 1/7
4747
(15%) games/Asteroids/game/AsteroidsAttractAdapter.js - executed lines 229/229; executed functions 3/20
4848
(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
4950
(16%) src/engine/audio/AudioService.js - executed lines 258/258; executed functions 4/25
5051
(17%) src/engine/camera/Camera2D.js - executed lines 44/44; executed functions 1/6
5152
(17%) src/engine/collision/polygon.js - executed lines 73/73; executed functions 1/6
@@ -92,6 +93,7 @@ Files with executed line/function counts where available:
9293
(33%) src/engine/persistence/WorldSerializer.js - executed lines 12/12; executed functions 1/3
9394
(33%) src/engine/runtime/MobileRuntimeTweaks.js - executed lines 21/21; executed functions 1/3
9495
(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
9597
(33%) tools/shared/projectSystemValueUtils.js - executed lines 9/9; executed functions 1/3
9698
(33%) tools/shared/uiSafeUtils.js - executed lines 32/32; executed functions 2/6
9799
(36%) games/Asteroids/index.js - executed lines 179/179; executed functions 4/11
@@ -143,7 +145,6 @@ Files with executed line/function counts where available:
143145
(64%) games/Pong/game/PongScene.js - executed lines 521/521; executed functions 21/33
144146
(65%) tools/palette-manager-v2/controls/SourcePaletteBrowserControl.js - executed lines 121/121; executed functions 15/23
145147
(67%) games/Asteroids/utils/math.js - executed lines 14/14; executed functions 2/3
146-
(67%) src/shared/number/numberUtils.js - executed lines 14/14; executed functions 2/3
147148
(67%) tools/asset-manager-v2/js/controls/AssetManagerShellControl.js - executed lines 100/100; executed functions 8/12
148149
(67%) tools/palette-manager-v2/modules/paletteUtils.js - executed lines 41/41; executed functions 6/9
149150
(67%) tools/world-vector-studio-v2/js/controls/ToolStarterShellControl.js - executed lines 111/111; executed functions 8/12
@@ -179,7 +180,6 @@ Files with executed line/function counts where available:
179180
(80%) tools/preview-generator-v2/PreviewGeneratorV2Logger.js - executed lines 19/19; executed functions 4/5
180181
(80%) tools/workspace-manager-v2/js/controls/AccordionSection.js - executed lines 27/27; executed functions 4/5
181182
(80%) tools/world-vector-studio-v2/js/controls/AccordionSection.js - executed lines 27/27; executed functions 4/5
182-
(81%) samples/shared/sampleDetailPageEnhancement.js - executed lines 471/471; executed functions 35/43
183183
(82%) src/engine/rendering/CanvasRenderer.js - executed lines 100/100; executed functions 9/11
184184
(82%) tools/session-inspector-v2/js/controls/EntryListControl.js - executed lines 59/59; executed functions 9/11
185185
(83%) tools/palette-manager-v2/main.js - executed lines 227/227; executed functions 15/18
@@ -195,8 +195,8 @@ Files with executed line/function counts where available:
195195
(88%) tools/text2speech-V2/js/controls/TextInputControl.js - executed lines 24/24; executed functions 7/8
196196
(88%) tools/world-vector-studio-v2/js/controls/SourceInputControl.js - executed lines 33/33; executed functions 7/8
197197
(89%) tools/asset-manager-v2/js/services/AssetSchemaValidator.js - executed lines 295/295; executed functions 25/28
198-
(89%) tools/object-vector-studio-v2/js/ToolStarterApp.js - executed lines 1541/1541; executed functions 166/187
199198
(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
200200
(90%) tools/palette-manager-v2/modules/PaletteValidationService.js - executed lines 88/88; executed functions 9/10
201201
(90%) tools/text2speech-V2/js/controls/ActionNavControl.js - executed lines 117/117; executed functions 19/21
202202
(90%) tools/text2speech-V2/js/TextToSpeechToolApp.js - executed lines 807/807; executed functions 62/69
@@ -205,14 +205,14 @@ Files with executed line/function counts where available:
205205
(91%) tools/toolRegistry.js - executed lines 526/526; executed functions 10/11
206206
(91%) tools/workspace-manager-v2/js/services/WorkspaceManagerV2ContextService.js - executed lines 1583/1583; executed functions 145/159
207207
(92%) tools/object-vector-studio-v2/js/controls/ToolStarterShellControl.js - executed lines 112/112; executed functions 11/12
208+
(92%) tools/object-vector-studio-v2/js/services/ObjectVectorStudioV2SchemaService.js - executed lines 286/286; executed functions 33/36
208209
(93%) tools/asset-manager-v2/js/services/WorkspaceBridge.js - executed lines 305/305; executed functions 25/27
209210
(93%) tools/session-inspector-v2/js/SessionInspectorV2App.js - executed lines 337/337; executed functions 42/45
210211
(93%) tools/text2speech-V2/js/controls/QueueControl.js - executed lines 122/122; executed functions 26/28
211212
(93%) tools/workspace-manager-v2/js/controls/GameSelectorControl.js - executed lines 59/59; executed functions 13/14
212213
(93%) tools/workspace-manager-v2/js/controls/ToolTilesControl.js - executed lines 130/130; executed functions 14/15
213214
(94%) games/shared/workspaceGameMetadataHydrator.js - executed lines 106/106; executed functions 16/17
214215
(94%) tools/common/PaletteSortService.js - executed lines 103/103; executed functions 17/18
215-
(94%) tools/object-vector-studio-v2/js/services/ObjectVectorStudioV2SchemaService.js - executed lines 249/249; executed functions 31/33
216216
(95%) tools/session-inspector-v2/js/services/SessionInspectorV2StorageService.js - executed lines 142/142; executed functions 18/19
217217
(100%) games/Asteroids/flow/attract.js - executed lines 17/17; executed functions 1/1
218218
(100%) games/Asteroids/flow/highscore.js - executed lines 16/16; executed functions 1/1
@@ -293,6 +293,7 @@ Uncovered or low-coverage changed JS files:
293293

294294
Changed JS files considered:
295295
(0%) tests/playwright/tools/WorkspaceManagerV2.spec.mjs - changed JS file not collected as browser runtime coverage
296+
(0%) tools/object-vector-studio-v2/tests/playwright/FirstClassToolStarter.spec.mjs - changed JS file not collected as browser runtime coverage
296297
(80%) tools/object-vector-studio-v2/js/bootstrap.js - changed JS file with browser V8 coverage
297-
(89%) tools/object-vector-studio-v2/js/ToolStarterApp.js - changed JS file with browser V8 coverage
298-
(94%) tools/object-vector-studio-v2/js/services/ObjectVectorStudioV2SchemaService.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+
(92%) tools/object-vector-studio-v2/js/services/ObjectVectorStudioV2SchemaService.js - changed JS file with browser V8 coverage
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# PR_26132_009-object-vector-studio-v2-schema-trim
2+
3+
## Purpose
4+
5+
Trim Object Vector Studio V2 saved JSON to durable asset data only and keep palette/startup state out of object exports.
6+
7+
## Scope
8+
9+
- Updated `tools/schemas/tools/object-vector-studio-v2.schema.json` per the repo schema location rule.
10+
- Root object payload now allows only `version`, `toolId`, `name`, and `objects`.
11+
- Removed root `palette`, `selection`, `viewport`, and `export` from the object schema.
12+
- Removed object/shape metadata drift fields from saved object and shape mutation paths.
13+
- Runtime now loads palette data separately from `paletteSourcePath`, `object-vector-studio-v2.runtimePalette`, or `workspace.tools.palette-manager-v2.data`.
14+
- Import/Copy JSON/Export JSON validate through the trimmed object schema and do not include palette or startup state.
15+
- Missing runtime palette is logged as a visible render-only `FAIL` instead of being accepted as object JSON.
16+
17+
## Validation
18+
19+
Commands run:
20+
21+
```powershell
22+
node --check tools/object-vector-studio-v2/js/ToolStarterApp.js
23+
node --check tools/object-vector-studio-v2/js/services/ObjectVectorStudioV2SchemaService.js
24+
node -e "JSON.parse(require('fs').readFileSync('tools/schemas/tools/object-vector-studio-v2.schema.json','utf8')); console.log('schema json ok')"
25+
npx playwright test tests/playwright/tools/WorkspaceManagerV2.spec.mjs --project=playwright --workers=1 --reporter=list -g "shows Object Vector Studio V2 layout shell"
26+
npm run test:workspace-v2
27+
```
28+
29+
Result:
30+
31+
```text
32+
39 passed
33+
```
34+
35+
## Coverage
36+
37+
Updated `docs/dev/reports/playwright_v8_coverage.txt` from the Workspace Manager V2 Playwright run.
38+
39+
Changed runtime JS coverage includes:
40+
41+
```text
42+
(90%) tools/object-vector-studio-v2/js/ToolStarterApp.js
43+
(92%) tools/object-vector-studio-v2/js/services/ObjectVectorStudioV2SchemaService.js
44+
```
45+
46+
## Playwright Coverage
47+
48+
The Workspace Manager V2 suite now covers:
49+
50+
- Valid trimmed schema import.
51+
- Palette rejection from object JSON.
52+
- Startup state rejection for `selection`, `viewport`, and `export`.
53+
- Missing session/runtime palette visible render failure.
54+
- Copy/export JSON excluding palette and startup state.
55+
56+
## Full Samples Smoke Test
57+
58+
Skipped. This PR is limited to Object Vector Studio V2 schema/runtime JSON trimming and targeted Workspace Manager V2 Playwright coverage.
59+
60+
## Out Of Scope
61+
62+
- World Vector Studio V2 runtime changes.
63+
- Deprecated SVG Asset Studio, Primitive Skin Editor, or Vector Map Editor changes.
64+
- Workspace Manager schema contract changes.
65+
- Full samples smoke test.

0 commit comments

Comments
 (0)