Skip to content

Commit c77a97c

Browse files
author
DavidQ
committed
Move V2 static shell into index.html and keep tool JavaScript behavior-only - PR 11.192
1 parent 8c731cd commit c77a97c

12 files changed

Lines changed: 484 additions & 412 deletions

File tree

docs/dev/codex_commands.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
1-
# Codex Commands — PR_11_191 Vector Map Editor V2
1+
# Codex Commands — PR_11_192
22

33
## Model
4-
GPT-5.4-codex
4+
GPT-5.4
55

66
## Reasoning
7-
High
7+
high
88

99
## Command
10-
```powershell
11-
codex --model gpt-5.4-codex --reasoning high "Apply PR_11_191 exactly as documented in docs/pr/PR_11_191_VECTOR_MAP_EDITOR_V2_REENGINEER_PLAN.md. Re-engineer Vector Map Editor V2 only. Do not copy/paste legacy tool code. Do not modify schemas, samples, games, Workspace Manager v1, platformShell, assetUsageIntegration, or tools/shared. Use session-backed data only. Visible tool name must end with V2. Header must use the /index.html shared theme header mount: <div id="shared-theme-header"></div>. Keep implementation to a single tool file and single class unless the existing repo entry file requires only wiring to that one class. No helper classes, no alias variables, no abstraction layers, no fallback/default data. Add targeted validation and write findings to docs/dev/reports/PR_11_191_VECTOR_MAP_EDITOR_V2_VALIDATION.md. Do not run full samples smoke test."
12-
```
10+
codex exec --model gpt-5.4 --reasoning high "Apply PR_11_192 exactly as documented in docs/pr/PR_11_192_v2_html_shell_correction.md. Correct V2 tools so index.html owns the static shell, CSS links, shared header mount, page layout, menuTool/menuWorkspace containers, and module script. Keep index.js behavior-only: title/tool id setup, session read, validation, DOM population, rendering, and empty/error states. Do not inject CSS or replace document.body.innerHTML from JS. Do not touch schemas, samples, games, Workspace Manager v1, platformShell, tools/shared, or legacy tools. Return a ZIP at tmp/PR_11_192_20260501_01.zip."
1311

14-
## Targeted Validation
15-
```powershell
12+
## Targeted validation
13+
node --check tools/palette-manager-v2/index.js
14+
node --check tools/svg-asset-studio-v2/index.js
1615
node --check tools/vector-map-editor-v2/index.js
17-
```
1816

19-
If the exact file name differs after Codex creates the V2 lane structure, run `node --check` on the created Vector Map Editor V2 entry file only.
17+
Skip any validation command only if the file does not exist and document why in docs/dev/reports/PR_11_192_validation.md.
2018

21-
## Full Samples Smoke Test
22-
Skipped by default. Reason: this PR is limited to one V2 tool and does not modify shared sample loader/framework.
19+
## Manual validation
20+
Open each corrected V2 tool directly and verify:
21+
- shared header renders from `<div id="shared-theme-header"></div>`
22+
- static page shell is visible before session data
23+
- empty session shows explicit empty state
24+
- valid session renders without legacy coupling

docs/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Re-engineer Vector Map Editor V2 with session-only data and shared header compliance - PR 11.191
1+
Move V2 static shell into index.html and keep tool JavaScript behavior-only - PR 11.192
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# PR_11_192 Validation
2+
3+
## Purpose
4+
Correct V2 tools so `index.html` owns the static shell and `index.js` remains behavior-only.
5+
6+
## Changed Files
7+
- `tools/palette-manager-v2/index.html`
8+
- `tools/palette-manager-v2/index.js`
9+
- `tools/svg-asset-studio-v2/index.html`
10+
- `tools/svg-asset-studio-v2/index.js`
11+
- `tools/vector-map-editor-v2/index.html`
12+
- `tools/vector-map-editor-v2/index.js`
13+
- `docs/dev/reports/PR_11_192_validation.md`
14+
15+
## Removed Superseded V2 Paths
16+
- `tools/Palette Manager v2/main.js`
17+
- `tools/SVG Asset Studio v2/main.js`
18+
19+
## HTML Shell Correction
20+
- Each V2 tool now has a static `index.html`.
21+
- Each `index.html` owns CSS links, `<div id="shared-theme-header"></div>`, page shell, accordion, `menuTool`, `menuWorkspace`, stable DOM nodes, shared header module script, and tool module script.
22+
- Each `index.js` is behavior-only: title/tool id setup, session read, validation, DOM population, rendering, and empty/error states.
23+
- JS no longer injects CSS, appends the shared header script, or replaces `document.body.innerHTML`.
24+
25+
## Targeted Validation
26+
All requested validation commands were run. No validation command was skipped.
27+
28+
```powershell
29+
node --check tools/palette-manager-v2/index.js
30+
node --check tools/svg-asset-studio-v2/index.js
31+
node --check tools/vector-map-editor-v2/index.js
32+
```
33+
34+
Results:
35+
- `node --check tools/palette-manager-v2/index.js` passed.
36+
- `node --check tools/svg-asset-studio-v2/index.js` passed.
37+
- `node --check tools/vector-map-editor-v2/index.js` passed.
38+
39+
## Guard Scan
40+
A targeted file-content guard scan checked the corrected V2 tool folders for forbidden shell-building and legacy coupling markers:
41+
42+
- `document.body.innerHTML`
43+
- `insertAdjacentHTML`
44+
- dynamic shared header script creation/append
45+
- `<style>`
46+
- `platformShell`
47+
- `assetUsageIntegration`
48+
- `tools/shared`
49+
- `Workspace Manager`
50+
- `handoff`
51+
- `fallback`
52+
- `default data`
53+
- `demo data`
54+
- static imports/exports
55+
56+
Result: passed. No matches.
57+
58+
## Scope Guard
59+
No changes were made to:
60+
61+
- schemas
62+
- samples
63+
- games
64+
- `start_of_day/**`
65+
- Workspace Manager v1
66+
- `platformShell`
67+
- `tools/shared/**`
68+
- legacy tools
69+
70+
## Manual Validation
71+
Manual browser validation was not run from this terminal session. The static shells are present for direct opening and expose explicit empty states before session data.
72+
73+
## Full Samples Smoke Decision
74+
Full samples smoke test skipped.
75+
76+
Reason: PR 11.192 is limited to V2 static shell separation and targeted direct tool validation. It does not modify shared sample loader/framework behavior.
77+
78+
## ZIP Artifact
79+
80+
```text
81+
tmp/PR_11_192_20260501_01.zip
82+
```
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# PR_11_192_20260501_01 — V2 Tool HTML Shell Correction
2+
3+
## Purpose
4+
Correct the V2 tool implementation direction so static page structure lives in `tools/<tool>-v2/index.html` and JavaScript stays behavior-only.
5+
6+
## Scope
7+
- Palette Manager V2
8+
- SVG Asset Studio V2
9+
- Vector Map Editor V2 if present from the current lane
10+
11+
## Required correction
12+
Each V2 tool must use:
13+
14+
```text
15+
tools/<tool>-v2/index.html
16+
- static CSS links
17+
- <div id="shared-theme-header"></div>
18+
- static page shell
19+
- static menuTool/menuWorkspace containers
20+
- module script reference
21+
22+
tools/<tool>-v2/index.js
23+
- single class behavior
24+
- read session
25+
- validate contract
26+
- populate existing DOM nodes
27+
- render valid/empty/error states
28+
```
29+
30+
## Forbidden
31+
- Do not build body HTML inside JavaScript.
32+
- Do not inject CSS from JavaScript.
33+
- Do not append the shared header script dynamically from JavaScript.
34+
- Do not overwrite `document.body.innerHTML`.
35+
- Do not use `palette-manager` for V2 body dataset/tool id.
36+
- Do not touch schemas, samples, games, Workspace Manager v1, `platformShell`, or `tools/shared/*`.
37+
38+
## Acceptance
39+
- `index.html` owns static shell and header mount.
40+
- `index.js` owns behavior only.
41+
- V2 tool id/name uses explicit `V2` naming and `*-v2` identifiers.
42+
- Header mount is present as `<div id="shared-theme-header"></div>`.
43+
- Empty/error/valid states remain testable through stable DOM ids.

tools/Palette Manager v2/main.js

Lines changed: 0 additions & 182 deletions
This file was deleted.

0 commit comments

Comments
 (0)