Skip to content

Commit 919cde3

Browse files
committed
Remove Colors Symbol dependency and accordionize preview - PR_26159_028-colors-symbol-cleanup-preview-accordion
1 parent 07de809 commit 919cde3

21 files changed

Lines changed: 293 additions & 184 deletions
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[ ] Onen Source Fonts
2+
SIL OPEN FONT LICENSE
3+
4+
https://www.shutterstock.com/search/sil-open-font-license-font-vector?dd_referrer=https%3A%2F%2Fwww.google.com%2F&image_type=vector
5+
https://www.shutterstock.com/search/sil-open-font-license-vector-arcade-font?dd_referrer=https%3A%2F%2Fwww.google.com%2F&image_type=vector
6+
https://www.shutterstock.com/image-vector/minimal-college-font-vintage-sport-american-2566065909?trackingId=01604531-ad44-4dcd-b49f-d0128c69b48e&listId=searchResults

docs_build/dev/admin-notes/index.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[ ] Start the server
2+
npm run dev:local-api
13

24
[ ] move
35
src\assets\fonts\0xProtoNerdFont\ to assets\theme-v2\fonts\
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# PR_26159_028-colors-symbol-cleanup-preview-accordion
2+
3+
## Executive Summary
4+
5+
PASS. The active Colors workflow no longer uses Symbol fields, validation, metadata, render output, or test assertions. Project swatches now use key/swatchKey ownership consistently across the Colors repository, active palette mock DB tables, Asset color handoff, DB Viewer relationship diagnostics, and the active palette browser schema.
6+
7+
The picker preview is now inside a Theme V2 vertical accordion while Project Swatches and Picker Swatches accordions remain intact.
8+
9+
Unrelated working-tree note: `docs_build/dev/admin-notes/index.txt` and `docs_build/dev/admin-notes/fonts/` were already dirty during closeout and are intentionally excluded from this PR package.
10+
11+
## Requirement Checklist
12+
13+
| Requirement | Status | Evidence |
14+
| --- | --- | --- |
15+
| Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` first | PASS | Read before implementation. |
16+
| Use PR_26159_027 as base context | PASS | Preserved Project Swatches, Picker Swatches, tag typeahead/filtering, metadata retention, and toolbox visibility behavior in `toolbox/colors/index.html` and `toolbox/colors/colors.js`. |
17+
| Fix validation error `Symbol: Enter a symbol for this swatch.` | PASS | `toolbox/colors/colors.js` invalid query fixture now validates Hex/Name only; Palette Playwright invalid-payload test passes. |
18+
| Remove Symbol form field, validation, required rules, metadata, render/output, tests/assertions, and supporting active Colors code | PASS | Focused active scan returned no matches for `symbol`, `Symbol`, `swatchSymbol`, `data-palette-symbol`, `requireSymbol`, and related terms across active Colors/Palette/Asset/DB Viewer files. |
19+
| Deep cleanup active repo Colors-related Symbol usage | PASS | Updated active palette repository, palette source seed, mock DB schema, server invalid fixture, Asset color handoff, DB Viewer diagnostics, shared palette handoff/document contract, and palette browser schema. Remaining broader hits are legacy engine palette internals, archived/historical docs, or Palette Manager V2 references outside active Colors behavior. |
20+
| Do not modify deprecated archive/v1-v2 or start_of_day | PASS | No archive/start_of_day files changed. |
21+
| Add works without Symbol | PASS | `PaletteToolMockRepository.spec.mjs` Add flow passed. |
22+
| Update works without Symbol | PASS | `PaletteToolMockRepository.spec.mjs` Update flow passed. |
23+
| Clear works without Symbol | PASS | `PaletteToolMockRepository.spec.mjs` Clear flow passed. |
24+
| Move `palette-generator-preview` into an accordion | PASS | `toolbox/colors/index.html` adds `data-palette-preview-accordion` using `vertical-accordion accordion-fill-panel`. |
25+
| Preview accordion uses same Theme V2 pattern as Project Swatches and Picker Swatches | PASS | All three use Theme V2 `details.vertical-accordion.accordion-fill-panel`; Playwright validates preview is inside the preview accordion. |
26+
| Preserve Project Swatches accordion | PASS | Palette Playwright validates Project Swatches accordion remains visible and usable. |
27+
| Preserve Picker Swatches accordion | PASS | Palette Playwright validates Picker Swatches accordion remains visible and usable. |
28+
| Preserve tag typeahead | PASS | Palette Playwright validates suggested tag typeahead and accepted tags. |
29+
| Preserve tag checkbox filtering, Any selected tag / All selected tags, and Clear Filters | PASS | Palette Playwright validates tag checkbox filtering, multi-tag modes, and Clear Filters. |
30+
| Preserve swatch metadata retention | PASS | Picker selection/pin tests validate restoreable picker settings and metadata-backed tooltips. |
31+
| Preserve hover tooltip showing only Name, Hex, Theme, Palette Type | PASS | Tooltip rendering remains in `swatchTooltipText()` / `pickerTooltipText()` and Palette Playwright validates tooltip content. |
32+
| Preserve Admin unfiltered toolbox list and non-admin filtered list | PASS | `ToolboxRoutePages.spec.mjs` passed. |
33+
| No console errors | PASS | Playwright `expectNoPageFailures` assertions passed in targeted Palette/Asset/Toolbox/Admin DB Viewer lanes. |
34+
| Playwright impacted | PASS | Targeted Playwright lanes executed. |
35+
| Do not run full samples validation | PASS | Full samples validation skipped by request; changed surfaces were covered by targeted tool/page/static lanes. |
36+
37+
## Validation Evidence
38+
39+
| Lane | Result |
40+
| --- | --- |
41+
| Changed-file syntax checks | PASS: `node --check` passed for changed JS/test files. |
42+
| Active Symbol cleanup scan | PASS: focused `rg` scan returned no active Colors/Palette/Asset/DB Viewer Symbol hits. |
43+
| Palette Tool runtime/UI lane | PASS: `npx playwright test tests/playwright/tools/PaletteToolMockRepository.spec.mjs --timeout=180000 --trace=off --output=tmp/test-results/colors-pr028` -> 6 passed. |
44+
| Toolbox route/admin visibility lane | PASS: `npx playwright test tests/playwright/tools/ToolboxRoutePages.spec.mjs --timeout=180000 --trace=off --output=tmp/test-results/toolbox-pr028` -> 2 passed. |
45+
| Asset Tool color handoff lane | PASS: `npx playwright test tests/playwright/tools/AssetToolMockRepository.spec.mjs --timeout=180000 --trace=off --output=tmp/test-results/assets-pr028` -> 6 passed. |
46+
| Admin DB Viewer relationship lane | PASS: `npx playwright test tests/playwright/tools/AdminDbViewer.spec.mjs --timeout=180000` -> 7 passed. |
47+
| Shared palette handoff probe | PASS: direct Node probe confirmed key-based `createPaletteHandoff()` output. |
48+
| Palette browser schema parse | PASS: direct JSON parse of `src/shared/schemas/tools/palette-browser.schema.json`. |
49+
| `git diff --check` | PASS with line-ending warnings only. |
50+
51+
## Skipped Lanes
52+
53+
| Lane | Reason |
54+
| --- | --- |
55+
| Full samples validation | Explicitly skipped by PR request; no shared sample loader/framework was changed. |
56+
| Full historical Node test runner | Not required for this Colors PR. A direct run of older shared tests is currently blocked by pre-existing legacy expectations/server-backed registry behavior, so this PR used targeted schema and handoff probes plus affected Playwright lanes instead. |
57+
58+
## Notes
59+
60+
- `docs_build/dev/admin-notes/index.txt` and `docs_build/dev/admin-notes/fonts/` are dirty in the working tree but unrelated to this Colors PR and not included in the ZIP artifact.
61+
- An earlier Palette full-lane attempt hit Playwright artifact collection errors; the same lane then passed cleanly with a separate output directory and trace disabled.

docs_build/dev/reports/coverage_changed_js_guardrail.txt

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,24 @@ 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+
(0%) src/dev-runtime/guest-seeds/palette-source-mock-db.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
10+
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
11+
(0%) src/dev-runtime/persistence/tool-repositories/assets-mock-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
912
(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-
(84%) toolbox/colors/colors.js - executed lines 1802/1802; executed functions 153/182
13+
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
14+
(0%) src/engine/api/mock-db-viewer-ui.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
15+
(0%) src/shared/toolbox/assetUsageIntegration.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
16+
(0%) src/shared/toolbox/paletteDocumentContract.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
17+
(0%) toolbox/colors/colors.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
18+
(98%) toolbox/assets/assets.js - executed lines 519/519; executed functions 60/61
1119

1220
Guardrail warnings:
21+
(0%) src/dev-runtime/guest-seeds/palette-source-mock-db.js - WARNING: changed runtime JS file missing from coverage; advisory only
22+
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: changed runtime JS file missing from coverage; advisory only
23+
(0%) src/dev-runtime/persistence/tool-repositories/assets-mock-repository.js - WARNING: changed runtime JS file missing from coverage; advisory only
1324
(0%) src/dev-runtime/persistence/tool-repositories/palette-workspace-repository.js - WARNING: changed runtime JS file missing from coverage; advisory only
25+
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file missing from coverage; advisory only
26+
(0%) src/engine/api/mock-db-viewer-ui.js - WARNING: changed runtime JS file missing from coverage; advisory only
27+
(0%) src/shared/toolbox/assetUsageIntegration.js - WARNING: changed runtime JS file missing from coverage; advisory only
28+
(0%) src/shared/toolbox/paletteDocumentContract.js - WARNING: changed runtime JS file missing from coverage; advisory only
29+
(0%) toolbox/colors/colors.js - WARNING: changed runtime JS file missing from coverage; advisory only

docs_build/dev/reports/playwright_v8_coverage_report.txt

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,53 @@ 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-
(84%) Toolbox Index - exercised 3 runtime JS files
15+
(92%) Toolbox Index - exercised 3 runtime JS files
1616
(0%) Tool Template V2 - not exercised by this Playwright run
1717
(70%) Theme V2 Shared JS - exercised 2 runtime JS files
1818

1919
Changed runtime JS files covered:
20+
(0%) src/dev-runtime/guest-seeds/palette-source-mock-db.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
21+
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
22+
(0%) src/dev-runtime/persistence/tool-repositories/assets-mock-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
2023
(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-
(84%) toolbox/colors/colors.js - executed lines 1802/1802; executed functions 153/182
24+
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
25+
(0%) src/engine/api/mock-db-viewer-ui.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
26+
(0%) src/shared/toolbox/assetUsageIntegration.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
27+
(0%) src/shared/toolbox/paletteDocumentContract.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
28+
(0%) toolbox/colors/colors.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
29+
(98%) toolbox/assets/assets.js - executed lines 519/519; executed functions 60/61
2230

2331
Files with executed line/function counts where available:
2432
(58%) src/engine/api/server-api-client.js - executed lines 159/159; executed functions 11/19
2533
(64%) assets/theme-v2/js/tool-display-mode.js - executed lines 201/201; executed functions 9/14
2634
(73%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 441/441; executed functions 29/40
2735
(78%) toolbox/tool-registry-api-client.js - executed lines 148/148; executed functions 21/27
28-
(84%) toolbox/colors/colors.js - executed lines 1802/1802; executed functions 153/182
29-
(100%) toolbox/colors/palette-api-client.js - executed lines 19/19; executed functions 4/4
36+
(98%) toolbox/assets/assets.js - executed lines 519/519; executed functions 60/61
37+
(100%) toolbox/assets/assets-api-client.js - executed lines 17/17; executed functions 3/3
3038

3139
Uncovered or low-coverage changed JS files:
40+
(0%) src/dev-runtime/guest-seeds/palette-source-mock-db.js - WARNING: uncovered changed runtime JS file; advisory only
41+
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: uncovered changed runtime JS file; advisory only
42+
(0%) src/dev-runtime/persistence/tool-repositories/assets-mock-repository.js - WARNING: uncovered changed runtime JS file; advisory only
3243
(0%) src/dev-runtime/persistence/tool-repositories/palette-workspace-repository.js - WARNING: uncovered changed runtime JS file; advisory only
44+
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: uncovered changed runtime JS file; advisory only
45+
(0%) src/engine/api/mock-db-viewer-ui.js - WARNING: uncovered changed runtime JS file; advisory only
46+
(0%) src/shared/toolbox/assetUsageIntegration.js - WARNING: uncovered changed runtime JS file; advisory only
47+
(0%) src/shared/toolbox/paletteDocumentContract.js - WARNING: uncovered changed runtime JS file; advisory only
48+
(0%) toolbox/colors/colors.js - WARNING: uncovered changed runtime JS file; advisory only
3349

3450
Changed JS files considered:
51+
(0%) src/dev-runtime/guest-seeds/palette-source-mock-db.js - changed JS file not collected as browser runtime coverage
52+
(0%) src/dev-runtime/persistence/mock-db-store.js - changed JS file not collected as browser runtime coverage
53+
(0%) src/dev-runtime/persistence/tool-repositories/assets-mock-repository.js - changed JS file not collected as browser runtime coverage
3554
(0%) src/dev-runtime/persistence/tool-repositories/palette-workspace-repository.js - changed JS file not collected as browser runtime coverage
55+
(0%) src/dev-runtime/server/mock-api-router.mjs - changed JS file not collected as browser runtime coverage
56+
(0%) src/engine/api/mock-db-viewer-ui.js - changed JS file not collected as browser runtime coverage
57+
(0%) src/shared/toolbox/assetUsageIntegration.js - changed JS file not collected as browser runtime coverage
58+
(0%) src/shared/toolbox/paletteDocumentContract.js - changed JS file not collected as browser runtime coverage
59+
(0%) tests/playwright/tools/AdminDbViewer.spec.mjs - changed JS file not collected as browser runtime coverage
60+
(0%) tests/playwright/tools/AssetToolMockRepository.spec.mjs - changed JS file not collected as browser runtime coverage
3661
(0%) tests/playwright/tools/PaletteToolMockRepository.spec.mjs - changed JS file not collected as browser runtime coverage
37-
(84%) toolbox/colors/colors.js - changed JS file with browser V8 coverage
62+
(0%) tests/tools/AssetUsageIntegration.test.mjs - changed JS file not collected as browser runtime coverage
63+
(0%) toolbox/colors/colors.js - changed JS file not collected as browser runtime coverage
64+
(98%) toolbox/assets/assets.js - changed JS file with browser V8 coverage

src/dev-runtime/guest-seeds/palette-source-mock-db.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
const SYMBOL_CANDIDATES = "!#$%&()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_abcdefghijklmnopqrstuvwxyz{|}~";
2-
31
const MOCK_DB_SOURCE_GROUPS = Object.freeze([
42
{
53
label: "8-color set",
@@ -907,8 +905,8 @@ const MOCK_DB_SOURCE_GROUPS = Object.freeze([
907905
}
908906
]);
909907

910-
function symbolForIndex(index) {
911-
return SYMBOL_CANDIDATES[index] || String.fromCodePoint(0x00A1 + index - SYMBOL_CANDIDATES.length);
908+
function swatchKeyForIndex(source, index) {
909+
return `${source}-swatch-${index + 1}`;
912910
}
913911

914912
function tagForLabel(label) {
@@ -925,7 +923,7 @@ export function createPaletteSourceMockDbRows() {
925923
name,
926924
source: definition.source,
927925
sourceLabel: definition.label,
928-
symbol: symbolForIndex(index),
926+
swatchKey: swatchKeyForIndex(definition.source, index),
929927
tags: ["source", tagForLabel(definition.label)]
930928
})));
931929
}

src/dev-runtime/persistence/mock-db-store.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ const MOCK_DB_TABLE_SCHEMAS = Object.freeze({
127127
project_journey_templates: Object.freeze(["key", "templateSlug", "originalMeaning", "systemGuidance", "linkedToolContexts", "version", "isActive", "createdAt", "updatedAt", "createdBy", "updatedBy"]),
128128
project_journey_items: Object.freeze(["key", "projectKey", "noteKey", "status", "title", "userDetails", "templateKey", "linkedRecordType", "linkedRecordId", "indent", "order", "createdAt", "updatedAt", "createdBy", "updatedBy"]),
129129
project_journey_activity: Object.freeze(["key", "projectKey", "noteKey", "message", "createdAt", "updatedAt", "createdBy", "updatedBy"]),
130-
palette_colors: Object.freeze(["key", "projectId", "symbol", "hex", "name", "source", "tags", "createdAt", "updatedAt", "createdBy", "updatedBy"]),
131-
palette_source_swatches: Object.freeze(["key", "id", "symbol", "hex", "name", "source", "sourceLabel", "tags", "createdAt", "updatedAt", "createdBy", "updatedBy"]),
132-
palette_swatch_usages: Object.freeze(["key", "id", "projectId", "assetId", "swatchHex", "swatchName", "swatchSymbol", "toolId", "createdAt", "updatedAt", "createdBy", "updatedBy"]),
130+
palette_colors: Object.freeze(["key", "projectId", "swatchKey", "hex", "name", "source", "tags", "createdAt", "updatedAt", "createdBy", "updatedBy"]),
131+
palette_source_swatches: Object.freeze(["key", "id", "swatchKey", "hex", "name", "source", "sourceLabel", "tags", "createdAt", "updatedAt", "createdBy", "updatedBy"]),
132+
palette_swatch_usages: Object.freeze(["key", "id", "projectId", "assetId", "swatchHex", "swatchName", "swatchKey", "toolId", "createdAt", "updatedAt", "createdBy", "updatedBy"]),
133133
project_workspace_palette_globals: Object.freeze(["key", "projectId", "swatchCount", "toolKey", "workspacePath", "createdAt", "updatedAt", "createdBy", "updatedBy"]),
134134
asset_role_definitions: Object.freeze(["key", "id", "label", "storageFolder", "extensions", "mimeTypes", "previewBehavior", "uploadEnabled", "inputMode", "usageRoles", "maxSizeBytes", "dbFields", "validationNeeds", "createdAt", "updatedAt", "createdBy", "updatedBy"]),
135135
asset_library_items: Object.freeze(["key", "id", "projectId", "ownerProjectId", "ownerUserId", "assetRole", "assetRoleLabel", "name", "fileName", "originalName", "mimeType", "size", "checksum", "storageObjectId", "storedPath", "path", "previewKind", "role", "type", "usage", "status", "createdAt", "updatedAt", "createdBy", "updatedBy"]),
@@ -311,7 +311,7 @@ function generatedRecordKey(tableName, record, index) {
311311
record?.id,
312312
record?.name,
313313
record?.displayName,
314-
record?.symbol,
314+
record?.swatchKey,
315315
record?.projectId,
316316
index,
317317
].filter((part) => part !== undefined && part !== null && part !== "").join(":");

0 commit comments

Comments
 (0)