Skip to content

Commit 956ba12

Browse files
committed
Add Human palette theme and Step Range control - PR_26159_041-colors-human-theme-step-range
1 parent 4c8a49e commit 956ba12

9 files changed

Lines changed: 242 additions & 23 deletions

File tree

docs_build/dev/PROJECT_INSTRUCTIONS.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,32 @@ User:
7575
- Do not expand scope beyond the PR
7676
- Do not modify `start_of_day` folders unless requested
7777

78+
## MAIN BRANCH EXECUTION GUARD
79+
80+
Before any BUILD execution, Codex must verify the current git branch.
81+
82+
Rules:
83+
- The required execution branch is:
84+
- `main`
85+
- If the current branch is not `main`:
86+
- HARD STOP.
87+
- Do not create code changes.
88+
- Do not create implementation PRs.
89+
- Do not create ZIP artifacts.
90+
- Do not continue execution.
91+
- Codex must report:
92+
- current branch
93+
- expected branch (`main`)
94+
- local branches found
95+
- Codex may continue only after the user explicitly returns to `main`.
96+
97+
Exception:
98+
- Explicit branch-audit or branch-comparison PRs may inspect non-main branches but must not perform implementation work on them.
99+
100+
Required report output:
101+
- Current branch
102+
- Branch validation PASS/FAIL
103+
78104
## RULE PRECEDENCE
79105

80106
Newer appended sections override earlier overlapping rules.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# PR_26159_041 Colors Human Theme Step Range Report
2+
3+
Generated: 2026-06-08
4+
5+
## Executive Summary
6+
7+
Status: PASS
8+
9+
PR_26159_041 adds a curated Human palette source, keeps the Defined Swatch Selector ordering deterministic, and adds Step Range as a live grid-generation control. The default Step Range is 50, which preserves the previous lightness-distance formula. Lower values tighten generated rows toward the base color, while higher values widen the generated rows toward light/dark extremes without forcing pure white or black unless the control reaches its maximum.
10+
11+
## Requirement Checklist
12+
13+
| Requirement | Status | Evidence |
14+
| --- | --- | --- |
15+
| Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` first. | PASS | Project instructions were read before branch validation and edits. |
16+
| HARD STOP if current branch is not `main`. | PASS | `git branch --show-current` returned `main`; local branches found: `backup-before-workspace-cleanup`, `docs/engine-core-boundary`, `main`. |
17+
| Add Human as a Theme Collection / Palette Type source. | PASS | `toolbox/colors/colors.js` adds `Human` to `CURATED_PALETTE_COLLECTIONS`; Playwright selects `Human` and validates rendered swatches. |
18+
| Human includes skin tones. | PASS | `Skin Tones` includes curated human skin swatches and names; Playwright validates exact row hex output. |
19+
| Human includes hair tones. | PASS | `Hair Tones` includes black, brown, auburn, copper, blonde, and gray hair swatches. |
20+
| Human includes eye tones. | PASS | `Eye Tones` includes brown, amber, hazel, green, blue-gray, blue, and violet-gray swatches. |
21+
| Human includes clothing-support tones. | PASS | `Clothing Support` includes canvas, linen, denim, navy, charcoal, burgundy, olive, and leather swatches. |
22+
| Human includes shadow/highlight support tones. | PASS | `Shadow Highlight Support` includes deep/warm/cool shadows, mids, highlights, and specular support tones. |
23+
| Sort Theme Collection options alphabetically. | PASS | Existing sorted selector population remains active; Playwright validates sorted theme options including Human. |
24+
| Sort Palette Type options alphabetically. | PASS | Existing sorted type population remains active; Playwright validates sorted `Human` type options. |
25+
| Sort Variant options alphabetically with Full first/default. | PASS | Existing variant ordering remains active; Playwright validates `Full` first/default and sorted remaining variants. |
26+
| Add Step Range control. | PASS | `toolbox/colors/index.html` adds `data-palette-generator-step-range`; runtime reads, resets, restores, and persists it. |
27+
| Step Range changes light/dark travel distance. | PASS | Playwright sets Step Range to 0 and 100 and verifies the first-column lightness spread decreases/increases. |
28+
| Default Step Range preserves current visual behavior. | PASS | Default is 50; the updated formula reduces to the prior distance formula at 50. Playwright returns to 50 and verifies exact top/center/bottom colors match the initial render. |
29+
| Step Range works with Steps rows above/below center. | PASS | `generatorLightness()` receives the generated row count from `actualPaletteGeneratorRows(steps)` and applies Step Range to each row. |
30+
| Do not force pure white/black unless Step Range is maximum. | PASS | Non-maximum Step Range clamps to 10-90 lightness; maximum Step Range can use 0-100. Existing no-pure-white/black test remains passing for default. |
31+
| Preserve red pin / green pin / no-pin behavior. | PASS | Targeted Palette Playwright passed the existing pin add/remove and duplicate/no-pin tests. |
32+
| Preserve Show duplicates behavior. | PASS | Targeted Palette Playwright passed duplicate display behavior checks. |
33+
| Preserve Symbol-free Add/Update/Clear. | PASS | Targeted Palette Playwright passed Symbol-free controls; focused `rg` found no active Symbol validation. |
34+
| Validate no console errors. | PASS | Targeted Palette Playwright lane passed with existing console-error assertions. |
35+
| Produce required reports and ZIP. | PASS | Reports were generated under `docs_build/dev/reports/`; ZIP generated under `tmp/`. |
36+
37+
## Implementation Notes
38+
39+
- `toolbox/colors/colors.js` owns the curated Human data and Step Range generation behavior.
40+
- `toolbox/colors/index.html` adds the Step Range slider beside the existing picker controls.
41+
- `src/dev-runtime/persistence/tool-repositories/palette-workspace-repository.js` preserves Step Range in picker settings and color metadata.
42+
- `tests/playwright/tools/PaletteToolMockRepository.spec.mjs` covers Human selection, exact base swatches, sorted selectors, default preservation, Step Range spread behavior, and metadata restore.
43+
44+
## Validation Evidence
45+
46+
| Check | Status | Evidence |
47+
| --- | --- | --- |
48+
| Syntax checks | PASS | `node --check toolbox/colors/colors.js`; `node --check src/dev-runtime/persistence/tool-repositories/palette-workspace-repository.js`; `node --check tests/playwright/tools/PaletteToolMockRepository.spec.mjs`. |
49+
| Targeted Playwright | PASS | `npx playwright test tests/playwright/tools/PaletteToolMockRepository.spec.mjs` returned 8 passed. |
50+
| Static whitespace | PASS | `git diff --check` returned no whitespace errors. |
51+
| Active Symbol scan | PASS | Only intentional Symbol-free fixture names remain in the targeted active scan. |
52+
| Playwright impacted | PASS | Yes; targeted Palette Tool Playwright lane was run. |
53+
54+
## Skipped Lanes
55+
56+
| Lane | Reason |
57+
| --- | --- |
58+
| Full samples validation | Safe to skip because no samples, sample loader/runtime code, or shared sample framework behavior changed. |
59+
| Broad Playwright suite | Safe to skip because the targeted Palette Tool lane covers the impacted Colors runtime/UI behavior and console assertions. |

docs_build/dev/reports/coverage_changed_js_guardrail.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ Missing changed runtime JS files are WARN, not FAIL.
66
Source: Playwright/Chromium built-in V8 coverage from the active Playwright run.
77

88
Changed runtime JS files considered:
9-
(86%) toolbox/colors/colors.js - executed lines 2013/2013; executed functions 177/206
9+
(0%) src/dev-runtime/persistence/tool-repositories/palette-workspace-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
10+
(86%) toolbox/colors/colors.js - executed lines 2061/2061; executed functions 177/206
1011

1112
Guardrail warnings:
12-
(100%) none - no changed runtime JS coverage warnings
13+
(0%) src/dev-runtime/persistence/tool-repositories/palette-workspace-repository.js - WARNING: changed runtime JS file missing from coverage; advisory only

docs_build/dev/reports/playwright_v8_coverage_report.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,21 @@ Exercised tool entry points detected:
1717
(64%) Theme V2 Shared JS - exercised 2 runtime JS files
1818

1919
Changed runtime JS files covered:
20-
(86%) toolbox/colors/colors.js - executed lines 2013/2013; executed functions 177/206
20+
(0%) src/dev-runtime/persistence/tool-repositories/palette-workspace-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
21+
(86%) toolbox/colors/colors.js - executed lines 2061/2061; executed functions 177/206
2122

2223
Files with executed line/function counts where available:
2324
(58%) src/engine/api/server-api-client.js - executed lines 159/159; executed functions 11/19
2425
(64%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 525/525; executed functions 28/44
2526
(64%) assets/theme-v2/js/tool-display-mode.js - executed lines 201/201; executed functions 9/14
2627
(78%) toolbox/tool-registry-api-client.js - executed lines 148/148; executed functions 21/27
27-
(86%) toolbox/colors/colors.js - executed lines 2013/2013; executed functions 177/206
28+
(86%) toolbox/colors/colors.js - executed lines 2061/2061; executed functions 177/206
2829
(100%) toolbox/colors/palette-api-client.js - executed lines 19/19; executed functions 4/4
2930

3031
Uncovered or low-coverage changed JS files:
31-
(100%) none - no low-coverage changed runtime JS files
32+
(0%) src/dev-runtime/persistence/tool-repositories/palette-workspace-repository.js - WARNING: uncovered changed runtime JS file; advisory only
3233

3334
Changed JS files considered:
35+
(0%) src/dev-runtime/persistence/tool-repositories/palette-workspace-repository.js - changed JS file not collected as browser runtime coverage
3436
(0%) tests/playwright/tools/PaletteToolMockRepository.spec.mjs - changed JS file not collected as browser runtime coverage
3537
(86%) toolbox/colors/colors.js - changed JS file with browser V8 coverage

docs_build/dev/reports/testing_lane_execution_report.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Testing Lane Execution Report
22

3-
PR: PR_26159_040-branch-audit-colors-grid-selection
3+
PR: PR_26159_041-colors-human-theme-step-range
44
Generated: 2026-06-08
55
Full samples validation: SKIPPED
66

77
## Summary
88

9-
PASS: 7
9+
PASS: 8
1010
WARN: 2
1111
FAIL: 0
1212
SKIP: 2
@@ -15,21 +15,21 @@ SKIP: 2
1515

1616
| Lane | Status | Command | Evidence |
1717
| --- | --- | --- | --- |
18-
| Branch gate | PASS | `git branch --show-current` | Returned `main`; implementation proceeded. |
19-
| Branch audit | PASS | `git rev-list --left-right --count main...<branch>` and `git diff --name-only main...<branch>` | `docs_build/dev/reports/branch_audit.md` identifies four no-unique local branches deleted and two unique branches preserved. |
20-
| Colors runtime syntax | PASS | `node --check toolbox/colors/colors.js` | Picker SVG fill and selection code parse. |
21-
| Palette Playwright syntax | PASS | `node --check tests/playwright/tools/PaletteToolMockRepository.spec.mjs` | Updated assertions parse. |
22-
| Palette / Colors Playwright | PASS | `npx playwright test tests/playwright/tools/PaletteToolMockRepository.spec.mjs` | 8 passed. Covers full-cell picker fill, reduced non-overlapping sliders, add/select behavior, duplicate behavior, Symbol-free controls, and no console errors. |
23-
| Runtime V8 coverage | PASS | Palette Playwright afterAll coverage reporter | `docs_build/dev/reports/playwright_v8_coverage_report.txt` includes changed runtime JS coverage for `toolbox/colors/colors.js`. |
18+
| Branch gate | PASS | `git branch --show-current` | Returned `main`; local branches found were `backup-before-workspace-cleanup`, `docs/engine-core-boundary`, and `main`. |
19+
| Colors runtime syntax | PASS | `node --check toolbox/colors/colors.js` | Human palette source and Step Range runtime code parse. |
20+
| Palette repository syntax | PASS | `node --check src/dev-runtime/persistence/tool-repositories/palette-workspace-repository.js` | Step Range metadata cloning parses. |
21+
| Palette Playwright syntax | PASS | `node --check tests/playwright/tools/PaletteToolMockRepository.spec.mjs` | New Human and Step Range assertions parse. |
22+
| Palette / Colors Playwright | PASS | `npx playwright test tests/playwright/tools/PaletteToolMockRepository.spec.mjs` | 8 passed. Covers Human swatches, sorted selectors, Step Range behavior, default reset/restore, Symbol-free controls, duplicate grid behavior, and no console errors. |
23+
| Runtime V8 coverage | PASS | Palette Playwright afterAll coverage reporter | `docs_build/dev/reports/playwright_v8_coverage_report.txt` and `coverage_changed_js_guardrail.txt` were refreshed by the targeted lane. |
2424
| Static whitespace validation | PASS | `git diff --check` | No whitespace errors; Git reported line-ending warnings only. |
25-
| Active Symbol validation scan | PASS | `rg -n "Symbol: Enter a symbol|data-palette-symbol|palette.*symbol|symbol" toolbox/colors src/dev-runtime/persistence/tool-repositories/palette-workspace-repository.js tests/playwright/tools/PaletteToolMockRepository.spec.mjs` | No active Symbol validation hits. Remaining matches are Symbol-free test fixture names. |
25+
| Active Symbol validation scan | PASS | `rg -n "Symbol: Enter a symbol|data-palette-symbol|palette.*symbol|symbol" toolbox/colors src/dev-runtime/persistence/tool-repositories/palette-workspace-repository.js tests/playwright/tools/PaletteToolMockRepository.spec.mjs` | No active Symbol validation hits. Remaining matches are intentional Symbol-free test fixture names. |
2626

2727
## Notes
2828

2929
| Item | Status | Detail |
3030
| --- | --- | --- |
31-
| Initial slider geometry attempts | WARN | Early Playwright runs failed on label/slider crowding checks. The implementation was adjusted from compact form-table rows to external-CSS grid rows, then the full targeted lane passed. |
32-
| SQLite test-server output | WARN | Local targeted Playwright still emits Node SQLite experimental warnings and seed-only audit fallback diagnostics from existing test infrastructure. Assertions passed. |
31+
| Pre-existing worktree change | WARN | `docs_build/dev/PROJECT_INSTRUCTIONS.md` was already modified before PR041 runtime edits. PR041 reports and ZIP are scoped to Colors/runtime/test/report artifacts only. |
32+
| SQLite test-server output | WARN | Targeted Playwright still emits Node SQLite experimental warnings and existing seed-only audit fallback diagnostics from the local test server. Assertions passed. |
3333

3434
## Skipped Lanes
3535

src/dev-runtime/persistence/tool-repositories/palette-workspace-repository.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ function clonePickerSettings(settings) {
6767
saturation: settings.saturation,
6868
sortDirection: settings.sortDirection,
6969
sortField: settings.sortField,
70+
stepRange: settings.stepRange,
7071
steps: settings.steps,
7172
swatchSize: settings.swatchSize,
7273
themeCollection: settings.themeCollection,
@@ -90,6 +91,7 @@ function cloneColorMetadata(metadata) {
9091
sortDirection: metadata.sortDirection,
9192
sortField: metadata.sortField,
9293
source: metadata.source,
94+
stepRange: metadata.stepRange,
9395
steps: metadata.steps,
9496
swatchSize: metadata.swatchSize,
9597
themeCollection: metadata.themeCollection,

0 commit comments

Comments
 (0)