Skip to content

Commit 155f1d9

Browse files
author
DavidQ
committed
Normalize shared header and theme usage across all V2 tools with no drift or inline styling - PR 11.203. Add valid-session fixture smoke coverage for all V2 tools without production fallback data - PR 11.204.
1 parent 3c3186f commit 155f1d9

9 files changed

Lines changed: 512 additions & 0 deletions
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# PR_11_203B Report
2+
3+
## Files Changed
4+
- `tests/runtime/V2ToolSmoke.test.mjs`
5+
- `docs/dev/reports/PR_11_203B_report.md`
6+
7+
## Test Added
8+
- `tests/runtime/V2ToolSmoke.test.mjs`
9+
10+
### Test Purpose
11+
Scans `tools/*-v2` directories and verifies each V2 tool has:
12+
- `index.html`
13+
- `index.js`
14+
- `<div id="shared-theme-header"></div>`
15+
- `mount-shared-header.js` import
16+
- `data-tool-id` ending in `-v2`
17+
- title/text ending in `V2` (HTML `<title>` + JS `document.title`)
18+
- visible state-region IDs for empty/invalid/valid (`*EmptyState`, `*InvalidState`, `*ValidState`)
19+
20+
## Commands Run
21+
- `node --check tests/runtime/V2ToolSmoke.test.mjs`
22+
- `node tests/runtime/V2ToolSmoke.test.mjs`
23+
24+
## Command Results
25+
- `node --check tests/runtime/V2ToolSmoke.test.mjs` -> **PASS**
26+
- `node tests/runtime/V2ToolSmoke.test.mjs` -> **PASS**
27+
28+
## Runtime Test Output Summary
29+
- Tool count scanned: `5`
30+
- Failures: `0`
31+
- Results artifact:
32+
- `tmp/v2-tool-smoke-results.json`
33+
34+
## Notes
35+
- No fallback logic was introduced by this PR.
36+
- This PR adds executable validation coverage only.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# PR_11_203 Report
2+
3+
## Files Changed
4+
- `docs/dev/reports/PR_11_203_report.md`
5+
6+
## Tools Validated
7+
- `tools/asset-browser-v2/index.html`
8+
- `tools/palette-manager-v2/index.html`
9+
- `tools/svg-asset-studio-v2/index.html`
10+
- `tools/tilemap-studio-v2/index.html`
11+
- `tools/vector-map-editor-v2/index.html`
12+
- `tools/asset-browser-v2/index.js`
13+
- `tools/palette-manager-v2/index.js`
14+
- `tools/svg-asset-studio-v2/index.js`
15+
- `tools/tilemap-studio-v2/index.js`
16+
- `tools/vector-map-editor-v2/index.js`
17+
18+
## Header Consistency Check
19+
- All V2 tools include exactly one shared header mount node:
20+
- `<div id="shared-theme-header"></div>`
21+
- All V2 tools include exactly one shared header mount script:
22+
- `<script type="module" src="../../src/engine/theme/mount-shared-header.js"></script>`
23+
- No tool-specific header implementation paths were added.
24+
- V2 titles are consistent and end with `V2` in each tool HTML and JS title assignment.
25+
26+
## Theme Consistency Check
27+
- All V2 tools include exactly one import of:
28+
- `../../src/engine/theme/main.css`
29+
- `../../src/engine/ui/hubCommon.css`
30+
- No duplicate theme imports were found in V2 HTML files.
31+
- No dynamic theme-style injection paths (`createElement("style")`, `insertAdjacentHTML` style injection) were found in V2 JS files.
32+
- No `Configuration error` fallback text was found in V2 tool HTML/JS sources.
33+
34+
## Inline Style Confirmation
35+
- No inline `style="..."` attributes are present in V2 `index.html` files.
36+
- No dynamic style-tag injection exists in V2 `index.js` files.
37+
- Header/theme normalization introduced no inline style overrides.
38+
39+
## Validation Commands
40+
- Attempted as specified:
41+
- `node --check tools/*-v2/index.js` -> fails in this PowerShell context because Node does not resolve wildcard path input for `--check`.
42+
- Executed equivalent per-file validation:
43+
- `node --check tools/asset-browser-v2/index.js` -> **PASS**
44+
- `node --check tools/palette-manager-v2/index.js` -> **PASS**
45+
- `node --check tools/svg-asset-studio-v2/index.js` -> **PASS**
46+
- `node --check tools/tilemap-studio-v2/index.js` -> **PASS**
47+
- `node --check tools/vector-map-editor-v2/index.js` -> **PASS**
48+
49+
## Result
50+
- Header and theme usage across all V2 tools is already normalized and consistent.
51+
- No code changes were required beyond this execution-backed evidence report.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# PR_11_204 Report
2+
3+
## Fixtures Added
4+
- `tests/fixtures/v2-tools/asset-browser-v2.json`
5+
- `tests/fixtures/v2-tools/palette-manager-v2.json`
6+
- `tests/fixtures/v2-tools/svg-asset-studio-v2.json`
7+
- `tests/fixtures/v2-tools/tilemap-studio-v2.json`
8+
- `tests/fixtures/v2-tools/vector-map-editor-v2.json`
9+
10+
## Smoke Checks Added
11+
Updated `tests/runtime/V2ToolSmoke.test.mjs` to extend coverage beyond static structure checks.
12+
For each required V2 tool, the test now verifies:
13+
- fixture file exists at `tests/fixtures/v2-tools/<tool>.json`
14+
- fixture is valid JSON
15+
- fixture contains non-empty `hostContextId`
16+
- fixture contains valid tool-specific payload in `sessionContext`
17+
- `asset-browser-v2`: `payloadJson.assetCatalog`
18+
- `palette-manager-v2`: `paletteJson`
19+
- `svg-asset-studio-v2`: `payloadJson.vectorAssetDocument`
20+
- `tilemap-studio-v2`: `payloadJson.tileMapDocument`
21+
- `vector-map-editor-v2`: `payloadJson.vectorMapDocument`
22+
23+
The test continues to write results to:
24+
- `tmp/v2-tool-smoke-results.json`
25+
26+
## Commands Run
27+
- `node --check tests/runtime/V2ToolSmoke.test.mjs`
28+
- `node tests/runtime/V2ToolSmoke.test.mjs`
29+
30+
## Command Output Summary
31+
- `node --check tests/runtime/V2ToolSmoke.test.mjs` -> **PASS**
32+
- `node tests/runtime/V2ToolSmoke.test.mjs` -> **PASS**
33+
- Runtime summary:
34+
- `toolCount: 5`
35+
- `failures: 0`
36+
- fixture checks: all PASS across all five tools
37+
38+
## Confirmation
39+
- No production fallback/demo data was added.
40+
- No V2 tool implementation files were modified in this PR.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"hostContextId": "asset-browser-v2-fixture",
3+
"sessionContext": {
4+
"toolId": "asset-browser-v2",
5+
"payloadJson": {
6+
"assetCatalog": {
7+
"name": "Fixture Asset Catalog",
8+
"entries": [
9+
{
10+
"id": "asset-001",
11+
"label": "Player Ship",
12+
"kind": "svg",
13+
"path": "assets/vectors/player-ship.svg"
14+
}
15+
]
16+
}
17+
}
18+
}
19+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"hostContextId": "palette-manager-v2-fixture",
3+
"sessionContext": {
4+
"toolId": "palette-manager-v2",
5+
"paletteJson": {
6+
"name": "Fixture Palette",
7+
"colors": [
8+
"#112233",
9+
{
10+
"name": "Accent",
11+
"hex": "#FF6600"
12+
}
13+
]
14+
}
15+
}
16+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"hostContextId": "svg-asset-studio-v2-fixture",
3+
"sessionContext": {
4+
"toolId": "svg-asset-studio-v2",
5+
"payloadJson": {
6+
"vectorAssetDocument": {
7+
"sourceName": "fixture-icon.svg",
8+
"svgText": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><circle cx=\"8\" cy=\"8\" r=\"6\" fill=\"#00AAFF\"/></svg>"
9+
}
10+
}
11+
}
12+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"hostContextId": "tilemap-studio-v2-fixture",
3+
"sessionContext": {
4+
"toolId": "tilemap-studio-v2",
5+
"payloadJson": {
6+
"tileMapDocument": {
7+
"map": {
8+
"name": "Fixture Tilemap",
9+
"width": 4,
10+
"height": 3
11+
},
12+
"layers": [
13+
{
14+
"name": "Ground",
15+
"kind": "tiles",
16+
"data": [
17+
[1, 1, 1, 1],
18+
[1, 0, 0, 1],
19+
[1, 1, 1, 1]
20+
]
21+
}
22+
]
23+
}
24+
}
25+
}
26+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"hostContextId": "vector-map-editor-v2-fixture",
3+
"sessionContext": {
4+
"toolId": "vector-map-editor-v2",
5+
"payloadJson": {
6+
"vectorMapDocument": {
7+
"name": "Fixture Vector Map",
8+
"width": 320,
9+
"height": 180,
10+
"background": "#101820",
11+
"objects": [
12+
{
13+
"name": "Path A",
14+
"kind": "polyline",
15+
"style": {
16+
"stroke": "#33CC66",
17+
"lineWidth": 2
18+
},
19+
"points": [
20+
{ "x": 20, "y": 40 },
21+
{ "x": 140, "y": 90 },
22+
{ "x": 260, "y": 60 }
23+
]
24+
}
25+
]
26+
}
27+
}
28+
}
29+
}

0 commit comments

Comments
 (0)