Skip to content

Commit 991bbf1

Browse files
committed
Deprecate legacy palette source swatches runtime paths - PR_26160_076-palette-source-swatches-deprecation
1 parent 1465fb8 commit 991bbf1

11 files changed

Lines changed: 163 additions & 405 deletions

File tree

docs_build/dev/reports/coverage_changed_js_guardrail.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ 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 2289/2289; executed functions 193/224
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+
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
11+
(66%) toolbox/colors/colors.js - executed lines 2162/2162; executed functions 138/209
12+
(97%) src/engine/api/mock-db-viewer-ui.js - executed lines 484/484; executed functions 88/91
1013

1114
Guardrail warnings:
12-
(100%) none - no changed runtime JS coverage warnings
15+
(0%) src/dev-runtime/persistence/tool-repositories/palette-workspace-repository.js - WARNING: changed runtime JS file missing from coverage; advisory only
16+
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file missing from coverage; advisory only
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# PR_26160_076 Palette Source Swatches Deprecation Report
2+
3+
Generated: 2026-06-09
4+
5+
## Branch Validation
6+
7+
| Check | Status | Evidence |
8+
| --- | --- | --- |
9+
| Current branch is `main` | PASS | `git branch --show-current` returned `main`. |
10+
11+
## Requirement Checklist
12+
13+
| Requirement | Status | Evidence |
14+
| --- | --- | --- |
15+
| Implement PR_26160_075 recommendation: DEPRECATE `palette_source_swatches` | PASS | `src/engine/api/mock-db-viewer-ui.js` labels `palette_source_swatches` as deprecated and shows a visible deprecation note. |
16+
| Remove/replace dead source-browser code paths reading `palette_source_swatches` | PASS | `toolbox/colors/colors.js` no longer creates source-mode repositories or binds source select/search/pin/sort/size handlers; `src/dev-runtime/persistence/tool-repositories/palette-workspace-repository.js` removed source row normalization, source options, source list, source pin-all, and source table output. |
17+
| Remove/replace dead source-harmony code paths implying source table affects current harmony output | PASS | Harmony labels changed to Current/All Picker closest match, and `harmonyForSwatch()` now matches only supplied picker swatches when not calculated. No source table palette fallback remains. |
18+
| Ensure Colors grid rendering does not depend on `palette_source_swatches` | PASS | Targeted Colors Playwright passed; runtime trace rendered 24 picker swatches with no source controls or source table count. |
19+
| Ensure Colors editing does not depend on `palette_source_swatches` | PASS | Targeted Colors Playwright passed Add/Update/Remove/Pin flows; runtime trace added `Trace Blue`. |
20+
| Ensure Colors save/load does not depend on `palette_source_swatches` | PASS | Targeted Colors Playwright covers reload behavior; runtime trace reloaded and found `Trace Blue` persisted. |
21+
| Ensure Colors import/export does not depend on `palette_source_swatches` | PASS | Runtime trace verified import/export UI text is absent from the current Colors page; no active import/export source-table path remains. |
22+
| Remove active Colors runtime reads if safe | PASS | Repository `getSnapshot()` no longer exposes `sourcePaletteOptions`/`sourcePaletteRecordCount`; `getTables()` no longer returns `palette_source_swatches`; Colors Repository Tables now show Project Swatches, Swatch Usage, and Project Swatch Settings only. |
23+
| Keep table only for migration/history if needed | PASS | Server DB snapshot still includes seeded `palette_source_swatches` rows for DB Viewer history/reference via `paletteTables()` in `src/dev-runtime/server/mock-api-router.mjs`. |
24+
| Mark deprecated table in DB Viewer/reporting | PASS | DB Viewer summary displays `palette_source_swatches (deprecated)` and a visible note: current Colors grid rendering, editing, save/load, and import/export do not read this table. |
25+
| Do not migrate unrelated Toolbox/Admin data | PASS | Changes are scoped to Colors repository/runtime, DB Viewer labeling, targeted tests, and reports. |
26+
| Do not use inline script/style/event handlers | PASS | No HTML inline script/style/event handlers were added; `git diff` shows external JS/HTML option text/test/report edits only. |
27+
28+
## Deprecation Evidence
29+
30+
- Active Colors repository tables now exclude `palette_source_swatches`.
31+
- Active Colors runtime no longer has source select/search/pin-all controls.
32+
- Active Colors runtime no longer accepts `?source=empty` / `?source=invalid` source-browser test modes.
33+
- Harmony source wording now refers to picker swatches, not source palettes.
34+
- DB Viewer still shows 838 deprecated source history rows under Palette, with an explicit visible deprecation note.
35+
36+
## Validation Evidence
37+
38+
| Lane | Status | Evidence |
39+
| --- | --- | --- |
40+
| Syntax checks | PASS | `node --check` on all changed JS/test files exited 0. |
41+
| Colors Playwright | PASS | `npx playwright test tests/playwright/tools/PaletteToolMockRepository.spec.mjs --reporter=line` -> 9 passed. |
42+
| DB Viewer Playwright | PASS | `npx playwright test tests/playwright/tools/AdminDbViewer.spec.mjs --reporter=line` -> 7 passed. |
43+
| Runtime trace | PASS | Inline Playwright trace: source controls 0; source table absent from Colors table counts; picker swatches 24; reload retained added swatch; DB Viewer deprecated source table visible with 838 rows. |
44+
| Static validation | PASS | `git diff --check` passed with line-ending warnings only. |
45+
46+
## Impacted Lanes
47+
48+
- Colors runtime/UI lane.
49+
- Admin DB Viewer lane.
50+
- Changed-file syntax/static lane.
51+
52+
## Skipped Lanes
53+
54+
| Lane | Reason |
55+
| --- | --- |
56+
| Full samples validation | Samples and sample loaders are not touched. |
57+
| Unrelated Toolbox/Admin metadata migration | Explicitly out of scope for PR_26160_076. |
58+
59+
## Manual Test Notes
60+
61+
No additional manual browser walkthrough was required. The targeted Playwright lanes and runtime trace directly covered the requested Colors and DB Viewer behavior.

docs_build/dev/reports/playwright_v8_coverage_report.txt

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,39 @@ Note: entry percentages use function coverage when available, otherwise line cov
1212
Note: coverage entries are aggregated across every page/tool where coverageReporter.start(page) and coverageReporter.stop(page) ran.
1313

1414
Exercised tool entry points detected:
15-
(85%) Toolbox Index - exercised 3 runtime JS files
15+
(73%) Toolbox Index - exercised 7 runtime JS files
1616
(0%) Tool Template V2 - not exercised by this Playwright run
17-
(77%) Theme V2 Shared JS - exercised 3 runtime JS files
17+
(74%) Theme V2 Shared JS - exercised 2 runtime JS files
1818

1919
Changed runtime JS files covered:
20-
(86%) toolbox/colors/colors.js - executed lines 2289/2289; executed functions 193/224
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+
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
22+
(66%) toolbox/colors/colors.js - executed lines 2162/2162; executed functions 138/209
23+
(97%) src/engine/api/mock-db-viewer-ui.js - executed lines 484/484; executed functions 88/91
2124

2225
Files with executed line/function counts where available:
23-
(58%) src/engine/api/server-api-client.js - executed lines 159/159; executed functions 11/19
26+
(63%) src/engine/api/server-api-client.js - executed lines 159/159; executed functions 12/19
2427
(64%) assets/theme-v2/js/tool-display-mode.js - executed lines 209/209; executed functions 9/14
25-
(75%) toolbox/tool-registry-api-client.js - executed lines 152/152; executed functions 21/28
28+
(66%) toolbox/colors/colors.js - executed lines 2162/2162; executed functions 138/209
29+
(67%) admin/db-viewer.js - executed lines 53/53; executed functions 4/6
30+
(75%) toolbox/project-journey/project-journey.js - executed lines 1003/1003; executed functions 74/99
2631
(77%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 548/548; executed functions 37/48
27-
(86%) toolbox/colors/colors.js - executed lines 2289/2289; executed functions 193/224
28-
(92%) assets/theme-v2/js/account-controls.js - executed lines 47/47; executed functions 12/13
32+
(79%) toolbox/tool-registry-api-client.js - executed lines 152/152; executed functions 22/28
33+
(88%) toolbox/assets/assets.js - executed lines 519/519; executed functions 53/60
34+
(97%) src/engine/api/mock-db-viewer-ui.js - executed lines 484/484; executed functions 88/91
35+
(100%) src/engine/api/mock-db-api-client.js - executed lines 19/19; executed functions 5/5
36+
(100%) toolbox/assets/assets-api-client.js - executed lines 17/17; executed functions 3/3
2937
(100%) toolbox/colors/palette-api-client.js - executed lines 19/19; executed functions 4/4
38+
(100%) toolbox/project-journey/project-journey-api-client.js - executed lines 12/12; executed functions 2/2
3039

3140
Uncovered or low-coverage changed JS files:
32-
(100%) none - no low-coverage changed runtime JS files
41+
(0%) src/dev-runtime/persistence/tool-repositories/palette-workspace-repository.js - WARNING: uncovered changed runtime JS file; advisory only
42+
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: uncovered changed runtime JS file; advisory only
3343

3444
Changed JS files considered:
35-
(86%) toolbox/colors/colors.js - changed JS file with browser V8 coverage
45+
(0%) src/dev-runtime/persistence/tool-repositories/palette-workspace-repository.js - changed JS file not collected as browser runtime coverage
46+
(0%) src/dev-runtime/server/mock-api-router.mjs - changed JS file not collected as browser runtime coverage
47+
(0%) tests/playwright/tools/AdminDbViewer.spec.mjs - changed JS file not collected as browser runtime coverage
48+
(0%) tests/playwright/tools/PaletteToolMockRepository.spec.mjs - changed JS file not collected as browser runtime coverage
49+
(66%) toolbox/colors/colors.js - changed JS file with browser V8 coverage
50+
(97%) src/engine/api/mock-db-viewer-ui.js - changed JS file with browser V8 coverage
Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,37 @@
11
# Testing Lane Execution Report
22

3-
PR: PR_26160_075-palette-runtime-usage-verification
3+
PR: PR_26160_076-palette-source-swatches-deprecation
44
Generated: 2026-06-09
55
Full samples validation: SKIPPED
66

77
## Summary
88

9-
PASS: 4
10-
WARN: 0
9+
PASS: 7
10+
WARN: 2
1111
FAIL: 0
12-
SKIP: 3
12+
SKIP: 2
1313

1414
## Executed Lanes
1515

1616
| Lane | Status | Command | Evidence |
1717
| --- | --- | --- | --- |
1818
| Branch guard | PASS | `git branch --show-current` | Returned `main`. |
19-
| Colors runtime trace | PASS | Inline Playwright/Chromium trace against `/toolbox/colors/index.html` and `/toolbox/colors/index.html?source=empty` | Captured palette API calls, source snapshot values, source control count, grid count/hexes, add behavior, reload behavior, and harmony output. |
20-
| Colors runtime Playwright | PASS | `npx playwright test tests/playwright/tools/PaletteToolMockRepository.spec.mjs --reporter=line` | 9 passed. Covers Colors page load, grid rendering, palette editing, save/load behavior, and symbol-free validation. |
21-
| Static whitespace validation | PASS | `git diff --check` | No whitespace errors after final artifact generation. |
19+
| Changed-file syntax checks | PASS | `node --check toolbox/colors/colors.js`; `node --check src/dev-runtime/persistence/tool-repositories/palette-workspace-repository.js`; `node --check src/dev-runtime/server/mock-api-router.mjs`; `node --check src/engine/api/mock-db-viewer-ui.js`; `node --check tests/playwright/tools/PaletteToolMockRepository.spec.mjs`; `node --check tests/playwright/tools/AdminDbViewer.spec.mjs` | All commands exited 0. |
20+
| Colors runtime/UI Playwright | PASS | `npx playwright test tests/playwright/tools/PaletteToolMockRepository.spec.mjs --reporter=line` | 9 passed. Covers Colors grid rendering, editing, selection/pinning, reload/save behavior, tag behavior, symbol-free validation, and no source-browser controls. |
21+
| DB Viewer Playwright | PASS | `npx playwright test tests/playwright/tools/AdminDbViewer.spec.mjs --reporter=line` | 7 passed. Covers Palette DB grouping, deprecated `palette_source_swatches` display, Local Mem/Local DB table visibility, schema headers, diagnostics, and read-only behavior. |
22+
| Colors + DB Viewer runtime trace | PASS | Inline Playwright/Chromium trace | `sourceControlCount=0`; Colors Repository Tables omit source rows; picker grid rendered 24 swatches; edit/reload kept `Trace Blue`; import/export UI text absent; DB Viewer showed `palette_source_swatches (deprecated) (838 records)` with the deprecation note. |
23+
| Static source audit | PASS | `rg -n "sourcePalette\|listSourceSwatches\|sourceSwatchRows\|selectedSourceSwatch\|data-palette-source\|sourcePin\|sourceSort\|sourceSize\|sourceMode\|Current Source\|All Sources" ...` | Only test assertions that source controls are absent remain; no active Colors/server source-browser path remains. |
24+
| Whitespace/static diff validation | PASS | `git diff --check` | No whitespace errors. Line-ending warnings only. |
25+
| V8 coverage report | WARN | Generated by targeted Playwright runs | `toolbox/colors/colors.js` and `src/engine/api/mock-db-viewer-ui.js` were collected. Server-side changed JS is listed as advisory WARN because browser V8 coverage does not collect Node server modules. |
26+
| Changed JS coverage guardrail | WARN | Generated by targeted Playwright runs | Advisory-only warnings for server-side changed JS not collected by browser V8 coverage. |
2227

2328
## Skipped Lanes
2429

2530
| Lane | Status | Reason |
2631
| --- | --- | --- |
27-
| Full samples validation | SKIP | The PR is evidence-only for Colors runtime usage and does not touch samples, sample loaders, or game runtime. |
28-
| Admin DB Viewer Playwright | SKIP | The request explicitly said not to rely on DB Viewer visibility and requested targeted Colors runtime validation only. |
29-
| Toolbox/Admin migration validation | SKIP | The PR does not migrate Toolbox/Admin data or change shared metadata contracts. |
32+
| Full samples validation | SKIP | The PR touches Colors repository/runtime and DB Viewer reporting only; samples and sample loaders are unchanged. |
33+
| Unrelated Toolbox/Admin metadata migration | SKIP | The PR explicitly excludes unrelated Toolbox/Admin data migration. |
3034

3135
## Manual Test Notes
3236

33-
No separate manual walkthrough was needed. Runtime trace evidence showed `palette_source_swatches` is requested through palette snapshots and rendered as a Repository Tables count, but does not affect grid rendering, palette editing, import/export, or save/load behavior. The report recommends **DEPRECATE**.
37+
No separate manual walkthrough was needed beyond targeted Playwright and the inline runtime trace. The trace confirmed the deprecated source table is inspectable in DB Viewer but no longer participates in Colors runtime table counts, source controls, grid rendering, editing, save/load, or import/export UI.

0 commit comments

Comments
 (0)