Skip to content

Commit dec9f74

Browse files
committed
Polish tools platform surface with shared shell, registry-driven active tools landing page, and normalized active-tool UX while preserving legacy Sprite Editor خارج the first-class surface.
1 parent 17af75a commit dec9f74

File tree

16 files changed

+510
-119
lines changed

16 files changed

+510
-119
lines changed

docs/dev/CODEX_COMMANDS.md

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

44
COMMAND:
5-
Create BUILD_PR_TOOLS_REGISTRY_AND_SPRITE_RENAME as a docs-aligned implementation PR.
5+
Create BUILD_PR_VECTOR_PLATFORM_SURFACE_POLISH as a surgical tools-surface implementation PR.
66

7-
REPO RULES:
8-
- Treat tools/ as a first-class product surface.
9-
- Keep this PR surgical and limited to tool naming, tool registry, generated navigation, and validation.
10-
- Do not delete preserved legacy content unless absolutely required and explicitly approved.
11-
- Prefer one canonical source of truth for active tool metadata.
12-
- Preserve existing behavior except where required for the canonical Sprite Editor path and tool-surface cleanup.
7+
OBJECTIVE:
8+
Make the `tools/` folder first-class and visually unified by adding a shared platform shell and registry-driven active tools surface for:
9+
- Vector Map Editor
10+
- Vector Asset Studio
11+
- Tile Map Editor
12+
- Parallax Editor
1313

14-
TASKS:
15-
1. Standardize the active sprite tool at tools/Sprite Editor.
16-
2. Update active references, labels, titles, links, and path usage to Sprite Editor.
17-
3. Introduce a single source of truth registry for active tools.
18-
4. Ensure the active tools list/navigation renders from that registry rather than duplicated hardcoded names.
19-
5. Mark only these as active first-class tools:
20-
- Vector Map Editor
21-
- Vector Asset Studio
22-
- Tile Map Editor
23-
- Parallax Editor
24-
- Sprite Editor
25-
6. Ensure legacy-preserved tools do not appear in the active tools list.
26-
7. Add a lightweight validation check/script that detects:
27-
- missing active tool folders
28-
- stale sprite-editor rename references
29-
- legacy tools appearing in active navigation
30-
- disallowed active naming suffixes like V2/V3/new/final/copy
31-
8. Validate all active tool loading paths after the rename.
14+
PRESERVE:
15+
- legacy Sprite Editor under preserved pathing such as `tools/SpritEditor_old_keep/`
16+
- existing unique editor workspaces per tool
17+
- current repo boundaries; do not modify engine/game runtime code
3218

33-
OUTPUTS:
34-
- Repo changes only for this PR scope
35-
- docs/pr/BUILD_PR_TOOLS_REGISTRY_AND_SPRITE_RENAME.md retained
36-
- docs/dev/commit_comment.txt updated
37-
- package final delta zip to:
38-
<project folder>/tmp/BUILD_PR_TOOLS_REGISTRY_AND_SPRITE_RENAME_delta.zip
19+
IMPLEMENT:
20+
1. Add/update a first-class tools landing surface.
21+
2. Generate active tool entries from the canonical tool registry.
22+
3. Add a lightweight shared platform CSS/JS layer for header/nav/status/workspace chrome.
23+
4. Apply the shared shell to all active tools.
24+
5. Normalize visible labels/actions across active tools.
25+
6. Exclude legacy Sprite Editor from active tools surface.
26+
7. Validate all renamed paths and remove stale references.
3927

40-
COMMIT COMMENT:
41-
Unify active tools under a first-class tools registry, standardize Sprite Editor at tools/Sprite Editor, generate active tool navigation from a single source of truth, and add validation to prevent naming/path drift.
28+
GUARDRAILS:
29+
- no destructive deletes
30+
- no framework migration
31+
- no gameplay/runtime engine changes
32+
- no ad hoc duplicated tool menus in multiple files
33+
- keep changes small, readable, and reversible
4234

43-
NEXT COMMAND:
44-
MODEL: GPT-5.4
45-
REASONING: high
46-
COMMAND: Create BUILD_PR_VECTOR_PLATFORM_SURFACE_POLISH to standardize tool landing UX, descriptions, icons/labels, and showcase ordering across the active tools registry without changing engine behavior.
35+
OUTPUT:
36+
<project folder>/tmp/BUILD_PR_VECTOR_PLATFORM_SURFACE_POLISH.zip

docs/dev/COMMIT_COMMENT.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Unify active tools under a first-class tools registry, standardize Sprite Editor at tools/Sprite Editor, generate active tool navigation from a single source of truth, and add validation to prevent naming/path drift.
1+
Polish tools platform surface with a shared shell, registry-driven active-tool navigation, and unified first-class labels while preserving Sprite Editor outside the active surface.
Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,17 @@
1-
BUILD_PR_TOOLS_REGISTRY_AND_SPRITE_RENAME
2-
-----------------------------------------
1+
BUILD PR bundle prepared for vector platform surface polish.
32

4-
Implemented changes
5-
- standardized the canonical active sprite tool folder at `tools/Sprite Editor/`
6-
- updated the sprite tool title and heading to the canonical `Sprite Editor` name
7-
- introduced `tools/toolRegistry.js` as the single source of truth for active tool metadata
8-
- introduced `tools/renderToolsIndex.js` so the tools hub renders the active tools list from the registry
9-
- updated `tools/index.html` to use generated active tool cards instead of hardcoded tool names
10-
- added `scripts/validate-active-tools-surface.mjs` to detect folder/path/name drift
3+
Planned implementation summary:
4+
- establish `tools/` as a first-class product surface
5+
- add a shared platform shell for active tools
6+
- drive active tool menus/listings from one canonical registry
7+
- normalize naming, labels, and common actions across active tools
8+
- preserve legacy Sprite Editor outside the active tools surface
9+
- validate rename/path integrity and remove stale references
1110

12-
Approved visible active tools
13-
- `Vector Map Editor`
14-
- `Vector Asset Studio`
15-
- `Tile Map Editor`
16-
- `Parallax Editor`
17-
- `Sprite Editor`
18-
19-
Legacy handling
20-
- `tools/SpriteEditor_old_keep/` remains preserved on disk
21-
- legacy tools are excluded from the active tools list by registry metadata and validation
22-
23-
Validation
24-
- active tool entry paths were checked after the rename
25-
- stale sprite-editor rename references are checked in canonical hub/build-report surfaces
26-
- disallowed active naming suffixes are checked by validation script
11+
Included bundle artifacts:
12+
- PR spec
13+
- Codex command
14+
- commit comment
15+
- change summary
16+
- validation checklist
17+
- file tree

docs/dev/reports/file_tree.txt

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
1-
tools/
2-
index.html
3-
renderToolsIndex.js
4-
toolRegistry.js
5-
Sprite Editor/
6-
index.html
7-
README.md
8-
scripts/
9-
validate-active-tools-surface.mjs
10-
docs/
11-
pr/
12-
BUILD_PR_TOOLS_REGISTRY_AND_SPRITE_RENAME.md
13-
dev/
14-
commit_comment.txt
15-
reports/
16-
change_summary.txt
17-
file_tree.txt
18-
validation_checklist.txt
1+
BUILD_PR_VECTOR_PLATFORM_SURFACE_POLISH/
2+
docs/
3+
pr/
4+
BUILD_PR_VECTOR_PLATFORM_SURFACE_POLISH.md
5+
dev/
6+
codex_commands.md
7+
commit_comment.txt
8+
reports/
9+
change_summary.txt
10+
validation_checklist.txt
11+
file_tree.txt
Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
[x] canonical sprite tool folder is tools/Sprite Editor
2-
[x] no canonical stale sprite-editor rename references remain in the validated active tool surface
3-
[x] active tools registry exists and is the single source of truth
4-
[x] generated active tools list comes from registry
5-
[x] active tools list contains only approved first-class tools
6-
[x] Vector Map Editor listed
7-
[x] Vector Asset Studio listed
8-
[x] Tile Map Editor listed
9-
[x] Parallax Editor listed
10-
[x] Sprite Editor listed
11-
[x] legacy-preserved tools excluded from active tools list
12-
[x] validation detects stale references and naming drift
13-
[x] active tool paths load correctly after rename
1+
[ ] Tools landing page exists and is clearly first-class
2+
[ ] Active tools list is generated from canonical registry
3+
[ ] Only approved active tools appear on landing page
4+
[ ] Legacy Sprite Editor does not appear in active tools menu
5+
[ ] Vector Map Editor uses shared platform shell
6+
[ ] Vector Asset Studio uses shared platform shell
7+
[ ] Tile Map Editor uses shared platform shell
8+
[ ] Parallax Editor uses shared platform shell
9+
[ ] Current tool title matches canonical naming in every active tool
10+
[ ] Home/back-to-tools affordance works in every active tool
11+
[ ] Common actions use normalized wording
12+
[ ] No visible references to `Sprite Editor V3`
13+
[ ] No broken asset/script/style paths introduced
14+
[ ] No engine/game runtime files modified
15+
[ ] Legacy preserved folder remains intact
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# BUILD_PR_VECTOR_PLATFORM_SURFACE_POLISH
2+
3+
## Purpose
4+
Polish the `tools/` product surface with one shared shell layer and a registry-driven active tools landing experience for the approved first-class tool set only.
5+
6+
## Scope
7+
In scope:
8+
- shared platform shell for active tools
9+
- registry-driven active tool landing and navigation
10+
- consistent first-class labels for the active tools surface
11+
- active path cleanup and validation
12+
13+
Out of scope:
14+
- gameplay or engine runtime changes
15+
- destructive folder deletes
16+
- framework migration
17+
- broad refactors outside tool-surface polish
18+
- reviving legacy Sprite Editor as a first-class tool
19+
20+
## First-Class Active Tools
21+
- Vector Map Editor
22+
- Vector Asset Studio
23+
- Tile Map Editor
24+
- Parallax Editor
25+
26+
## Preserved Sprite Paths
27+
- `tools/Sprite Editor/` remains on disk but is intentionally excluded from the first-class active tools surface for this PR
28+
- `tools/SpriteEditor_old_keep/` remains preserved on disk as legacy content
29+
- no preserved sprite path is rendered in the active landing page or shared shell navigation
30+
31+
## Modules Created Or Changed
32+
- `tools/toolRegistry.js`
33+
- `tools/renderToolsIndex.js`
34+
- `tools/index.html`
35+
- `tools/shared/platformShell.css`
36+
- `tools/shared/platformShell.js`
37+
- `tools/Vector Asset Studio/index.html`
38+
- `tools/Tilemap Studio/index.html`
39+
- `tools/Parallax Scene Studio/index.html`
40+
- `tools/Vector Map Editor/index.html`
41+
- `scripts/validate-active-tools-surface.mjs`
42+
- `docs/pr/BUILD_PR_VECTOR_PLATFORM_SURFACE_POLISH.md`
43+
- `docs/dev/commit_comment.txt`
44+
45+
## Public Surface Boundaries
46+
- `tools/toolRegistry.js` is the single source of truth for active-tool metadata
47+
- `tools/renderToolsIndex.js` renders the landing-page cards from the registry
48+
- `tools/shared/platformShell.js` renders shared header, nav, and status chrome from the registry
49+
- `tools/shared/platformShell.css` provides shared shell framing without replacing tool-specific workspace CSS
50+
- existing tool workspaces remain mounted inside each tool's current editor shell
51+
52+
## Implementation Summary
53+
- narrowed the first-class tools surface to the four requested tools only
54+
- added a shared platform shell with a consistent header, nav, and status band
55+
- applied the shared shell to the landing page and all four active tool pages
56+
- normalized the visible first-class labels to `Tile Map Editor` and `Parallax Editor` through the shared registry surface
57+
- excluded preserved sprite tooling from the active landing page and shared nav
58+
- kept the underlying tool folders and editor workspaces intact
59+
60+
## Validation Performed
61+
- `node --check tools/toolRegistry.js`
62+
- `node --check tools/renderToolsIndex.js`
63+
- `node --check tools/shared/platformShell.js`
64+
- `node --check scripts/validate-active-tools-surface.mjs`
65+
- `node --check tools/Vector Asset Studio/main.js`
66+
- `node --check tools/Tilemap Studio/main.js`
67+
- `node --check tools/Parallax Scene Studio/main.js`
68+
- `node --check tools/Vector Map Editor/main.js`
69+
- `node scripts/validate-active-tools-surface.mjs`
70+
71+
## Validation Summary
72+
- the landing page active tools list is registry-driven
73+
- only the approved four tools appear in the first-class active surface
74+
- preserved sprite tooling does not appear in active navigation
75+
- shared shell chrome is available on the landing page and each active tool page
76+
- active tool folders and entrypoints resolve cleanly
77+
- stale deprecated sprite-rename references are rejected by the validation script
78+
- disallowed active naming suffixes remain blocked for first-class tools
79+
80+
## Follow-Up Recommendations
81+
- keep future landing-page or active-nav changes routed through the registry instead of hardcoded page lists
82+
- if canonical folder names change later, update the registry and validator in the same PR
83+
- keep future surface polish additive through the shared shell layer

scripts/validate-active-tools-surface.mjs

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ import fs from "node:fs/promises";
22
import path from "node:path";
33
import { fileURLToPath } from "node:url";
44
import {
5+
ACTIVE_TOOL_SURFACE_IDS,
56
TOOL_NAME_SUFFIX_PATTERN,
67
getToolRegistry,
8+
getToolById,
79
getVisibleActiveToolRegistry
810
} from "../tools/toolRegistry.js";
911

@@ -15,17 +17,15 @@ const REQUIRED_ACTIVE_TOOL_NAMES = [
1517
"Vector Map Editor",
1618
"Vector Asset Studio",
1719
"Tile Map Editor",
18-
"Parallax Editor",
19-
"Sprite Editor"
20+
"Parallax Editor"
2021
];
2122

2223
const SCAN_TARGETS = [
2324
"tools/index.html",
2425
"tools/renderToolsIndex.js",
25-
"docs/pr/BUILD_PR_TOOLS_REGISTRY_AND_SPRITE_RENAME.md",
26-
"docs/dev/reports/validation_checklist.txt",
27-
"docs/dev/reports/change_summary.txt",
28-
"docs/dev/reports/file_tree.txt",
26+
"tools/shared/platformShell.js",
27+
"tools/shared/platformShell.css",
28+
"docs/pr/BUILD_PR_VECTOR_PLATFORM_SURFACE_POLISH.md",
2929
"docs/dev/commit_comment.txt"
3030
];
3131

@@ -52,11 +52,16 @@ async function main() {
5252
const toolRegistry = getToolRegistry();
5353
const visibleActiveTools = getVisibleActiveToolRegistry();
5454
const activeNames = visibleActiveTools.map((tool) => tool.displayName);
55+
const activeIds = visibleActiveTools.map((tool) => tool.id);
5556

5657
if (JSON.stringify(activeNames) !== JSON.stringify(REQUIRED_ACTIVE_TOOL_NAMES)) {
5758
issues.push(`Active tool names do not match the approved list. Found: ${activeNames.join(", ")}`);
5859
}
5960

61+
if (JSON.stringify(activeIds) !== JSON.stringify(ACTIVE_TOOL_SURFACE_IDS)) {
62+
issues.push(`Active tool ids do not match the approved registry surface. Found: ${activeIds.join(", ")}`);
63+
}
64+
6065
for (const tool of visibleActiveTools) {
6166
const folderPath = path.join(repoRoot, "tools", tool.folderName);
6267
const entryPointPath = path.join(repoRoot, "tools", tool.entryPoint);
@@ -76,6 +81,11 @@ async function main() {
7681
issues.push(`Legacy tools appear in active navigation: ${visibleLegacyTools.map((tool) => tool.displayName).join(", ")}`);
7782
}
7883

84+
const preservedSpriteTool = getToolById("sprite-editor");
85+
if (preservedSpriteTool?.visibleInToolsList === true || preservedSpriteTool?.status === "active") {
86+
issues.push("Sprite Editor is still marked as a first-class active tool.");
87+
}
88+
7989
for (const target of SCAN_TARGETS) {
8090
const text = await readText(target);
8191
if (/Sprite Editor V3|tools\/Sprite Editor V3|tools\\Sprite Editor V3/.test(text)) {
@@ -85,7 +95,7 @@ async function main() {
8595

8696
for (const target of NAVIGATION_SURFACE_TARGETS) {
8797
const text = await readText(target);
88-
if (/SpriteEditor_old_keep/.test(text)) {
98+
if (/SpriteEditor_old_keep|Sprite Editor Legacy|Sprite Editor/.test(text)) {
8999
issues.push(`Legacy tool appears in active navigation/report surface: ${target}`);
90100
}
91101
}

tools/Parallax Scene Studio/index.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@
99
<head>
1010
<meta charset="UTF-8" />
1111
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
12-
<title>Parallax Scene Studio</title>
12+
<title>Tools Platform</title>
1313
<link rel="stylesheet" href="../../engine/ui/hubCommon.css" />
14+
<link rel="stylesheet" href="../shared/platformShell.css" />
1415
<link rel="stylesheet" href="./parallaxEditor.css" />
1516
</head>
16-
<body class="parallax-editor-page">
17+
<body class="parallax-editor-page" data-tool-id="parallax-editor" data-tools-platform-page="tool">
18+
<div data-tools-platform-header></div>
1719
<div class="app-shell">
1820
<header class="toolbar">
1921
<div class="toolbar-group">
@@ -225,6 +227,8 @@ <h3>Remediation</h3>
225227
</div>
226228
</div>
227229

230+
<div data-tools-platform-status></div>
231+
<script type="module" src="../shared/platformShell.js"></script>
228232
<script type="module" src="./main.js"></script>
229233
</body>
230234
</html>

tools/Tilemap Studio/index.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@
99
<head>
1010
<meta charset="UTF-8" />
1111
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
12-
<title>Tilemap Studio</title>
12+
<title>Tools Platform</title>
1313
<link rel="stylesheet" href="../../engine/ui/hubCommon.css" />
14+
<link rel="stylesheet" href="../shared/platformShell.css" />
1415
<link rel="stylesheet" href="./tileMapEditor.css" />
1516
</head>
16-
<body class="tile-map-editor-page">
17+
<body class="tile-map-editor-page" data-tool-id="tile-map-editor" data-tools-platform-page="tool">
18+
<div data-tools-platform-header></div>
1719
<div class="app-shell" id="appShell">
1820
<header class="toolbar">
1921
<div class="toolbar-group">
@@ -203,6 +205,8 @@ <h3>Remediation</h3>
203205
</div>
204206
</div>
205207

208+
<div data-tools-platform-status></div>
209+
<script type="module" src="../shared/platformShell.js"></script>
206210
<script type="module" src="./main.js"></script>
207211
</body>
208212
</html>

0 commit comments

Comments
 (0)