Skip to content

Commit 8da9ed5

Browse files
committed
Complete Sprites testable MVP
1 parent 1b49270 commit 8da9ed5

17 files changed

Lines changed: 3052 additions & 171 deletions

assets/toolbox/sprites/js/index.js

Lines changed: 503 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# PR_26177_CHARLIE_018-sprites-testable-mvp-completion
2+
3+
Team: Charlie
4+
5+
Status: PASS
6+
7+
## Scope
8+
9+
Completed the Sprites MVP to a manually testable state without splitting additional PRs.
10+
11+
Implemented:
12+
- Toolbox Sprites entry is active/clickable through the source-controlled registry.
13+
- `/toolbox/sprites/index.html` loads a Theme V2 Sprites workspace.
14+
- Sprites uses Web UI -> API/service contract -> asset repository.
15+
- Sprite list/create/edit/archive flows are API-backed through `/api/toolbox/sprites`.
16+
- Guest save attempts redirect to `account/sign-in.html`.
17+
- Preview/metadata surface shows product-safe metadata and explicit unavailable preview state.
18+
- Palette/Colors remains reusable color SSoT; Sprites stores `paletteColorKey` only.
19+
- Search/filter/status/category/tag controls are available.
20+
- Reference protection disables destructive delete and shows explicit unavailable Object/World reference state.
21+
22+
## Changed Files
23+
24+
- `assets/toolbox/sprites/js/index.js`
25+
- `docs_build/dev/reports/coverage_changed_js_guardrail.txt`
26+
- `docs_build/dev/reports/playwright_v8_coverage_report.txt`
27+
- `src/dev-runtime/persistence/tool-repositories/assets-mock-repository.js`
28+
- `src/dev-runtime/server/local-api-router.mjs`
29+
- `src/shared/toolbox/tool-metadata-inventory.js`
30+
- `tests/dev-runtime/SpritesAssetRepository.test.mjs`
31+
- `tests/playwright/tools/SpritesToolMvp.spec.mjs`
32+
- `tests/playwright/tools/ToolboxRoutePages.spec.mjs`
33+
- `toolbox/sprites/index.html`
34+
35+
## Validation
36+
37+
PASS `node ./scripts/run-node-test-files.mjs tests/dev-runtime/SpritesAssetRepository.test.mjs`
38+
39+
PASS `npx playwright test tests/playwright/tools/SpritesToolMvp.spec.mjs --workers=1 --reporter=list`
40+
41+
PASS `npx playwright test tests/playwright/tools/ToolNavigationPrevNext.spec.mjs -g "Toolbox card names link" --workers=1 --reporter=list`
42+
43+
PASS `npx playwright test tests/playwright/tools/ToolboxRoutePages.spec.mjs -g "toolbox index shows wireframe and beta tools|toolbox status kickers" --workers=1 --reporter=list`
44+
45+
Note: one combined Toolbox status run hit a Playwright artifact timeout after the index test passed; the exact status test was rerun independently and passed.
46+
47+
PASS `npx playwright test tests/playwright/tools/ToolboxRoutePages.spec.mjs -g "toolbox status kickers, filters, card order, and voting controls work from registry metadata" --workers=1 --reporter=list --timeout=180000`
48+
49+
PASS `npx playwright test tests/playwright/tools/ToolboxRoutePages.spec.mjs -g "toolbox Build Path status filters" --workers=1 --reporter=list --timeout=180000`
50+
51+
PASS `git diff --check`
52+
53+
PASS static scan for inline style/script/event handler usage in Sprites HTML/JS.
54+
55+
PASS static scan for forbidden Sprites persistence patterns in Sprites HTML/JS.
56+
57+
## Notes
58+
59+
- No `start_of_day` files changed.
60+
- No browser storage product-data SSoT introduced.
61+
- No MEM DB, local-mem, fake-login, SQLite direction, or silent product-data fallback introduced.
62+
- Sprites deliberately reuses the existing asset repository through a Sprites API alias rather than adding a parallel database architecture.
63+
- Destructive delete remains disabled until Object/World reference contracts can verify real references.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Branch Validation
2+
3+
PR: PR_26177_CHARLIE_018-sprites-testable-mvp-completion
4+
5+
Status: PASS
6+
7+
## Branch Gate
8+
9+
- Current branch: `PR_26177_CHARLIE_018-sprites-testable-mvp-completion`
10+
- Started after synced `main`: PASS
11+
- Worktree before implementation: clean on new PR branch
12+
- Remote upstream: not present until PR018 push
13+
14+
## Scope Gate
15+
16+
- No `start_of_day` files changed: PASS
17+
- One PR purpose only: PASS
18+
- No unrelated cleanup: PASS
19+
- Runtime/API/UI changes limited to Sprites MVP testability and affected Toolbox metadata/tests: PASS
20+
- No direct commits to `main`: PASS
21+
22+
## Changed-File Check
23+
24+
PASS: changed files are Sprites UI/API contract, affected Toolbox metadata/tests, required reports, and generated validation coverage reports.
25+
26+
## Final Branch State Before Commit
27+
28+
Pending commit/push at report generation time.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Manual Validation Notes
2+
3+
PR: PR_26177_CHARLIE_018-sprites-testable-mvp-completion
4+
5+
Status: PASS
6+
7+
## Manual Test Steps
8+
9+
1. Start the local API/site server.
10+
2. Open `/toolbox/index.html`.
11+
3. Confirm the Sprites card is visible without enabling Planned tools.
12+
4. Click Sprites and confirm navigation to `/toolbox/sprites/index.html`.
13+
5. Confirm the Sprites table, summary cards, filters, preview, metadata, references, and validation panels render.
14+
6. Click `Add Sprite`.
15+
7. Enter `Hero Sprite`.
16+
8. Select category `Character`.
17+
9. Save and confirm a row appears with status `Ready`.
18+
10. Click `Edit`, change the name to `Hero Sprite Revised`, choose category `Icon`, and save.
19+
11. Search for `revised` and confirm only the matching sprite remains visible.
20+
12. Filter category `Icon` and confirm the matching sprite remains visible.
21+
13. Click `Archive` and confirm status changes to `Archived`.
22+
14. Confirm the metadata panel shows key, file/source details, size/dimensions unavailable where appropriate, palette color key, updated by, and updated at.
23+
15. Confirm the reference panel says destructive delete is disabled until Object/World reference contracts are available.
24+
16. Sign out or set a guest session.
25+
17. Open `/toolbox/sprites/index.html`, click `Add Sprite`, enter a name, and save.
26+
18. Confirm the browser redirects to `/account/sign-in.html`.
27+
19. Confirm Palette/Colors references are shown by key only and no Sprites-owned reusable color definitions are present.
28+
29+
## Manual Notes
30+
31+
- Preview is intentionally metadata-safe until storage/image byte preview integration is available.
32+
- Palette/Colors empty state is explicit when no reusable color records are available.
33+
- Destructive delete is intentionally unavailable; archive is the supported MVP lifecycle operation.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Requirement Checklist
2+
3+
PR: PR_26177_CHARLIE_018-sprites-testable-mvp-completion
4+
5+
Status: PASS
6+
7+
- PASS Ensure `/toolbox/index.html` Sprites is active/clickable.
8+
- PASS Ensure `/toolbox/sprites/index.html` loads.
9+
- PASS Ensure Sprites tool has working table/list surface.
10+
- PASS Ensure API-backed list/create/edit/archive works.
11+
- PASS Ensure guest save redirects to `account/sign-in.html`.
12+
- PASS Ensure preview/metadata surface works or shows explicit product-safe unavailable state.
13+
- PASS Ensure Palette/Colors is the only source for reusable colors.
14+
- PASS Ensure Sprites references Palette/Colors by key only.
15+
- PASS Ensure Sprites does not own color definitions or page-local color arrays.
16+
- PASS Ensure search/filter/tags/categories work where supported.
17+
- PASS Ensure reference viewer/delete protection works or shows clear empty state.
18+
- PASS Remove planned state where it blocks Sprites testing.
19+
- PASS Keep Theme V2 compliance.
20+
- PASS No inline CSS, inline JS, style blocks, script blocks, or inline event handlers in Sprites page.
21+
- PASS Do not modify `start_of_day` folders.
22+
- PASS No unrelated cleanup.
23+
- PASS Do not introduce MEM DB, local-mem, fake-login, browser-owned product data, browser storage product-data SSoT, SQLite direction, or silent fallbacks.
24+
- PASS Maintain Web UI -> API/service contract -> database/repository flow.
25+
- PASS Browser does not generate authoritative database keys.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Validation Lane
2+
3+
PR: PR_26177_CHARLIE_018-sprites-testable-mvp-completion
4+
5+
Status: PASS
6+
7+
## Commands
8+
9+
```text
10+
node ./scripts/run-node-test-files.mjs tests/dev-runtime/SpritesAssetRepository.test.mjs
11+
PASS tests/dev-runtime/SpritesAssetRepository.test.mjs
12+
1/1 targeted node test file(s) passed.
13+
```
14+
15+
```text
16+
npx playwright test tests/playwright/tools/SpritesToolMvp.spec.mjs --workers=1 --reporter=list
17+
3 passed
18+
```
19+
20+
```text
21+
npx playwright test tests/playwright/tools/ToolNavigationPrevNext.spec.mjs -g "Toolbox card names link" --workers=1 --reporter=list
22+
1 passed
23+
```
24+
25+
```text
26+
npx playwright test tests/playwright/tools/ToolboxRoutePages.spec.mjs -g "toolbox index shows wireframe and beta tools|toolbox status kickers" --workers=1 --reporter=list
27+
1 passed, 1 Playwright artifact timeout
28+
```
29+
30+
```text
31+
npx playwright test tests/playwright/tools/ToolboxRoutePages.spec.mjs -g "toolbox status kickers, filters, card order, and voting controls work from registry metadata" --workers=1 --reporter=list --timeout=180000
32+
1 passed
33+
```
34+
35+
```text
36+
npx playwright test tests/playwright/tools/ToolboxRoutePages.spec.mjs -g "toolbox Build Path status filters" --workers=1 --reporter=list --timeout=180000
37+
1 passed
38+
```
39+
40+
```text
41+
git diff --check
42+
PASS
43+
```
44+
45+
## Static Checks
46+
47+
- PASS Sprites HTML/JS has no inline style/script/event handler matches.
48+
- PASS Sprites HTML/JS has no browser storage product-data SSoT matches.
49+
- PASS No `start_of_day` changed files.
50+
- NOTE Broad scan over all changed files finds pre-existing hex literals in `tests/playwright/tools/ToolboxRoutePages.spec.mjs`; Sprites implementation does not introduce reusable color definitions.
Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,36 @@
1-
docs_build/dev/ProjectInstructions/backlog/BACKLOG_MASTER.md
2-
docs_build/dev/ProjectInstructions/team_assignments/team_ownership.md
3-
docs_build/dev/reports/PR_26177_DELTA_001-hitboxes-team-ownership.md
4-
docs_build/dev/reports/PR_26177_DELTA_001-hitboxes-team-ownership_branch-validation.md
5-
docs_build/dev/reports/PR_26177_DELTA_001-hitboxes-team-ownership_validation-checklist.md
6-
docs_build/dev/reports/codex_changed_files.txt
7-
docs_build/dev/reports/codex_review.diff
1+
# git status --short
2+
M docs_build/dev/reports/coverage_changed_js_guardrail.txt
3+
M docs_build/dev/reports/playwright_v8_coverage_report.txt
4+
M src/dev-runtime/persistence/tool-repositories/assets-mock-repository.js
5+
M src/dev-runtime/server/local-api-router.mjs
6+
M src/shared/toolbox/tool-metadata-inventory.js
7+
M tests/playwright/tools/ToolboxRoutePages.spec.mjs
8+
M toolbox/sprites/index.html
9+
?? assets/toolbox/sprites/
10+
?? docs_build/dev/reports/PR_26177_CHARLIE_018-sprites-testable-mvp-completion.md
11+
?? docs_build/dev/reports/PR_26177_CHARLIE_018-sprites-testable-mvp-completion_branch-validation.md
12+
?? docs_build/dev/reports/PR_26177_CHARLIE_018-sprites-testable-mvp-completion_manual-validation-notes.md
13+
?? docs_build/dev/reports/PR_26177_CHARLIE_018-sprites-testable-mvp-completion_requirements-checklist.md
14+
?? docs_build/dev/reports/PR_26177_CHARLIE_018-sprites-testable-mvp-completion_validation-lane.md
15+
?? tests/dev-runtime/SpritesAssetRepository.test.mjs
16+
?? tests/playwright/tools/SpritesToolMvp.spec.mjs
17+
18+
# git ls-files --others --exclude-standard
19+
assets/toolbox/sprites/js/index.js
20+
docs_build/dev/reports/PR_26177_CHARLIE_018-sprites-testable-mvp-completion.md
21+
docs_build/dev/reports/PR_26177_CHARLIE_018-sprites-testable-mvp-completion_branch-validation.md
22+
docs_build/dev/reports/PR_26177_CHARLIE_018-sprites-testable-mvp-completion_manual-validation-notes.md
23+
docs_build/dev/reports/PR_26177_CHARLIE_018-sprites-testable-mvp-completion_requirements-checklist.md
24+
docs_build/dev/reports/PR_26177_CHARLIE_018-sprites-testable-mvp-completion_validation-lane.md
25+
tests/dev-runtime/SpritesAssetRepository.test.mjs
26+
tests/playwright/tools/SpritesToolMvp.spec.mjs
27+
28+
# git diff --stat
29+
.../dev/reports/coverage_changed_js_guardrail.txt | 8 +-
30+
.../dev/reports/playwright_v8_coverage_report.txt | 38 ++-
31+
.../tool-repositories/assets-mock-repository.js | 332 +++++++++++++++++++++
32+
src/dev-runtime/server/local-api-router.mjs | 5 +-
33+
src/shared/toolbox/tool-metadata-inventory.js | 6 +-
34+
tests/playwright/tools/ToolboxRoutePages.spec.mjs | 20 +-
35+
toolbox/sprites/index.html | 87 +++++-
36+
7 files changed, 455 insertions(+), 41 deletions(-)

0 commit comments

Comments
 (0)