You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create `BUILD_PR_SPRITE_EDITOR_PROJECT_INTEGRATION` for the HTML-JavaScript-Gaming repo. Implement the approved Sprite Editor project integration contract from `PLAN_PR_SPRITE_EDITOR_PROJECT_INTEGRATION` with small, surgical changes only. Enforce disabled-until-selected paint/stroke behavior, preserve locked palette behavior after explicit selection, persist and restore palette references safely across save/load, and keep new/load/import/resize/duplicate flows contract-compliant. Do not broaden scope beyond Sprite Editor project integration. Refresh `docs/dev/reports/change_summary.txt`, `docs/dev/reports/validation_checklist.txt`, and `docs/dev/reports/file_tree.txt`, and package a repo-structured ZIP to `<project folder>/tmp/BUILD_PR_SPRITE_EDITOR_PROJECT_INTEGRATION_delta.zip`.
11
11
12
-
Use docs/pr/PLAN_PR_SPRITE_EDITOR_PROJECT_INTEGRATION.md as the approved plan source of truth.
12
+
COMMIT COMMENT
13
+
`build(sprite-editor): integrate project palette selection and persistence contracts`
13
14
14
-
Goal:
15
-
Implement a small, surgical Sprite Editor integration PR so palette flow uses engine authority and session/project lock rules.
16
-
17
-
Required integration rule:
18
-
1. Sprite Editor must use engine paletteList as source of truth.
19
-
2. Palette list is loaded from engine contract, not local hardcoded tool authority.
20
-
3. Editing remains disabled until palette selected.
21
-
4. Selected palette becomes locked for active project/session.
COMMAND: After BUILD validation is complete, create `APPLY_PR_SPRITE_EDITOR_PROJECT_INTEGRATION` that verifies final repo readiness, confirms project-format compatibility, summarizes user-visible behavior changes, and packages the final repo-structured delta ZIP.
Implement the approved Sprite Editor project integration contract from `PLAN_PR_SPRITE_EDITOR_PROJECT_INTEGRATION` with small, surgical changes in `tools/Sprite Editor/` only.
10
+
11
+
## Approved contract implemented
12
+
- Sprite Editor now consumes palette authority from engine `globalThis.palettesList` (loaded from `../../engine/paletteList.js`).
13
+
- No local hardcoded tool-authoritative palette catalog is used for selection flow.
14
+
- Editing remains disabled until a palette is selected.
15
+
- Palette selection locks for the active project/session.
16
+
- Palette switching is blocked after lock through normal interaction.
17
+
-`Create New Canvas` is the explicit reset/new-project unlock flow.
18
+
- Save JSON now persists `paletteRef` identity metadata.
19
+
- Load JSON restores/locks palette by `paletteRef.id` when resolvable; unresolved refs load in blocked palette-selection state.
20
+
21
+
## Operation-specific lock behavior
22
+
- New project (`Create New Canvas`): clears lock and requires new palette selection.
23
+
- Load existing JSON:
24
+
- resolvable `paletteRef.id` -> auto-lock to that engine palette
25
+
- missing/unresolvable `paletteRef.id` -> blocked mode until explicit palette selection
26
+
- PNG import: preserves current palette lock; no palette switching side effects.
27
+
- Resize canvas: preserves current palette lock.
28
+
- Duplicate frame: preserves current palette lock.
29
+
- Save/load flow: persists and restores palette reference identity safely.
0 commit comments