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
Fixed the Colors picker grid so available and unavailable picker sections preserve the generated column count when swatches move between sections. Added regression coverage proving active `tools.palette-browser.swatches` validation and Colors add/remove/pin/unpin/update/clear flows work without Symbol.
8
+
9
+
## Root Cause: Symbol
10
+
11
+
Active `tools.palette-browser.swatches` validation is owned by `src/dev-runtime/persistence/tool-repositories/palette-workspace-repository.js` through `validatePaletteWorkspacePayload()` and `validatePaletteSwatchInput()`. That path requires `key`, `hex`, and `name`; it does not require Symbol. The blocking regression was not covered by a direct no-Symbol payload/lifecycle assertion, so stale or adjacent validation could reappear unnoticed.
- Added direct `validatePaletteWorkspacePayload()` coverage for a `tools.palette-browser.swatches` payload with no Symbol field.
18
+
- Added repository lifecycle coverage for add, update, remove, pin, unpin, and clear with no Symbol field.
19
+
- Active Symbol scan found no active Colors `Symbol: Enter a symbol`, `data-palette-symbol`, `requireSymbol`, `swatchSymbol`, or `paletteSwatchSymbol` requirement. The only remaining hit is `tests/tools/PaletteManagerV2Baseline.test.mjs`, which is a separate Palette Manager V2 baseline test and not active Colors `palette-browser` validation.
20
+
21
+
## Root Cause: Picker Grid
22
+
23
+
`appendPickerGroupRows()` previously rendered rows from filtered group arrays. When one generated swatch moved from Available to Already in Project, that cell disappeared from the Available row, so rows could collapse below the selected Colors column count.
24
+
25
+
Exact fixed file:
26
+
-`toolbox/colors/colors.js`
27
+
28
+
Fix:
29
+
-`appendPickerGroupRows()` now receives the full generated swatch set, filters per section for counts, and inserts placeholder cells for positions owned by the other section.
30
+
- Available and unavailable rows now keep `settings.colors` cells per rendered row.
31
+
- Unavailable swatches remain true color, are not disabled, do not use a not-allowed cursor, and still block add-clicks through the existing availability guard.
32
+
33
+
## Requirement Checklist
34
+
35
+
| Requirement | Status | Evidence |
36
+
|---|---|---|
37
+
| Remove remaining active Symbol requirement from `tools.palette-browser.swatches` validation | PASS |`validatePaletteWorkspacePayload()` no-Symbol assertion in `tests/playwright/tools/PaletteToolMockRepository.spec.mjs`; targeted Symbol scan |
38
+
| Add works without Symbol | PASS | Playwright `Palette Tool adds, updates, validates, and shows project-owned swatches`|
39
+
| Remove works without Symbol | PASS | Repository lifecycle assertion for `removeSwatch()`|
40
+
| Pin works without Symbol | PASS | Repository lifecycle assertion for `pinSourceSwatch()` and Playwright picker add |
41
+
| Unpin works without Symbol | PASS | Repository lifecycle assertion removing a pinned source swatch |
42
+
| Update works without Symbol | PASS | Playwright update flow and repository `updateSelectedSwatch()` assertion |
43
+
| Clear works without Symbol | PASS | Playwright Clear control and repository `clearProjectData()` assertion |
44
+
| Search active source/schemas/validators/fixtures for Symbol | PASS |`rg` scan; only out-of-scope Palette Manager V2 baseline hit remains |
45
+
| Colors = 8 renders exactly 8 columns per picker row | PASS | New Playwright test `Palette Tool preserves eight-column picker rows when swatches are unavailable`|
46
+
| Missing/unavailable/already-in-project swatches do not collapse grid | PASS | Placeholder cells in `toolbox/colors/colors.js`; Playwright row child-count assertions |
47
+
| Available and unavailable sections preserve column count | PASS | Playwright asserts 8-column and 16-column available/unavailable rows |
48
+
| Unavailable swatches keep true color and occupy cells | PASS | Playwright opacity/value assertions |
49
+
| No red dot/not-allowed cursor for unavailable swatches | PASS | Playwright cursor assertions |
50
+
| Unavailable swatches do not add when clicked | PASS | Playwright count remains unchanged and log reports not added |
51
+
| Available swatches add when clicked | PASS | Playwright count increases after available picker click |
52
+
| Preserve PR025 available top/unavailable bottom viewer | PASS | Existing Available/Already in Project labels and sections preserved |
53
+
| Preserve current controls/options and ROYGBIV | PASS | Existing selector/ROYGBIV Playwright assertions still pass |
54
+
| Preserve Project Swatches and Picker Swatches accordions | PASS | Existing accordion assertions still pass |
55
+
| No console errors | PASS |`expectNoPageFailures()` across targeted Colors Playwright lane |
| Active Symbol scan | PASS | No active Colors Symbol requirement found; out-of-scope Palette Manager V2 baseline hit documented |
65
+
66
+
## Skipped Lanes
67
+
68
+
Full samples validation was skipped because this PR only changes the Colors tool runtime and its targeted Playwright coverage. No sample loader, shared sample framework, or production game sample path changed.
69
+
70
+
Full repo Playwright was skipped because the impacted lane is the Colors/Palette Tool lane and no shared Theme V2, server API, DB adapter, or cross-tool integration behavior changed.
0 commit comments