Skip to content

Commit a63adb6

Browse files
committed
Complete Tags registration and Assets MVP table ownership fixes - PR_26163_071-tags-assets-completion-fixes
1 parent 234dd2a commit a63adb6

48 files changed

Lines changed: 2161 additions & 4465 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
1.85 MB
Loading
9.61 KB
Loading
2.29 MB
Loading
177 KB
Loading

docs_build/dev/admin-notes/PS_commands.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ tree /f
1010

1111
- resize images:
1212
-- output may not be 64x64 if not a square
13-
magick "image1.png" -resize 64x64 "image2.png"
13+
14+
magick "image1-1024.png" -resize 64x64 "image1.png"
15+
magick "image2-1024.png" -resize 400x225 "image2.png"
1416

1517
-- force the output to be exactly 64×64 regardless of aspect ratio:
1618
magick "image1.png" -resize 64x64! "image2.png"
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# PR_26163_071-tags-assets-completion-fixes
2+
3+
## Branch Validation
4+
- PASS: current branch `main`.
5+
- Expected branch: `main`.
6+
7+
## Impacted Lanes
8+
- Toolbox runtime lane: Tags and Assets tool surfaces.
9+
- Integration lane: Toolbox registry/menu/tile image metadata.
10+
- Mock DB adapter lane: Tags/Assets repository table shape and ownership/audit fields.
11+
- Playwright impacted: Yes.
12+
13+
## Requirement Checklist
14+
- PASS: Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` before implementation.
15+
- PASS: `toolbox/tags/index.html` now places `Add Tag` under the Tags table. Evidence: `TagsTool.spec.mjs` asserts `[data-tags-add]` is inside the Tags table card and not inside an aside.
16+
- PASS: Tags columns remain `Tag Name`, `Description`, `Usage Count`, `Actions`.
17+
- PASS: Tags nested usage table still renders `Tool` and `Item Name`. Evidence: `TagsTool.spec.mjs` validates the expanded usage row.
18+
- PASS: Tags registration is complete for active surfaces. Evidence: `/api/toolbox/registry/snapshot` returns Tags with `route: toolbox/tags/index.html`, `visibleInToolsList: true`, and `/toolbox/index.html` renders the Tags tile.
19+
- PASS: `toolbox/workspace-manager-v2/index.html` registration is N/A in this checkout. Evidence: `Test-Path toolbox/workspace-manager-v2/index.html` returned `False`; `rg --files toolbox | rg "workspace-manager-v2/index.html"` returned no matches.
20+
- PASS: Tags visual identity no longer reuses Assets artwork. Evidence: Tags registry and page now use `assets/theme-v2/images/badges/tags.png` and `assets/theme-v2/images/tools/tags.png`; tests assert neither path is an Assets image.
21+
- PASS: Assets active MVP asset types are only `Images`, `Audio`, `Fonts`, `Sprites`, `Vectors`, `Palette References`, `Data`.
22+
- PASS: Upload-based asset tables show `Source`, `File`, `Usage`, `Tags`, `Preview`, `Actions`.
23+
- PASS: Reference-based asset tables show `Reference`, `Usage`, `Tags`, `Preview`, `Actions`.
24+
- PASS: Legacy active asset roles `Color`, `Localization`, `Shader`, and `Video` are absent from active Assets runtime behavior. Search evidence: `rg -n "Projectile|\\bColor\\b|Localization|Shader|Video" toolbox/assets src/dev-runtime/persistence/tool-repositories/assets-mock-repository.js src/dev-runtime/persistence/mock-db-store.js toolbox/assets/assets.js` returned no matches.
25+
- PASS: Active usage dropdown values are limited to `Background`, `Character`, `Enemy`, `Environment`, `Font`, `Icon`, `Interface`, `Music`, `Sound Effect`, `Sprite`, `Theme`, `Tile`, `Voice`.
26+
- PASS: `Projectile` is absent from active Assets usage dropdowns. Evidence: Playwright asserts usage options exactly match the requested list and do not contain `Projectile`.
27+
- PASS: Asset tag fields use shared workspace Tags type-ahead. Evidence: Playwright creates a shared Tags record, uses the Assets `Asset Tags` type-ahead/list field, adds the shared tag token, and validates usage count references.
28+
- PASS: Ownership/audit fields are present. Evidence: repository tests assert populated Tags/Assets rows include `key`, `createdAt`, `updatedAt`, `createdBy`, and `updatedBy`.
29+
- PASS: User-owned Assets records remain owner-scoped. Evidence: Playwright adds an asset as user1, switches to user2 and confirms it is hidden, then switches back to user1 and confirms it remains editable/deletable.
30+
- PASS: No archive runtime code is used. Evidence: Tags/Assets Playwright asserts runtime script/link references do not contain `archive/v1-v2`.
31+
- PASS: Theme V2 HTML restrictions preserved. Evidence: `rg --pcre2 -n "<script(?![^>]*\\bsrc=)|<style\\b|\\son[a-z]+\\s*=" toolbox/assets/index.html toolbox/tags/index.html` returned no matches.
32+
33+
## Changed Files
34+
- `assets/theme-v2/images/badges/tags-1024.png`
35+
- `assets/theme-v2/images/badges/tags.png`
36+
- `assets/theme-v2/images/tools/tags-1024.png`
37+
- `assets/theme-v2/images/tools/tags.png`
38+
- `docs_build/tools-images-generated/tags.txt`
39+
- `src/dev-runtime/guest-seeds/tool-metadata-inventory.js`
40+
- `src/dev-runtime/persistence/mock-db-store.js`
41+
- `src/dev-runtime/persistence/tool-repositories/assets-mock-repository.js`
42+
- `src/dev-runtime/persistence/tool-repositories/tags-mock-repository.js`
43+
- `tests/playwright/tools/AssetToolMockRepository.spec.mjs`
44+
- `tests/playwright/tools/TagsTool.spec.mjs`
45+
- `toolbox/assets/assets.js`
46+
- `toolbox/tags/index.html`
47+
- Validation-generated reports under `docs_build/dev/reports/*`.
48+
49+
## Validation Performed
50+
- PASS: `node --check toolbox/assets/assets.js`
51+
- PASS: `node --check toolbox/tags/tags.js`
52+
- PASS: `node --check src/dev-runtime/persistence/tool-repositories/assets-mock-repository.js`
53+
- PASS: `node --check src/dev-runtime/persistence/tool-repositories/tags-mock-repository.js`
54+
- PASS: `node --check src/dev-runtime/persistence/mock-db-store.js`
55+
- PASS: `node --check src/dev-runtime/guest-seeds/tool-metadata-inventory.js`
56+
- PASS: `node --check tests/playwright/tools/AssetToolMockRepository.spec.mjs`
57+
- PASS: `node --check tests/playwright/tools/TagsTool.spec.mjs`
58+
- PASS: `npx playwright test tests/playwright/tools/TagsTool.spec.mjs tests/playwright/tools/AssetToolMockRepository.spec.mjs --reporter=line --workers=1` (4 passed)
59+
- PASS: `npx playwright test tests/playwright/tools/ToolImageRegistry.spec.mjs --reporter=line --workers=1` (5 passed)
60+
- PASS: `npx playwright test tests/playwright/tools/ToolboxAdminMetadataSsot.spec.mjs --reporter=line --workers=1` (4 passed)
61+
- PASS: `npm run test:workspace-v2` (workspace-contract lane, 5 passed)
62+
63+
## Playwright Result
64+
- PASS: Targeted Tags/Assets Playwright behavior checks passed.
65+
- PASS: Toolbox image registry checks passed.
66+
- PASS: Workspace contract lane passed through `npm run test:workspace-v2`.
67+
68+
## V8 Coverage
69+
- PASS/WARN: `docs_build/dev/reports/playwright_v8_coverage_report.txt` produced.
70+
- PASS: Browser runtime coverage includes `toolbox/assets/assets.js` at 96%, `toolbox/tags/tags.js` at 100%, `toolbox/assets/assets-api-client.js` at 67%, and `toolbox/tags/tags-api-client.js` at 100%.
71+
- WARN: Dev-runtime repository and mock DB modules are server/dev adapter code and were not collected by browser V8 coverage; covered by direct repository tests and syntax checks.
72+
73+
## Skipped Lanes
74+
- SKIP: Full samples smoke. Safe to skip because this PR is scoped to Tags, Assets, toolbox registration, and mock repository/table contracts; sample JSON/runtime alignment is explicitly out of scope.
75+
- SKIP: Engine lane. Safe to skip because no `src/engine/input`, parser, renderer, or game runtime engine behavior changed.
76+
- SKIP: Production auth/account lanes. Safe to skip because no auth, production DB, or account behavior changed.
77+
78+
## Manual Validation Steps
79+
1. Open `/toolbox/tags/index.html`.
80+
2. Confirm the Tags table shows `Tag Name`, `Description`, `Usage Count`, and `Actions`, with `Add Tag` below the table.
81+
3. Add a tag, expand usage, edit it, and delete it.
82+
4. Open `/toolbox/index.html` and confirm the Tags tile appears with Tags artwork.
83+
5. Open `/toolbox/assets/index.html`.
84+
6. Confirm only the seven MVP asset accordions appear.
85+
7. Confirm upload tables use Source/File columns and reference tables use Reference.
86+
8. Add an Images asset, choose a shared Tag from the type-ahead, save, view, edit, reload, and delete.
87+
9. Confirm no `Projectile`, `Color`, `Localization`, `Shader`, or `Video` options appear in active Assets behavior.
88+
89+
## Samples Decision
90+
- SKIP: Full samples smoke was not run. The PR does not touch samples, game manifests, sample JSON, or runtime engine behavior.
Lines changed: 46 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# git status --short
2-
M docs_build/dev/reports/coverage_changed_js_guardrail.txt
2+
M docs_build/dev/admin-notes/PS_commands.txt
3+
M docs_build/dev/reports/coverage_changed_js_guardrail.txt
34
M docs_build/dev/reports/dependency_gating_report.md
45
M docs_build/dev/reports/dependency_hydration_reuse_report.md
56
M docs_build/dev/reports/execution_graph_reuse_report.md
@@ -33,70 +34,65 @@ M docs_build/dev/reports/coverage_changed_js_guardrail.txt
3334
M src/dev-runtime/guest-seeds/tool-metadata-inventory.js
3435
M src/dev-runtime/persistence/mock-db-store.js
3536
M src/dev-runtime/persistence/tool-repositories/assets-mock-repository.js
36-
M src/dev-runtime/server/mock-api-router.mjs
37+
M src/dev-runtime/persistence/tool-repositories/tags-mock-repository.js
3738
M tests/playwright/tools/AssetToolMockRepository.spec.mjs
38-
M tests/playwright/tools/BuildPathProgressSimplification.spec.mjs
39-
M tests/playwright/tools/RootToolsFutureState.spec.mjs
40-
M tests/playwright/tools/ToolboxAdminMetadataSsot.spec.mjs
41-
M tests/playwright/tools/ToolboxRoutePages.spec.mjs
42-
M toolbox/assets/assets-api-client.js
39+
M tests/playwright/tools/TagsTool.spec.mjs
4340
M toolbox/assets/assets.js
44-
M toolbox/assets/index.html
45-
?? docs_build/dev/reports/PR_26163_070-tags-and-assets-mvp-build.md
46-
?? src/dev-runtime/persistence/tool-repositories/tags-mock-repository.js
47-
?? tests/playwright/tools/TagsTool.spec.mjs
48-
?? toolbox/tags/
41+
M toolbox/tags/index.html
42+
?? assets/theme-v2/images/badges/tags-1024.png
43+
?? assets/theme-v2/images/badges/tags.png
44+
?? assets/theme-v2/images/tools/tags-1024.png
45+
?? assets/theme-v2/images/tools/tags.png
46+
?? docs_build/dev/reports/PR_26163_071-tags-assets-completion-fixes.md
47+
?? docs_build/tools-images-generated/tags.txt
4948

5049
# git ls-files --others --exclude-standard
51-
docs_build/dev/reports/PR_26163_070-tags-and-assets-mvp-build.md
52-
src/dev-runtime/persistence/tool-repositories/tags-mock-repository.js
53-
tests/playwright/tools/TagsTool.spec.mjs
54-
toolbox/tags/index.html
55-
toolbox/tags/tags-api-client.js
56-
toolbox/tags/tags.js
50+
assets/theme-v2/images/badges/tags-1024.png
51+
assets/theme-v2/images/badges/tags.png
52+
assets/theme-v2/images/tools/tags-1024.png
53+
assets/theme-v2/images/tools/tags.png
54+
docs_build/dev/reports/PR_26163_071-tags-assets-completion-fixes.md
55+
docs_build/tools-images-generated/tags.txt
5756

5857
# git diff --stat
59-
.../dev/reports/coverage_changed_js_guardrail.txt | 16 +-
58+
docs_build/dev/admin-notes/PS_commands.txt | 4 +-
59+
.../dev/reports/coverage_changed_js_guardrail.txt | 2 +-
6060
docs_build/dev/reports/dependency_gating_report.md | 2 +-
61-
.../reports/dependency_hydration_reuse_report.md | 4 +-
62-
.../dev/reports/execution_graph_reuse_report.md | 4 +-
61+
.../reports/dependency_hydration_reuse_report.md | 12 +-
62+
.../dev/reports/execution_graph_reuse_report.md | 16 +-
6363
.../dev/reports/failure_fingerprint_report.md | 2 +-
6464
.../reports/filesystem_scan_reduction_report.md | 2 +-
65-
.../dev/reports/incremental_validation_report.md | 4 +-
65+
.../dev/reports/incremental_validation_report.md | 14 +-
6666
docs_build/dev/reports/lane_compilation_report.md | 2 +-
6767
.../dev/reports/lane_deduplication_report.md | 2 +-
6868
.../dev/reports/lane_input_validation_report.md | 2 +-
69-
.../reports/lane_manifests/workspace-contract.json | 14 +-
70-
.../reports/lane_runtime_optimization_report.md | 2 +-
71-
docs_build/dev/reports/lane_snapshot_report.md | 4 +-
72-
.../reports/lane_snapshots/workspace-contract.json | 28 +-
73-
docs_build/dev/reports/lane_warm_start_report.md | 4 +-
74-
.../lane_warm_starts/workspace-contract.json | 18 +-
69+
.../reports/lane_manifests/workspace-contract.json | 10 +-
70+
.../reports/lane_runtime_optimization_report.md | 14 +-
71+
docs_build/dev/reports/lane_snapshot_report.md | 12 +-
72+
.../reports/lane_snapshots/workspace-contract.json | 22 +-
73+
docs_build/dev/reports/lane_warm_start_report.md | 12 +-
74+
.../lane_warm_starts/workspace-contract.json | 16 +-
7575
.../dev/reports/monolith_trigger_removal_report.md | 2 +-
76-
.../dev/reports/persistent_lane_manifest_report.md | 6 +-
76+
.../dev/reports/persistent_lane_manifest_report.md | 12 +-
7777
.../playwright_discovery_ownership_report.md | 2 +-
7878
.../reports/playwright_discovery_scope_report.md | 2 +-
7979
.../dev/reports/playwright_structure_audit.md | 2 +-
80-
.../dev/reports/playwright_v8_coverage_report.txt | 34 +-
80+
.../dev/reports/playwright_v8_coverage_report.txt | 14 +-
8181
docs_build/dev/reports/retry_suppression_report.md | 2 +-
82-
docs_build/dev/reports/slow_path_pruning_report.md | 12 +-
83-
docs_build/dev/reports/static_validation_report.md | 4 +-
84-
.../dev/reports/targeted_file_manifest_report.md | 4 +-
85-
.../dev/reports/test_cleanup_performance_report.md | 14 +-
82+
docs_build/dev/reports/slow_path_pruning_report.md | 16 +-
83+
docs_build/dev/reports/static_validation_report.md | 12 +-
84+
.../dev/reports/targeted_file_manifest_report.md | 8 +-
85+
.../dev/reports/test_cleanup_performance_report.md | 22 +-
8686
.../dev/reports/test_cleanup_routing_report.md | 2 +-
87-
.../dev/reports/testing_lane_execution_report.md | 16 +-
88-
docs_build/dev/reports/validation_cache_report.md | 30 +-
89-
.../dev/reports/zero_browser_preflight_report.md | 2 +-
90-
.../guest-seeds/tool-metadata-inventory.js | 36 +
91-
src/dev-runtime/persistence/mock-db-store.js | 7 +-
92-
.../tool-repositories/assets-mock-repository.js | 323 ++++++++
93-
src/dev-runtime/server/mock-api-router.mjs | 35 +-
94-
.../tools/AssetToolMockRepository.spec.mjs | 600 +++-----------
95-
.../tools/BuildPathProgressSimplification.spec.mjs | 16 +-
96-
.../playwright/tools/RootToolsFutureState.spec.mjs | 12 +-
97-
.../tools/ToolboxAdminMetadataSsot.spec.mjs | 8 +-
98-
tests/playwright/tools/ToolboxRoutePages.spec.mjs | 43 +-
99-
toolbox/assets/assets-api-client.js | 2 +
100-
toolbox/assets/assets.js | 901 +++++++++------------
101-
toolbox/assets/index.html | 168 +---
102-
43 files changed, 1094 insertions(+), 1301 deletions(-)
87+
.../dev/reports/testing_lane_execution_report.md | 52 ++---
88+
docs_build/dev/reports/validation_cache_report.md | 30 +--
89+
.../dev/reports/zero_browser_preflight_report.md | 10 +-
90+
.../guest-seeds/tool-metadata-inventory.js | 6 +-
91+
src/dev-runtime/persistence/mock-db-store.js | 2 +-
92+
.../tool-repositories/assets-mock-repository.js | 228 ++++++++-------------
93+
.../tool-repositories/tags-mock-repository.js | 1 +
94+
.../tools/AssetToolMockRepository.spec.mjs | 56 ++++-
95+
tests/playwright/tools/TagsTool.spec.mjs | 27 +++
96+
toolbox/assets/assets.js | 92 +++++++--
97+
toolbox/tags/index.html | 11 +-
98+
40 files changed, 417 insertions(+), 340 deletions(-)

0 commit comments

Comments
 (0)