Skip to content

Commit e9ea07c

Browse files
author
DavidQ
committed
Show SVG Asset Studio loaded asset label in Workspace Manager - PR 11.153
1 parent b1ac1ef commit e9ea07c

5 files changed

Lines changed: 189 additions & 37 deletions

File tree

docs/dev/codex_commands.md

Lines changed: 26 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,53 @@
11
# CODEX COMMANDS
22

33
Model: GPT-5.3-codex
4-
Reasoning: high
4+
Reasoning: medium
55

66
STRICT SCOPE MODE
77

88
ALLOWED FILES:
9-
- tools/svg-asset-studio/main.js
10-
- docs/dev/reports/svg_asset_studio_hosted_payload_boot_11_152.txt
9+
- tools/workspace-manager/main.js
10+
- docs/dev/reports/workspace_svg_asset_status_label_11_153.txt
1111

1212
ALLOWED CHANGES:
13-
- fix SVG Asset Studio hosted direct payload boot
14-
- create/update report only
13+
- fix only SVG Asset Studio Workspace Manager card/status label
14+
- create/update report
1515

1616
TASK:
1717

1818
1. Open:
19-
tools/svg-asset-studio/main.js
19+
tools/workspace-manager/main.js
2020

21-
2. Find hosted launch/shared context input path.
21+
2. Find card/status label logic for:
22+
svg-asset-studio
2223

23-
3. Ensure hosted Workspace Manager payload is read as:
24-
payloadJson.vectorAssetDocument
24+
3. Update it to read direct payload:
25+
workspaceManifest.tools["svg-asset-studio"].vectorAssetDocument.sourceName
2526

26-
4. Ensure editor load/render source uses:
27-
- payloadJson.vectorAssetDocument.svgText
28-
- payloadJson.vectorAssetDocument.sourceName
29-
- payloadJson.vectorAssetDocument.editorOptions
27+
4. Display a useful label:
28+
Asset: sample-0901-ship.svg
3029

31-
5. For hosted direct payload flow:
32-
- do not require samplePresetPath
33-
- do not require import path
34-
- do not fallback to demo SVG
35-
- do not show old preset/import message when valid payload exists
36-
37-
6. Do NOT:
30+
5. Do NOT:
3831
- modify schemas
39-
- modify Sample 1902 JSON
40-
- modify Workspace Manager
41-
- modify tool host runtime
42-
- add fallback/demo/default SVG
32+
- modify samples
33+
- modify SVG Asset Studio
34+
- modify runtime
4335
- transform/wrap/normalize payload
36+
- broaden unrelated tool logic
4437

45-
7. Validate:
46-
- JS syntax for tools/svg-asset-studio/main.js
47-
- direct hosted payload containing vectorAssetDocument.svgText loads into editor state
48-
- sourceName sample-0901-ship.svg is recognized
38+
6. Validate:
39+
- JS syntax for tools/workspace-manager/main.js
40+
- Sample 1902 Workspace Manager card for SVG Asset Studio does not show Asset: none
4941
- git diff --name-only contains only ALLOWED FILES
5042

51-
8. Write:
52-
docs/dev/reports/svg_asset_studio_hosted_payload_boot_11_152.txt
43+
7. Write:
44+
docs/dev/reports/workspace_svg_asset_status_label_11_153.txt
5345

5446
Report must include:
55-
- old boot path found
56-
- new direct hosted payload path
57-
- sourceName/svgText verified
47+
- changed file
48+
- old/new label behavior
5849
- validation result
5950
- strict scope confirmation
60-
- remaining blockers if any
6151

62-
9. Package Codex output ZIP at:
63-
tmp/PR_11_152_FIX_SVG_ASSET_STUDIO_HOSTED_PAYLOAD_BOOT.zip
52+
8. Package Codex output ZIP at:
53+
tmp/PR_11_153_FIX_WORKSPACE_SVG_ASSET_STATUS_LABEL.zip

docs/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Fix SVG Asset Studio hosted direct payload boot path - PR 11.152
1+
Show SVG Asset Studio loaded asset label in Workspace Manager - PR 11.153
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Task: workspace_svg_asset_status_label_11_153
2+
Date: 2026-04-30
3+
4+
Files changed:
5+
- tools/Workspace Manager/main.js
6+
- docs/dev/reports/workspace_svg_asset_status_label_11_153.txt
7+
8+
Changed file:
9+
- tools/Workspace Manager/main.js
10+
11+
Old label behavior:
12+
- SVG Asset Studio card/status could resolve to `Asset: none` when shared asset status was not primed from direct workspace payload at card/status evaluation time.
13+
14+
New label behavior:
15+
- Workspace Manager now primes SVG asset status directly from:
16+
workspaceManifest.tools["svg-asset-studio"].vectorAssetDocument.sourceName
17+
- Primed value is written as shared vector asset label, so SVG Asset Studio card/status resolves to:
18+
`Asset: sample-0901-ship.svg` (for Sample 1902 payload)
19+
20+
Validation result:
21+
- node --check "tools/Workspace Manager/main.js" -> PASS
22+
- Direct payload source path checks in file -> PASS
23+
- explicitToolPayloadById.get("svg-asset-studio")
24+
- vectorAssetDocument?.sourceName
25+
- sourcePath: "workspace-manifest:svg-asset-studio"
26+
- Sample 1902 manifest check -> PASS
27+
- sourceName = sample-0901-ship.svg
28+
- expected label basis = Asset: sample-0901-ship.svg
29+
- git diff --name-only -- "tools/Workspace Manager/main.js" "docs/dev/reports/workspace_svg_asset_status_label_11_153.txt" -> PASS
30+
31+
Strict scope confirmation:
32+
- Only Workspace Manager main file and this report were changed.
33+
- No schema/sample/SVG-Asset-Studio/runtime/Workspace-Manager routing outside this file were modified.
34+
35+
Remaining blockers:
36+
- None in this scoped fix.
37+
- Repository has unrelated pre-existing dirty files outside this task scope.
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# BUILD_PR_LEVEL_11_153_FIX_WORKSPACE_SVG_ASSET_STATUS_LABEL
2+
3+
## Purpose
4+
Fix Workspace Manager card/status display for SVG Asset Studio so Sample 1902 shows the loaded vector asset instead of `Asset: none`.
5+
6+
## Current State
7+
SVG Asset Studio is present under Vector Assets, but Workspace Manager still shows:
8+
9+
`Asset: none`
10+
11+
This means the card/status layer does not recognize the direct `vectorAssetDocument` payload for SVG Asset Studio.
12+
13+
## STRICT SCOPE
14+
15+
### ALLOWED FILES
16+
- tools/workspace-manager/main.js
17+
- docs/dev/reports/workspace_svg_asset_status_label_11_153.txt
18+
19+
### ALLOWED CHANGES
20+
- update only SVG Asset Studio card/status label detection
21+
- recognize direct `workspaceManifest.tools["svg-asset-studio"].vectorAssetDocument`
22+
- display a useful asset label from `vectorAssetDocument.sourceName`
23+
- create report
24+
25+
## FORBIDDEN
26+
27+
Codex MUST NOT:
28+
- modify schemas
29+
- modify Sample 1902 JSON
30+
- modify SVG Asset Studio
31+
- modify tool host runtime
32+
- modify other tools
33+
- add fallback/default/demo data
34+
- wrap/transform/normalize the payload
35+
- broaden status logic for unrelated tools
36+
37+
## Required Behavior
38+
39+
Given:
40+
41+
```json
42+
"svg-asset-studio": {
43+
"vectorAssetDocument": {
44+
"sourceName": "sample-0901-ship.svg",
45+
"svgText": "<svg ...>"
46+
}
47+
}
48+
```
49+
50+
Workspace Manager must display:
51+
52+
`Asset: sample-0901-ship.svg`
53+
54+
or an equivalent useful label derived directly from `vectorAssetDocument.sourceName`.
55+
56+
## Required Validation
57+
58+
Targeted validation only.
59+
60+
Required:
61+
- Workspace Manager Sample 1902 card for SVG Asset Studio no longer shows `Asset: none`.
62+
- SVG Asset Studio status label uses direct payload data.
63+
- No sample/schema/tool runtime files changed.
64+
- `git diff --name-only` contains only ALLOWED FILES.
65+
66+
## Report
67+
68+
Write:
69+
70+
- `docs/dev/reports/workspace_svg_asset_status_label_11_153.txt`
71+
72+
Report must include:
73+
- file changed
74+
- previous label behavior
75+
- new label behavior
76+
- validation command/result
77+
- strict scope confirmation
78+
79+
## Full Samples Smoke Test
80+
81+
Skipped.
82+
83+
Reason:
84+
- targeted Workspace Manager SVG card label fix only
85+
- full samples smoke test takes approximately 20 minutes
86+
87+
## Acceptance
88+
89+
- SVG Asset Studio card shows the direct vector asset name.
90+
- Payload remains direct and unchanged.
91+
- No unrelated tools changed.

tools/Workspace Manager/main.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,39 @@ function readWorkspaceDirectCardLabel(toolId = "") {
321321
return normalizeTextParam(labelsByToolId.get(toolId) || "");
322322
}
323323

324+
function primeSvgAssetStatusLabelFromWorkspaceDiagnostics(diagnostics = null) {
325+
const explicitToolPayloadById = diagnostics?.explicitToolPayloadById instanceof Map
326+
? diagnostics.explicitToolPayloadById
327+
: null;
328+
if (!explicitToolPayloadById) {
329+
return false;
330+
}
331+
const svgPayload = explicitToolPayloadById.get("svg-asset-studio");
332+
if (!isPlainObject(svgPayload)) {
333+
return false;
334+
}
335+
const vectorAssetDocument = readDirectPayloadDocument(svgPayload, "vectorAssetDocument");
336+
const sourceName = normalizeTextParam(vectorAssetDocument?.sourceName);
337+
if (!sourceName) {
338+
return false;
339+
}
340+
const assetHandoff = createAssetHandoff({
341+
assetId: sourceName,
342+
assetType: "vector",
343+
sourcePath: "workspace-manifest:svg-asset-studio",
344+
displayName: sourceName,
345+
metadata: {
346+
source: "workspace-manifest.direct-payload",
347+
toolId: "svg-asset-studio"
348+
},
349+
sourceToolId: "workspace-manager"
350+
});
351+
if (!assetHandoff) {
352+
return false;
353+
}
354+
return writeSharedAssetHandoff(assetHandoff);
355+
}
356+
324357
function writeSharedBindingsFromDirectPayload(toolId = "", payloadJson = null, paletteJson = null) {
325358
if (isPlainObject(paletteJson)
326359
&& paletteJson.schema === "html-js-gaming.palette"
@@ -1318,6 +1351,7 @@ function applyToolsUsedFilterForGame(gameEntry, preferredToolId = "", workspaceT
13181351

13191352
if (workspaceManifestToolDiagnostics) {
13201353
workspaceManifestToolDiagnostics.visibleToolIds = [...toolIds];
1354+
primeSvgAssetStatusLabelFromWorkspaceDiagnostics(workspaceManifestToolDiagnostics);
13211355
}
13221356

13231357
const initialToolId = toolIds.includes(preferredToolId) ? preferredToolId : "";

0 commit comments

Comments
 (0)