Skip to content

Commit 9a16433

Browse files
committed
Build Asset Browser / Import Hub and Palette Browser / Manager as first-class registry-backed tools using the shared engine/platform shell, remove their planned placeholders from tools/index, keep Sprite Editor first-class, keep SpriteEditor_old_keep hidden legacy, and extend registry validation to prevent future drift.
1 parent 895c5b9 commit 9a16433

19 files changed

Lines changed: 1349 additions & 74 deletions

docs/dev/CODEX_COMMANDS.md

Lines changed: 22 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,27 @@ MODEL: GPT-5.4
22
REASONING: high
33

44
COMMAND:
5-
Create BUILD_PR_TOOLS_INDEX_SURFACE_CLEANUP as a docs-first, surgical surface cleanup PR for HTML-JavaScript-Gaming.
5+
Create BUILD_PR_ASSET_BROWSER_IMPORT_HUB_AND_PALETTE_BROWSER_MANAGER using the latest uploaded GitHub repo as the baseline.
66

7-
GOAL:
8-
Make `tools/index.html` show only true first-class launchable tools. Keep `Sprite Editor` first-class and visible. Keep `SpriteEditor_old_keep` legacy and hidden. Remove `Advanced Systems & Extensions` from the tools landing page unless each item in that section is verified to be an actual active launchable tool under `tools/`.
7+
REQUIREMENTS:
8+
1. Build two new first-class tools under tools/:
9+
- tools/Asset Browser/ -> display name: Asset Browser / Import Hub
10+
- tools/Palette Browser/ -> display name: Palette Browser / Manager
11+
2. Register both in tools/toolRegistry.js as active first-class tools.
12+
3. Ensure tools/index.html renders them through the shared registry-driven surface.
13+
4. Remove the planned placeholder cards for these two tools once the real tools are live.
14+
5. Ensure any remaining older Asset Browser naming is normalized to "Asset Browser / Import Hub".
15+
6. Keep Sprite Editor first-class and visible.
16+
7. Keep SpriteEditor_old_keep legacy and hidden.
17+
8. Keep samples off the tools landing page.
18+
9. Use shared engine/platform shell + theme for both new tools.
19+
10. Update the registry validator so it verifies:
20+
- both new tools exist in registry
21+
- folder path matches registry path
22+
- active first-class tools are surfaced
23+
- legacy tools remain excluded
24+
- placeholder cards are not left behind for live tools
25+
11. Keep changes surgical and aligned to current repo conventions.
926

10-
TARGET FILES TO AUDIT:
11-
- tools/index.html
12-
- tools/toolRegistry.js
13-
- tools/renderToolsIndex.js
14-
- any config/data feeding the tools page
15-
16-
RULES:
17-
1. `tools/index.html` is a user-facing tool launcher, not a platform/dev page.
18-
2. Only render entries that are true first-class tools.
19-
3. Keep `Sprite Editor` active and visible.
20-
4. Keep `SpriteEditor_old_keep` hidden from active UI.
21-
5. If `Advanced Systems & Extensions` entries are platform/dev/internal, move or delete them.
22-
6. If they are duplicate/placeholder/dead, delete them.
23-
7. Do not expand scope beyond this cleanup.
24-
8. Preserve engine theme usage.
25-
26-
EXPECTED ACTIVE TOOLS:
27-
- Vector Map Editor
28-
- Vector Asset Studio
29-
- Tilemap Studio
30-
- Parallax Scene Studio
31-
- Sprite Editor
32-
33-
EXPECTED RESULT:
34-
- no misleading `Advanced Systems & Extensions` on main tools page unless truly valid
35-
- no legacy tool leakage
36-
- registry and rendered landing page aligned
37-
- no broken links
38-
39-
OUTPUT:
40-
<project folder>/tmp/BUILD_PR_TOOLS_INDEX_SURFACE_CLEANUP.zip
27+
PACKAGE OUTPUT:
28+
<project folder>/tmp/BUILD_PR_ASSET_BROWSER_IMPORT_HUB_AND_PALETTE_BROWSER_MANAGER.zip

docs/dev/COMMIT_COMMENT.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
TOOLS: clean tools/index launcher surface; keep Sprite Editor first-class; hide legacy; remove non-tool sections
1+
Build Asset Browser / Import Hub and Palette Browser / Manager as first-class registry-backed tools using the shared engine/platform shell, remove their planned placeholders from tools/index, keep Sprite Editor first-class, keep SpriteEditor_old_keep hidden legacy, and extend registry validation to prevent future drift.
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
BUILD_PR_TOOLS_INDEX_SURFACE_CLEANUP
1+
Change Summary
22

3-
Summary:
4-
- defines a strict rule for what may appear on tools/index.html
5-
- keeps Sprite Editor first-class and visible
6-
- keeps SpriteEditor_old_keep legacy and hidden
7-
- removes, relocates, or deletes Advanced Systems & Extensions items unless they are true launchable tools
8-
- keeps the cleanup surgical and surface-focused
3+
- Added two new first-class tools:
4+
- Asset Browser / Import Hub
5+
- Palette Browser / Manager
6+
- Registered both in the shared active tools registry.
7+
- Removed the static planned placeholder cards for the two now-live tools.
8+
- Kept the tools landing page registry-driven and sample-free.
9+
- Kept Sprite Editor first-class and SpriteEditor_old_keep hidden legacy.
10+
- Extended validator coverage for new tool folders, active surface participation, and placeholder drift.

docs/dev/reports/file_tree.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
HTML-JavaScript-Gaming/
1+
HTML-JavaScript-Gaming-main/
22
docs/
33
pr/
4-
BUILD_PR_TOOLS_INDEX_SURFACE_CLEANUP.md
4+
BUILD_PR_ASSET_BROWSER_IMPORT_HUB_AND_PALETTE_BROWSER_MANAGER.md
55
dev/
66
codex_commands.md
77
commit_comment.txt
88
reports/
99
change_summary.txt
1010
validation_checklist.txt
1111
file_tree.txt
12+
tmp/
13+
BUILD_PR_ASSET_BROWSER_IMPORT_HUB_AND_PALETTE_BROWSER_MANAGER.zip

docs/dev/reports/tool_registry_validation.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
TOOL_REGISTRY_VALIDATION
22
status=PASS
3-
active=Vector Map Editor, Vector Asset Studio, Tilemap Studio, Parallax Scene Studio, Sprite Editor
3+
active=Vector Map Editor, Vector Asset Studio, Tilemap Studio, Parallax Scene Studio, Sprite Editor, Asset Browser / Import Hub, Palette Browser / Manager
44
legacy=SpriteEditor_old_keep
55
Filesystem Directories
6+
- Asset Browser
7+
- Palette Browser
68
- Parallax Scene Studio
79
- Sprite Editor
810
- SpriteEditor_old_keep
@@ -15,6 +17,8 @@ Registry Paths
1517
- Tilemap Studio
1618
- Parallax Scene Studio
1719
- Sprite Editor
20+
- Asset Browser
21+
- Palette Browser
1822
- SpriteEditor_old_keep
1923
Issues
2024
- none
Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1-
[ ] tools/index.html audited for Advanced Systems & Extensions section
2-
[ ] tools/toolRegistry.js audited for Sprite Editor active entry
3-
[ ] tools/toolRegistry.js audited for SpriteEditor_old_keep legacy handling
4-
[ ] render logic verified to use active first-class tools only
5-
[ ] Sprite Editor visible on tools landing page
6-
[ ] SpriteEditor_old_keep hidden from tools landing page
7-
[ ] non-tool/internal/dev entries moved or deleted
8-
[ ] no dead links from tools landing page
9-
[ ] engine theme preserved across active tools page
1+
Validation Checklist
2+
3+
[x] tools/Asset Browser/ exists
4+
[x] tools/Palette Browser/ exists
5+
[x] Both tools load through shared engine/platform shell
6+
[x] Both tools use engine theme
7+
[x] tools/toolRegistry.js contains active entries for both tools
8+
[x] tools/index.html shows both tools as first-class launchable tools
9+
[x] tools/index.html does not show samples
10+
[x] Static placeholder for Palette Browser / Manager removed after activation
11+
[x] Static placeholder for Asset Browser / Import Hub removed after activation
12+
[x] No non-validator references remain to the old Asset Browser name
13+
[x] Sprite Editor remains visible as first-class tool
14+
[x] SpriteEditor_old_keep remains hidden legacy
15+
[x] Registry validator checks both new tools
16+
[x] Registry validator flags placeholder drift for live tools
17+
[x] No broken paths from tools landing page
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# BUILD_PR_ASSET_BROWSER_IMPORT_HUB_AND_PALETTE_BROWSER_MANAGER
2+
3+
## Objective
4+
Implement two new first-class tools under `tools/`:
5+
6+
1. `Asset Browser / Import Hub`
7+
2. `Palette Browser / Manager`
8+
9+
The build stays surgical: both tools use the shared engine theme and platform shell, are surfaced through the registry-driven tools landing page, keep `Sprite Editor` first-class, and keep `SpriteEditor_old_keep` preserved but hidden.
10+
11+
## Files Added
12+
- `tools/Asset Browser/index.html`
13+
- `tools/Asset Browser/main.js`
14+
- `tools/Asset Browser/assetBrowser.css`
15+
- `tools/Asset Browser/README.md`
16+
- `tools/Palette Browser/index.html`
17+
- `tools/Palette Browser/main.js`
18+
- `tools/Palette Browser/paletteBrowser.css`
19+
- `tools/Palette Browser/README.md`
20+
21+
## Files Updated
22+
- `tools/toolRegistry.js`
23+
- `tools/index.html`
24+
- `scripts/validate-tool-registry.mjs`
25+
- `scripts/validate-active-tools-surface.mjs`
26+
- `docs/dev/COMMIT_COMMENT.txt`
27+
- `docs/dev/reports/change_summary.txt`
28+
- `docs/dev/reports/validation_checklist.txt`
29+
30+
## Implementation Summary
31+
32+
### Asset Browser / Import Hub
33+
- Added a launchable first-class tool at `tools/Asset Browser/`.
34+
- Uses shared shell and engine theme.
35+
- Browses approved asset locations only.
36+
- Previews real repo-backed vector, sprite, tilemap, parallax, palette, and workflow JSON assets.
37+
- Provides a non-destructive import-plan flow with:
38+
- category selection
39+
- approved destination selection
40+
- lowercase naming validation
41+
- duplicate conflict warning
42+
- downloadable import-plan JSON
43+
44+
### Palette Browser / Manager
45+
- Added a launchable first-class tool at `tools/Palette Browser/`.
46+
- Uses shared shell and engine theme.
47+
- Loads built-in palettes from `engine/paletteList.js`.
48+
- Supports local custom palette workflows through browser storage:
49+
- create
50+
- duplicate
51+
- rename
52+
- add swatch
53+
- delete swatch
54+
- copy/export JSON
55+
- Publishes a lightweight palette handoff record for active art tools.
56+
57+
### Registry and Landing Surface
58+
- Registered both tools as active first-class entries in `tools/toolRegistry.js`.
59+
- The tools landing page continues to render from the shared registry-driven grid.
60+
- Removed the now-obsolete planned placeholder cards for the two live tools.
61+
- Kept samples off the tools landing page.
62+
- Kept `Sprite Editor` visible and first-class.
63+
- Kept `SpriteEditor_old_keep` hidden legacy.
64+
65+
## Validation Changes
66+
- Extended `scripts/validate-tool-registry.mjs` to require both new tools in the registry and on disk.
67+
- Extended `scripts/validate-active-tools-surface.mjs` to validate both new tool pages.
68+
- Added checks that fail if the static landing page still contains placeholder text for live tools.
69+
70+
## Validation Performed
71+
- `node --check tools/Asset Browser/main.js`
72+
- `node --check tools/Palette Browser/main.js`
73+
- `node scripts/validate-tool-registry.mjs`
74+
- `node scripts/validate-active-tools-surface.mjs`
75+
76+
## Acceptance Summary
77+
- Both tools exist under `tools/`.
78+
- Both tools are active in the shared registry.
79+
- Both tools load through the shared engine/platform shell.
80+
- The tools landing page surfaces them through the existing registry-driven launcher.
81+
- Legacy sprite tooling remains excluded from the active surface.

scripts/validate-active-tools-surface.mjs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ const REQUIRED_ACTIVE_TOOL_NAMES = [
1717
"Vector Asset Studio",
1818
"Tilemap Studio",
1919
"Parallax Scene Studio",
20-
"Sprite Editor"
20+
"Sprite Editor",
21+
"Asset Browser / Import Hub",
22+
"Palette Browser / Manager"
2123
];
2224

2325
const SCAN_TARGETS = [
@@ -40,7 +42,9 @@ const ACTIVE_TOOL_ENTRYPOINTS = [
4042
"tools/Tilemap Studio/index.html",
4143
"tools/Parallax Scene Studio/index.html",
4244
"tools/Vector Map Editor/index.html",
43-
"tools/Sprite Editor/index.html"
45+
"tools/Sprite Editor/index.html",
46+
"tools/Asset Browser/index.html",
47+
"tools/Palette Browser/index.html"
4448
];
4549

4650
async function pathExists(targetPath) {
@@ -130,6 +134,15 @@ async function main() {
130134
}
131135

132136
const toolsLandingPage = await readText("tools/index.html");
137+
if (/Asset Browser \/ Import Helper/.test(toolsLandingPage)) {
138+
issues.push('Stale "Asset Browser / Import Helper" placeholder remains on tools landing page.');
139+
}
140+
if (/Palette Browser \/ Manager/.test(toolsLandingPage)) {
141+
issues.push('Palette Browser / Manager should be registry-rendered, not left behind as a static placeholder card.');
142+
}
143+
if (/Asset Browser \/ Import Hub/.test(toolsLandingPage)) {
144+
issues.push('Asset Browser / Import Hub should be registry-rendered, not left behind as a static placeholder card.');
145+
}
133146
if (!toolsLandingPage.includes("../engine/ui/hubCommon.css")) {
134147
issues.push("Engine theme stylesheet missing from tools landing page.");
135148
}

scripts/validate-tool-registry.mjs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ const EXPECTED_ACTIVE_NAMES = [
1414
"Vector Asset Studio",
1515
"Tilemap Studio",
1616
"Parallax Scene Studio",
17-
"Sprite Editor"
17+
"Sprite Editor",
18+
"Asset Browser / Import Hub",
19+
"Palette Browser / Manager"
1820
];
1921

2022
const EXPECTED_LEGACY_NAMES = [
@@ -145,6 +147,17 @@ async function main() {
145147
issues.push("Active registry entries must not include SpriteEditor_old_keep.");
146148
}
147149

150+
const toolsLandingPage = await fs.readFile(path.join(toolsRoot, "index.html"), "utf8");
151+
if (/Asset Browser \/ Import Helper/.test(toolsLandingPage)) {
152+
issues.push('Placeholder drift detected: "Asset Browser / Import Helper" still appears in tools/index.html.');
153+
}
154+
if (/Palette Browser \/ Manager/.test(toolsLandingPage)) {
155+
issues.push('Placeholder drift detected: "Palette Browser / Manager" still appears in static tools/index.html after activation.');
156+
}
157+
if (/Asset Browser \/ Import Hub/.test(toolsLandingPage)) {
158+
issues.push('Placeholder drift detected: "Asset Browser / Import Hub" still appears in static tools/index.html instead of the registry-rendered grid.');
159+
}
160+
148161
const reportLines = [
149162
"TOOL_REGISTRY_VALIDATION",
150163
`status=${issues.length === 0 ? "PASS" : "FAIL"}`,

tools/Asset Browser/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Asset Browser / Import Hub
2+
3+
Asset Browser / Import Hub is a first-class tools surface for browsing approved project asset locations and generating non-destructive import plans.
4+
5+
## Phase 1
6+
- Browse approved vector, sprite, tilemap, parallax, palette, and workflow assets.
7+
- Preview SVG and JSON-backed assets.
8+
- Validate local file names against approved import targets.
9+
- Download an import-plan JSON without mutating repo files directly.
10+
11+
## Boundary
12+
- This tool is not a general filesystem explorer.
13+
- It does not write directly into the repo.
14+
- It stays aligned to approved platform asset folders and shared tools conventions.

0 commit comments

Comments
 (0)