Skip to content

Commit 3c3186f

Browse files
author
DavidQ
committed
Enforce strict session contract handling and explicit EMPTY/INVALID/VALID UX across V2 tools - PR 11.202
1 parent 43b2a98 commit 3c3186f

6 files changed

Lines changed: 121 additions & 5 deletions

File tree

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# PR_11_202 Report
2+
3+
## Tool List
4+
- `tools/asset-browser-v2`
5+
- `tools/palette-manager-v2`
6+
- `tools/svg-asset-studio-v2`
7+
- `tools/tilemap-studio-v2`
8+
- `tools/vector-map-editor-v2`
9+
10+
## Files Changed
11+
- `tools/asset-browser-v2/index.js`
12+
- `tools/palette-manager-v2/index.js`
13+
- `tools/svg-asset-studio-v2/index.js`
14+
- `tools/tilemap-studio-v2/index.js`
15+
- `tools/vector-map-editor-v2/index.js`
16+
- `docs/dev/reports/PR_11_202_report.md`
17+
18+
## State Coverage Per Tool
19+
20+
### Asset Browser V2
21+
- EMPTY: **PASS**
22+
- Trigger: no `hostContextId` OR unresolved `hostContextId` session key.
23+
- On-screen message examples:
24+
- `No hostContextId was provided. Re-open Asset Browser V2 from a valid Tool V2 session link.`
25+
- `No session data was found for the provided hostContextId. Re-open Asset Browser V2 from the tools index or a host flow that creates the session context first.`
26+
- INVALID: **PASS**
27+
- Trigger: malformed or incomplete `payloadJson.assetCatalog`.
28+
- On-screen message examples:
29+
- `Asset Browser V2 session data is invalid. Expected payloadJson.assetCatalog.`
30+
- `Asset Browser V2 session data is invalid. Every entry requires id, label, kind, and path.`
31+
- VALID: **PASS**
32+
- Trigger: valid `payloadJson.assetCatalog`.
33+
- On-screen message example:
34+
- `Asset Browser V2 loaded the session asset catalog.`
35+
36+
### Palette Manager V2
37+
- EMPTY: **PASS**
38+
- Trigger: no `hostContextId` OR unresolved `hostContextId` session key.
39+
- On-screen message examples:
40+
- `No hostContextId was provided. Re-open Palette Manager V2 from a valid Tool V2 session link.`
41+
- `No session data was found for the provided hostContextId. Re-open Palette Manager V2 from the tools index or a host flow that creates the session context first.`
42+
- INVALID: **PASS**
43+
- Trigger: malformed or incomplete `paletteJson`.
44+
- On-screen message examples:
45+
- `Palette Manager V2 session data is invalid. Expected paletteJson.colors[].`
46+
- `Palette Manager V2 session data is invalid. Every paletteJson.colors[] entry must include #RRGGBB or #RRGGBBAA.`
47+
- VALID: **PASS**
48+
- Trigger: valid `paletteJson`.
49+
- On-screen message example:
50+
- `Palette Manager V2 loaded the session palette.`
51+
52+
### SVG Asset Studio V2
53+
- EMPTY: **PASS**
54+
- Trigger: no `hostContextId` OR unresolved `hostContextId` session key.
55+
- On-screen message examples:
56+
- `No hostContextId was provided. Re-open SVG Asset Studio V2 from a valid Tool V2 session link.`
57+
- `No session data was found for the provided hostContextId. Re-open SVG Asset Studio V2 from the tools index or a host flow that creates the session context first.`
58+
- INVALID: **PASS**
59+
- Trigger: malformed or incomplete `payloadJson.vectorAssetDocument`.
60+
- On-screen message examples:
61+
- `SVG Asset Studio V2 session data is invalid. Expected payloadJson.vectorAssetDocument.`
62+
- `SVG Asset Studio V2 session data is invalid. svgText must start with an <svg> document.`
63+
- VALID: **PASS**
64+
- Trigger: valid `payloadJson.vectorAssetDocument`.
65+
- On-screen message example:
66+
- `SVG Asset Studio V2 loaded the session SVG asset.`
67+
68+
### Tilemap Studio V2
69+
- EMPTY: **PASS**
70+
- Trigger: no `hostContextId` OR unresolved `hostContextId` session key.
71+
- On-screen message examples:
72+
- `No hostContextId was provided. Re-open Tilemap Studio V2 from a valid Tool V2 session link.`
73+
- `No session data was found for the provided hostContextId. Re-open Tilemap Studio V2 from the tools index or a host flow that creates the session context first.`
74+
- INVALID: **PASS**
75+
- Trigger: malformed or incomplete `payloadJson.tileMapDocument`.
76+
- On-screen message examples:
77+
- `Tilemap session data is invalid. Expected payloadJson.tileMapDocument.`
78+
- `Tilemap session data is invalid. Every layer requires name, kind, and data[].`
79+
- VALID: **PASS**
80+
- Trigger: valid `payloadJson.tileMapDocument`.
81+
- On-screen message example:
82+
- `Tilemap Studio V2 loaded the session tilemap.`
83+
84+
### Vector Map Editor V2
85+
- EMPTY: **PASS**
86+
- Trigger: no `hostContextId` OR unresolved `hostContextId` session key.
87+
- On-screen message examples:
88+
- `No hostContextId was provided. Re-open Vector Map Editor V2 from a valid Tool V2 session link.`
89+
- `No session data was found for the provided hostContextId. Re-open Vector Map Editor V2 from the tools index or a host flow that creates the session context first.`
90+
- INVALID: **PASS**
91+
- Trigger: malformed or incomplete `payloadJson.vectorMapDocument`.
92+
- On-screen message examples:
93+
- `Vector Map Editor V2 session data is invalid. Expected payloadJson.vectorMapDocument.`
94+
- `Vector Map Editor V2 session data is invalid. Every object requires name, kind, style.stroke, positive style.lineWidth, and points[].`
95+
- VALID: **PASS**
96+
- Trigger: valid `payloadJson.vectorMapDocument`.
97+
- On-screen message example:
98+
- `Vector Map Editor V2 loaded the session vector map.`
99+
100+
## Validation Commands
101+
- Attempted wildcard command:
102+
- `node --check tools/*-v2/index.js` -> **FAIL** in PowerShell path expansion for Node `--check` input.
103+
- Executed per-tool checks:
104+
- `node --check tools/asset-browser-v2/index.js` -> **PASS**
105+
- `node --check tools/palette-manager-v2/index.js` -> **PASS**
106+
- `node --check tools/svg-asset-studio-v2/index.js` -> **PASS**
107+
- `node --check tools/tilemap-studio-v2/index.js` -> **PASS**
108+
- `node --check tools/vector-map-editor-v2/index.js` -> **PASS**
109+
110+
## Message Visibility
111+
- EMPTY / INVALID / VALID messages are written to visible state nodes (`*EmptyState`, `*InvalidState`, `*ValidState` regions) in each V2 tool.
112+
113+
## Fallback Confirmation
114+
- No fallback data introduced.
115+
- No hidden sample loading introduced.
116+
- No silent failure handling introduced.

tools/asset-browser-v2/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class AssetBrowserV2 {
1818
`toolboxaid.toolHost.context.${new URL(window.location.href).searchParams.get("hostContextId")}`
1919
)
2020
) {
21-
this.renderError("No session context was found for the provided hostContextId. Re-open Asset Browser V2 from a host session that provides a valid hostContextId.");
21+
this.renderMissing("No session data was found for the provided hostContextId. Re-open Asset Browser V2 from the tools index or a host flow that creates the session context first.");
2222
return;
2323
}
2424
this.loadContract(

tools/palette-manager-v2/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class PaletteManagerV2 {
1818
`toolboxaid.toolHost.context.${new URL(window.location.href).searchParams.get("hostContextId")}`
1919
)
2020
) {
21-
this.renderError("No session context was found for the provided hostContextId. Re-open Palette Manager V2 from a host session that provides a valid hostContextId.");
21+
this.renderMissing("No session data was found for the provided hostContextId. Re-open Palette Manager V2 from the tools index or a host flow that creates the session context first.");
2222
return;
2323
}
2424
this.loadContract(

tools/svg-asset-studio-v2/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class SvgAssetStudioV2 {
1919
`toolboxaid.toolHost.context.${new URL(window.location.href).searchParams.get("hostContextId")}`
2020
)
2121
) {
22-
this.renderError("No session context was found for the provided hostContextId. Re-open SVG Asset Studio V2 from a host session that provides a valid hostContextId.");
22+
this.renderMissing("No session data was found for the provided hostContextId. Re-open SVG Asset Studio V2 from the tools index or a host flow that creates the session context first.");
2323
return;
2424
}
2525
this.loadContract(

tools/tilemap-studio-v2/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class TilemapStudioV2 {
1818
`toolboxaid.toolHost.context.${new URL(window.location.href).searchParams.get("hostContextId")}`
1919
)
2020
) {
21-
this.renderError("No session context was found for the provided hostContextId. Re-open Tilemap Studio V2 from a host session that provides a valid hostContextId.");
21+
this.renderMissing("No session data was found for the provided hostContextId. Re-open Tilemap Studio V2 from the tools index or a host flow that creates the session context first.");
2222
return;
2323
}
2424
this.loadContract(

tools/vector-map-editor-v2/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class VectorMapEditorV2 {
1818
`toolboxaid.toolHost.context.${new URL(window.location.href).searchParams.get("hostContextId")}`
1919
)
2020
) {
21-
this.renderError("No session context was found for the provided hostContextId. Re-open Vector Map Editor V2 from a host session that provides a valid hostContextId.");
21+
this.renderMissing("No session data was found for the provided hostContextId. Re-open Vector Map Editor V2 from the tools index or a host flow that creates the session context first.");
2222
return;
2323
}
2424
this.loadContract(

0 commit comments

Comments
 (0)