Skip to content

Commit e481080

Browse files
committed
Rebuild Asset Tool as DB-backed first-class Tool V2 - PR_26156_136-141-asset-tool-rebuild
1 parent 0f1c896 commit e481080

13 files changed

Lines changed: 1360 additions & 73 deletions

docs_build/dev/codex_commands.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -963,3 +963,44 @@ Required reports:
963963
- `docs_build/dev/reports/testing_lane_execution_report.md`
964964
- `docs_build/dev/reports/codex_changed_files.txt`
965965
- `docs_build/dev/reports/codex_review.diff`
966+
967+
968+
## PR_26156_136-141
969+
970+
Changes:
971+
- Read `docs_build/dev/PROJECT_INSTRUCTIONS.md`.
972+
- Audited `archive/v1-v2/tools/old_asset-manager-v2/index.html` as reference only for expected Asset Tool behavior.
973+
- Did not copy archive code and did not modify archived V1/V2 files.
974+
- Defined Asset Tool V2 active scope around Game Configuration handoff, asset library records, import preview, validation, and status output.
975+
- Added SQL-shaped mock repository tables in `toolbox/assets/assets-mock-repository.js`:
976+
- `asset_library_items`
977+
- `asset_import_events`
978+
- `asset_validation_items`
979+
- Rebuilt `toolbox/assets/index.html` as a first-class Theme V2 tool shell using existing shared layout, form table, cards, tables, panels, status, and Tool Display Mode wiring.
980+
- Added `toolbox/assets/assets.js` runtime wiring for ready/missing Game Configuration handoff, library rendering, import, preview, visible validation errors, seed/reset actions, and readable output.
981+
- Updated `toolbox/toolRegistry.js` so Assets requires Game Configuration and reports Ready for this mock-runtime slice.
982+
- Added `asset-tool` targeted lane to `scripts/run-targeted-test-lanes.mjs`.
983+
- Added `tests/playwright/tools/AssetToolMockRepository.spec.mjs`.
984+
- Updated existing Toolbox/Tools Progress/Project Workspace test expectations for Assets becoming the fourth Ready normal-user tool.
985+
- Did not add CSS.
986+
- Did not modify `start_of_day`.
987+
988+
Validation:
989+
- `node --check toolbox/assets/assets-mock-repository.js`
990+
- `node --check toolbox/assets/assets.js`
991+
- `node --check tests/playwright/tools/AssetToolMockRepository.spec.mjs`
992+
- `node --check scripts/run-targeted-test-lanes.mjs`
993+
- `node --check tests/playwright/tools/RootToolsFutureState.spec.mjs`
994+
- `node --check tests/playwright/tools/ProjectWorkspaceMockRepository.spec.mjs`
995+
- `node --check tests/playwright/tools/ToolsProgressHydration.spec.mjs`
996+
- `node --check toolbox/toolRegistry.js`
997+
- `node ./scripts/run-targeted-test-lanes.mjs --lane asset-tool --lane tools-progress --lane tool-runtime --lane build-path --lane project-workspace`
998+
- `node scripts/validate-tool-registry.mjs`
999+
- `node scripts/validate-active-tools-surface.mjs`
1000+
- Full samples smoke: skipped by request and because samples were not changed.
1001+
1002+
Required reports:
1003+
- `docs_build/dev/reports/asset-tool-rebuild-stacked-report.md`
1004+
- `docs_build/dev/reports/testing_lane_execution_report.md`
1005+
- `docs_build/dev/reports/codex_changed_files.txt`
1006+
- `docs_build/dev/reports/codex_review.diff`

docs_build/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Consolidate Toolbox registry and workflow foundation - PR_26156_129-135
1+
Rebuild Assets tool mock library and import preview - PR_26156_136-141
Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
# PR_26156_136-141 Asset Tool Rebuild Stacked Report
2+
3+
## Scope
4+
5+
Executed stacked bundle:
6+
- `PR_26156_136-asset-tool-reference-audit`
7+
- `PR_26156_137-asset-tool-data-contract`
8+
- `PR_26156_138-asset-tool-shell-runtime`
9+
- `PR_26156_139-asset-tool-db-backed-library`
10+
- `PR_26156_140-asset-tool-import-preview`
11+
- `PR_26156_141-asset-tool-validation-playwright`
12+
13+
Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` first.
14+
15+
Did not modify:
16+
- `archive/v1-v2/`
17+
- `start_of_day/`
18+
- sample smoke surfaces
19+
20+
No new CSS was added.
21+
22+
## PR_26156_136 - Reference Audit
23+
24+
Archived reference reviewed:
25+
26+
`archive/v1-v2/tools/old_asset-manager-v2/index.html`
27+
28+
Reference-only functionality expectations identified:
29+
- launch guard / required project context
30+
- asset type selection
31+
- role/usage/path fields
32+
- import controls
33+
- asset library list
34+
- selected asset detail and preview
35+
- output/status/validation surfaces
36+
- import/export style data ownership
37+
38+
The active rebuild did not copy archive code, local CSS, archive scripts, or archive class naming. The archive remains reference material only.
39+
40+
Asset Tool V2 active scope for this stack:
41+
- first-class Theme V2 Toolbox shell
42+
- Game Configuration readiness handoff
43+
- SQL-shaped mock asset repository
44+
- path-based asset records
45+
- import/preview workflow
46+
- visible validation errors
47+
- targeted Playwright lane
48+
49+
Out of scope:
50+
- real database
51+
- auth
52+
- cloud upload
53+
- binary persistence
54+
- export packaging
55+
- Asset work outside `toolbox/assets/`
56+
57+
## PR_26156_137 - Data Contract
58+
59+
Added `toolbox/assets/assets-mock-repository.js`.
60+
61+
Repository tables:
62+
- `asset_library_items`
63+
- `asset_import_events`
64+
- `asset_validation_items`
65+
66+
Owned by Asset Tool:
67+
- asset name
68+
- type
69+
- role
70+
- project-relative path
71+
- source file name
72+
- MIME type
73+
- file size
74+
- preview kind
75+
- asset status
76+
- import event records
77+
- validation rows
78+
79+
Owned by upstream tools:
80+
- Project Workspace owns project identity and ownership.
81+
- Game Design owns design intent.
82+
- Game Configuration owns playable configuration readiness.
83+
84+
Persistence boundary:
85+
- mock repository only
86+
- no real DB
87+
- no localStorage/sessionStorage contract
88+
- no cloud
89+
- no binary file persistence
90+
- no image data URL contract
91+
92+
## PR_26156_138 - Shell Runtime
93+
94+
Rebuilt `toolbox/assets/index.html` as a first-class Theme V2 tool page using:
95+
- shared header/footer partials
96+
- Tool Display Mode host
97+
- wide tool workspace
98+
- left setup/import panel
99+
- center library/preview panel
100+
- right output/validation/table/status inspector
101+
- existing Theme V2 `tool-form-table` pattern
102+
103+
Updated `toolbox/toolRegistry.js`:
104+
- Assets now requires Game Configuration.
105+
- Assets status is `Ready` because this stack adds a testable mock-runtime library/import slice.
106+
- Assets remains in the Content Toolbox group and Design color group.
107+
108+
## PR_26156_139 - DB-Backed Library
109+
110+
Added SQL-shaped mock asset library behavior:
111+
- seeded Demo Player Sprite record
112+
- import event records
113+
- table counts
114+
- selected asset state
115+
- readable library status
116+
- readiness handoff from Game Configuration
117+
118+
The implementation uses in-memory module state only.
119+
120+
## PR_26156_140 - Import Preview
121+
122+
Added testable import and preview workflow:
123+
- file input derives file name/path defaults when empty
124+
- form submit imports path-based asset records
125+
- preview text shows type-specific preview, path, and source file name
126+
- visible validation blocks invalid project-relative paths
127+
- missing Game Configuration handoff shows a visible requirements overlay
128+
129+
No page-local CSS, inline styles, style blocks, script blocks, or inline event handlers were added.
130+
131+
## PR_26156_141 - Targeted Playwright
132+
133+
Added `tests/playwright/tools/AssetToolMockRepository.spec.mjs`.
134+
135+
Coverage:
136+
- SQL-shaped table ownership
137+
- absence of embedded image data URL persistence
138+
- Assets page load
139+
- ready Game Configuration handoff
140+
- seeded asset library
141+
- import workflow
142+
- preview output
143+
- validation error display
144+
- missing handoff overlay
145+
- no console errors or failed requests
146+
147+
Added `asset-tool` to `scripts/run-targeted-test-lanes.mjs` as the narrow Asset Tool lane.
148+
149+
## Validation
150+
151+
Impacted lanes:
152+
- `asset-tool`
153+
- `build-path`
154+
- `tools-progress`
155+
- `tool-runtime`
156+
- `project-workspace`
157+
158+
Why these lanes ran:
159+
- `asset-tool`: new Asset repository/page/runtime/test lane.
160+
- `build-path`: Assets status changed to Ready and Build Path consumes registry status.
161+
- `tools-progress`: Admin Tools Progress consumes registry metadata.
162+
- `tool-runtime`: Toolbox normal-user visibility changed because Assets is now Ready.
163+
- `project-workspace`: existing Project Workspace Playwright assertions cover Toolbox role filters affected by Ready-tool count.
164+
165+
Commands run:
166+
- `node --check toolbox/assets/assets-mock-repository.js`
167+
- `node --check toolbox/assets/assets.js`
168+
- `node --check tests/playwright/tools/AssetToolMockRepository.spec.mjs`
169+
- `node --check scripts/run-targeted-test-lanes.mjs`
170+
- `node --check tests/playwright/tools/RootToolsFutureState.spec.mjs`
171+
- `node --check tests/playwright/tools/ProjectWorkspaceMockRepository.spec.mjs`
172+
- `node --check tests/playwright/tools/ToolsProgressHydration.spec.mjs`
173+
- `node --check toolbox/toolRegistry.js`
174+
- Existing changed JavaScript/MJS syntax check using `node --check`
175+
- `node ./scripts/run-targeted-test-lanes.mjs --lane asset-tool --lane tools-progress --lane tool-runtime --lane build-path --lane project-workspace`
176+
- `node scripts/validate-tool-registry.mjs`
177+
- `node scripts/validate-active-tools-surface.mjs`
178+
- `git diff --check`
179+
180+
Targeted lane result: PASS. See `docs_build/dev/reports/testing_lane_execution_report.md`.
181+
182+
Skipped lanes:
183+
- `workspace-contract`
184+
- `game-design`
185+
- `game-configuration`
186+
- `tool-navigation`
187+
- `tool-display-mode`
188+
- `tool-images`
189+
- `game-runtime`
190+
- `integration`
191+
- `engine-src`
192+
- `samples`
193+
194+
Skipped-lane rationale:
195+
- Game Design and Game Configuration runtime behavior was not changed.
196+
- Tool navigation, Tool Display Mode layout, image registry, engine source, games, samples, and archive surfaces were not modified.
197+
- Full samples smoke was skipped because this stack does not modify samples, sample JSON, sample loader behavior, or sample runtime framework behavior.

0 commit comments

Comments
 (0)