Skip to content

Commit 16c648d

Browse files
author
DavidQ
committed
Enforce HTML-first V2 shells for remaining re-engineered tools - PR 11.194. Convert remaining V2 tools to HTML-first session-only architecture - PR 11.195.
1 parent 0771648 commit 16c648d

9 files changed

Lines changed: 444 additions & 70 deletions

docs/dev/codex_commands.md

Lines changed: 30 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,33 @@
1-
# Codex Commands — PR_11_193C
1+
# Codex Commands — PR_11_195
22

3-
## Model
4-
Use GPT-5.3-codex or available Codex implementation model.
5-
Reasoning: high.
3+
Model: GPT-5.4-codex
4+
Reasoning: high
65

76
## Command
8-
From repo root:
9-
10-
```powershell
11-
cd C:\Users\davidq\Documents\GitHub\HTML-JavaScript-Gaming
12-
```
13-
14-
Run Codex with this exact task:
15-
16-
```text
17-
Implement PR_11_193C exactly as described in docs/pr/PR_11_193C_V2_HTML_FIRST_BATCH.md.
18-
19-
This is a V2 re-engineer batch, not legacy copy/paste.
20-
21-
You must write the implementation code. ChatGPT did not provide implementation files.
22-
23-
Scope only:
24-
- Palette Manager V2
25-
- SVG Asset Studio V2
26-
- Vector Map Editor V2
27-
- Tilemap Studio V2
28-
- Asset Browser V2
29-
30-
Do not change schemas, samples, games, Workspace Manager v1, platformShell, assetUsageIntegration, tools/shared/*, or start_of_day folders.
31-
32-
Make each V2 tool HTML-first:
33-
- tools/<tool>-v2/index.html owns CSS links, shared header mount, static layout, static state containers, menus, and module script tags.
34-
- index.html must include <div id="shared-theme-header"></div>.
35-
- index.js must be behavior-only: document title/dataset, session read, validation, event binding, dynamic render into existing DOM nodes.
36-
- Remove JS-driven page construction such as document.body.innerHTML, document.head.insertAdjacentHTML style blocks, dynamic header script injection, and static layout template strings.
37-
- Keep one class per tool file.
38-
- No helper classes, no alias variables, no pass-through variables, no abstraction layers.
39-
- No fallback/default data.
40-
- Session-backed data only.
41-
- Tool names must end with V2.
42-
43-
Validation required:
44-
- Run syntax checks for each changed JS file.
45-
- Run targeted tool launch/HTML validation available in the repo for these tools.
46-
- Do not run full samples smoke unless you changed shared sample loader/framework code.
47-
- Write validation evidence to docs/dev/reports/PR_11_193C_validation.md.
48-
49-
Before finishing:
50-
- Review diff for unrelated changes and remove them.
51-
- Confirm no implementation touched banned paths.
52-
- Confirm no schema/sample/game changes.
53-
- Create final Codex ZIP at tmp/PR_11_193C_20260501_Codex.zip preserving repo structure.
54-
```
55-
56-
## Expected Evidence File
57-
Codex must create:
58-
59-
```text
60-
docs/dev/reports/PR_11_193C_validation.md
61-
```
62-
63-
It must include:
64-
- files changed
65-
- tests run
66-
- full smoke skipped/run decision and reason
67-
- banned path check result
68-
- V2 header compliance result
7+
Run one Codex pass for PR_11_195.
8+
9+
## Codex Prompt
10+
You are implementing PR_11_195 in the HTML-JavaScript-Gaming repo.
11+
12+
Follow `docs/pr/PR_11_195_REMAINING_V2_HTML_SESSION_BATCH.md` exactly.
13+
14+
Important:
15+
- This is a re-engineer, not a copy/paste migration.
16+
- ChatGPT did not write implementation code. You must write the implementation.
17+
- Convert the next remaining V2 tools that still violate HTML-first/session-only architecture.
18+
- Use a larger safe batch than the prior one-tool PRs, but do not expand outside V2 tool entries.
19+
- Do not change schemas, samples, games, Workspace Manager v1, or shared tool systems.
20+
- Do not use `platformShell`, `assetUsageIntegration`, `tools/shared/*`, aliases, fallback/default data, helper classes, or abstraction layers.
21+
- Keep `index.html` static and testable.
22+
- Keep `index.js` behavior-only.
23+
- Ensure every touched V2 tool uses `<div id="shared-theme-header"></div>` and user-facing names ending in `V2`.
24+
- Produce targeted validation evidence in `docs/dev/reports/PR_11_195_validation.md`.
25+
- Create final repo-structured ZIP at `tmp/PR_11_195.zip`.
26+
27+
## Required Targeted Checks
28+
Run:
29+
- `node --check` for each changed `.js` file.
30+
- grep/report checks for banned JS shell injection and banned legacy coupling terms.
31+
- HTML checks for `shared-theme-header`, `mount-shared-header.js`, and `./index.js` in changed V2 `index.html` files.
32+
33+
Do not run the full samples smoke test unless shared sample loader/framework code is modified. If skipped, document why.

docs/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Re-engineer V2 tools to HTML-first shells with behavior-only JS and shared header mount - PR 11.193C
1+
Convert remaining V2 tools to HTML-first session-only architecture - PR 11.195
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# PR_11_194 Expected Evidence - Fulfilled
2+
3+
Execution evidence was written to:
4+
5+
```text
6+
docs/dev/reports/PR_11_194_v2_html_first_remaining_tools_report.md
7+
```
8+
9+
Final ZIP artifact:
10+
11+
```text
12+
tmp/PR_11_194.zip
13+
```
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# PR_11_194 V2 HTML-First Remaining Tools Report
2+
3+
## Purpose
4+
Verify and complete the remaining Tool V2 HTML-first shell batch. Each scoped V2 tool must keep static shell/layout/header/CSS in `index.html` and behavior-only session/rendering logic in `index.js`.
5+
6+
## V2 Tools Affected
7+
- `tools/palette-manager-v2/`
8+
- `tools/svg-asset-studio-v2/`
9+
- `tools/vector-map-editor-v2/`
10+
- `tools/tilemap-studio-v2/`
11+
- `tools/asset-browser-v2/`
12+
13+
## Files Changed
14+
- `docs/dev/reports/PR_11_194_v2_html_first_remaining_tools_report.md`
15+
- `docs/dev/reports/PR_11_194_expected_evidence.md`
16+
17+
The five scoped V2 tool folders were audited and already satisfied the PR 11.194 HTML-first requirements at execution time. No additional implementation edits were required in those V2 files during this pass.
18+
19+
Existing PR source doc was present in the worktree and included in the ZIP:
20+
- `docs/pr/PR_11_194_20260501_04.md`
21+
22+
## HTML-First Shell Result
23+
Passed for all five scoped V2 tools. Each `index.html` owns:
24+
- document title ending with `V2`
25+
- `../../src/engine/theme/main.css`
26+
- `../../src/engine/ui/hubCommon.css`
27+
- V2 `data-tool-id`
28+
- `<div id="shared-theme-header"></div>`
29+
- static `<main class="page-shell">` shell
30+
- accordion markup
31+
- `menuTool` / `data-menu-tool` area
32+
- `menuWorkspace` / `data-menu-workspace` area
33+
- app/state/render containers
34+
- `<script type="module" src="../../src/engine/theme/mount-shared-header.js"></script>`
35+
- `<script type="module" src="./index.js"></script>`
36+
37+
## Behavior-Only JS Result
38+
Passed for all five scoped V2 tools. Each `index.js` contains exactly one class and remains limited to:
39+
- document title setup
40+
- `document.body.dataset.toolId` setup
41+
- session read via `hostContextId`
42+
- session contract validation
43+
- DOM population into existing nodes
44+
- dynamic rendering into existing containers
45+
- explicit empty/error states
46+
47+
Forbidden markers checked and not found in scoped V2 `index.js` files:
48+
- `document.body.innerHTML`
49+
- `document.head.insertAdjacentHTML`
50+
- dynamic style injection
51+
- dynamic shared-header script injection
52+
- layout/header construction in JS
53+
- `platformShell`
54+
- `assetUsageIntegration`
55+
- `tools/shared`
56+
- `../shared`
57+
- fallback/default/demo data markers
58+
59+
## V2 Suffix Naming Result
60+
Passed. Visible titles/tool names end with `V2`:
61+
- `Palette Manager V2`
62+
- `SVG Asset Studio V2`
63+
- `Vector Map Editor V2`
64+
- `Tilemap Studio V2`
65+
- `Asset Browser V2`
66+
67+
## Session-Only Result
68+
Passed. Scoped V2 tools read session data through `hostContextId` and render explicit empty/error states when session data is missing or invalid. No sample/default/fallback data was added.
69+
70+
## Targeted Validation Commands
71+
72+
```powershell
73+
node --check tools/palette-manager-v2/index.js
74+
node --check tools/svg-asset-studio-v2/index.js
75+
node --check tools/vector-map-editor-v2/index.js
76+
node --check tools/tilemap-studio-v2/index.js
77+
node --check tools/asset-browser-v2/index.js
78+
```
79+
80+
Results:
81+
- `node --check tools/palette-manager-v2/index.js` passed.
82+
- `node --check tools/svg-asset-studio-v2/index.js` passed.
83+
- `node --check tools/vector-map-editor-v2/index.js` passed.
84+
- `node --check tools/tilemap-studio-v2/index.js` passed.
85+
- `node --check tools/asset-browser-v2/index.js` passed.
86+
87+
Additional targeted validation:
88+
- `PR_11_194 V2 HTML-first compliance validation passed`
89+
90+
## Manual Browser Validation Notes
91+
Manual browser validation was not launched from this terminal session. The per-tool manual validation checklist is:
92+
- Open `tools/palette-manager-v2/index.html`; confirm shared header renders, static shell is visible before session data, missing session shows explicit empty state, valid session renders without legacy coupling.
93+
- Open `tools/svg-asset-studio-v2/index.html`; confirm shared header renders, static shell is visible before session data, missing session shows explicit empty state, valid session renders without legacy coupling.
94+
- Open `tools/vector-map-editor-v2/index.html`; confirm shared header renders, static shell is visible before session data, missing session shows explicit empty state, valid session renders without legacy coupling.
95+
- Open `tools/tilemap-studio-v2/index.html`; confirm shared header renders, static shell is visible before session data, missing session shows explicit empty state, valid session renders without legacy coupling.
96+
- Open `tools/asset-browser-v2/index.html`; confirm shared header renders, static shell is visible before session data, missing session shows explicit empty state, valid session renders without legacy coupling.
97+
98+
## Banned Path Check Result
99+
Scoped status check confirmed no changes under:
100+
- schemas
101+
- samples
102+
- games
103+
- `start_of_day/**`
104+
- Workspace Manager v1
105+
- `tools/shared/**`
106+
- legacy tools without `-v2`
107+
- `platformShell`
108+
- `assetUsageIntegration`
109+
110+
No schema, sample, or game files were changed.
111+
112+
## Full Samples Smoke Decision
113+
Full samples smoke test skipped.
114+
115+
Reason: PR 11.194 only verifies/completes isolated V2 HTML-first shells and behavior-only JS. It does not modify shared sample loader/framework code.
116+
117+
## Final ZIP
118+
119+
```text
120+
tmp/PR_11_194.zip
121+
```
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# PR_11_195 Validation
2+
3+
## Purpose
4+
Continue the V2 re-engineer lane by tightening remaining V2 behavior modules that still allowed generated/default-ish display labels, while preserving HTML-first static shells and session-only rendering.
5+
6+
## Changed V2 Tools
7+
- Palette Manager V2
8+
- SVG Asset Studio V2
9+
10+
## Files Changed
11+
- `tools/palette-manager-v2/index.js`
12+
- `tools/svg-asset-studio-v2/index.js`
13+
- `docs/dev/reports/PR_11_195_validation.md`
14+
15+
Existing PR source doc was present in the worktree and included in the ZIP:
16+
- `docs/pr/PR_11_195_REMAINING_V2_HTML_SESSION_BATCH.md`
17+
18+
## Implementation Summary
19+
- Palette Manager V2 no longer generates `Color N` display labels for palette entries. It renders explicit palette entry names when present, otherwise uses the explicit color value from session data.
20+
- SVG Asset Studio V2 no longer substitutes `Inline SVG` when `sourceName` is missing. It now treats missing `payloadJson.vectorAssetDocument.sourceName` as an invalid session contract.
21+
- No static shell, CSS, shared-header, menu, or layout markup was moved into JavaScript.
22+
- No legacy implementation code was copied.
23+
- No schemas, samples, games, Workspace Manager v1, or shared tool systems were changed.
24+
25+
## Targeted Syntax Checks
26+
Changed JS files:
27+
28+
```powershell
29+
node --check tools/palette-manager-v2/index.js
30+
node --check tools/svg-asset-studio-v2/index.js
31+
```
32+
33+
Results:
34+
- `node --check tools/palette-manager-v2/index.js` passed.
35+
- `node --check tools/svg-asset-studio-v2/index.js` passed.
36+
37+
Additional unchanged V2 lane sanity checks were also run:
38+
39+
```powershell
40+
node --check tools/vector-map-editor-v2/index.js
41+
node --check tools/tilemap-studio-v2/index.js
42+
node --check tools/asset-browser-v2/index.js
43+
```
44+
45+
Results:
46+
- `node --check tools/vector-map-editor-v2/index.js` passed.
47+
- `node --check tools/tilemap-studio-v2/index.js` passed.
48+
- `node --check tools/asset-browser-v2/index.js` passed.
49+
50+
## Banned JS Pattern Check
51+
Command covered changed JS files:
52+
53+
```powershell
54+
rg -n "document\.body\.innerHTML|document\.head\.insertAdjacentHTML|platformShell|assetUsageIntegration|tools/shared/|\.\.\/shared|fallback|default data|demo data|Inline SVG|Color \$\{|Color [0-9]" -- tools/palette-manager-v2/index.js tools/svg-asset-studio-v2/index.js
55+
```
56+
57+
Result: passed. No matches.
58+
59+
## HTML Header/Script Check
60+
Checked paired changed-tool HTML shells:
61+
- `tools/palette-manager-v2/index.html`
62+
- `tools/svg-asset-studio-v2/index.html`
63+
64+
Required markers verified:
65+
- `id="shared-theme-header"`
66+
- `src="../../src/engine/theme/mount-shared-header.js"`
67+
- `src="./index.js"`
68+
69+
Result: passed.
70+
71+
## V2-Wide Sanity Check
72+
A targeted V2-wide architecture sanity check verified all five current V2 tools still have HTML-first shells, one-class behavior modules, V2 names, shared header mounts, and no banned shell-injection or legacy/shared coupling markers.
73+
74+
Result: passed.
75+
76+
## Banned Path Check Result
77+
Scoped status check found no changes under:
78+
- schemas
79+
- samples
80+
- games
81+
- `start_of_day/**`
82+
- Workspace Manager v1
83+
- `tools/shared/**`
84+
- `platformShell`
85+
- `assetUsageIntegration`
86+
87+
No schema, sample, or game files were changed.
88+
89+
## Manual Browser Validation Notes
90+
Manual browser validation was not launched from this terminal session. Checklist for the changed V2 tools:
91+
- Open `tools/palette-manager-v2/index.html`; confirm shared header renders, static shell is visible before session data, missing session shows explicit empty state, and valid session palette renders using session-backed names/colors only.
92+
- Open `tools/svg-asset-studio-v2/index.html`; confirm shared header renders, static shell is visible before session data, missing session shows explicit empty state, and valid session SVG requires `payloadJson.vectorAssetDocument.sourceName` plus `svgText`.
93+
94+
## Full Samples Smoke Decision
95+
Full samples smoke test skipped.
96+
97+
Reason: PR 11.195 only changes isolated V2 behavior modules and does not modify shared sample loader/framework code.
98+
99+
## ZIP Artifact
100+
101+
```text
102+
tmp/PR_11_195.zip
103+
```

0 commit comments

Comments
 (0)