Skip to content

Commit d9bee13

Browse files
committed
Clean up build group color token leftovers - PR_26160_082-db-leftovers-cleanup
1 parent fec0459 commit d9bee13

6 files changed

Lines changed: 107 additions & 37 deletions

docs_build/dev/reports/coverage_changed_js_guardrail.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ 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/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
10-
(77%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 603/603; executed functions 43/56
9+
(100%) none changed - no changed runtime JS files
1110

1211
Guardrail warnings:
13-
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file missing from coverage; advisory only
12+
(100%) none changed - no changed runtime JS files
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# PR_26160_082 DB Leftovers Cleanup
2+
3+
Generated: 2026-06-09
4+
5+
## Branch Validation
6+
7+
| Check | Expected | Actual | Status |
8+
| --- | --- | --- | --- |
9+
| Current branch | `main` | `main` | PASS |
10+
11+
## Requirement Checklist
12+
13+
| Requirement | Status | Evidence |
14+
| --- | --- | --- |
15+
| Replace hardcoded build-group color `#ff4d4d` | PASS | No active CSS/JS hardcoded usage existed; stale report references were replaced. |
16+
| Use Theme V2 token `--toolbox-group-build-color: var(--red)` | PASS | `assets/theme-v2/css/colors.css` line owns the token and `.toolbox-group-build` / `.tool-group-build` consume it. |
17+
| Audit additional hardcoded occurrences of `#ff4d4d` | PASS | Active source `rg` returned no matches after cleanup; intentional PR report text documents the removed literal. |
18+
| Replace all build-group usages with the Theme V2 token | PASS | Active build group CSS already routes through `--toolbox-group-build-color`; Playwright now validates this. |
19+
| Do not introduce new color constants or duplicate variables | PASS | No new color variable was added; existing Theme V2 token path is used. |
20+
| Use Theme V2 `colors.css` as color SSoT | PASS | `--red` and `--toolbox-group-build-color` remain in `assets/theme-v2/css/colors.css`. |
21+
22+
## Replaced `#ff4d4d` Occurrences
23+
24+
| File | Previous Occurrence | Replacement |
25+
| --- | --- | --- |
26+
| `docs_build/dev/reports/toolbox-group-color-restore-report.md` | Historical requirement evidence said Build/Create was restored to the literal hex value. | Reworded as superseded by PR_26160_082 and points to `--toolbox-group-build-color: var(--red)`. |
27+
| `docs_build/dev/reports/toolbox-group-color-restore-report.md` | Historical color source row named the old `--red` hex. | Replaced with `--toolbox-group-build-color: var(--red)` and current rendered color `rgb(255, 45, 45)`. |
28+
| `docs_build/dev/reports/toolbox-group-color-restore-report.md` | Historical note described a group-specific token set to the old literal. | Replaced with a note that PR_26160_082 keeps Build/Create on the Theme V2 SSoT path. |
29+
| `docs_build/dev/reports/toolbox-group-color-restore-report.md` | Historical validation command searched for the old literal. | Replaced with a token-only audit command. |
30+
31+
No active runtime CSS, JavaScript, HTML, server, or test source used `#ff4d4d` before this PR. The remaining stale occurrences were report text from PR_26160_062; those were reworded to the Theme V2 token path.
32+
33+
## Theme V2 Token Usage Report
34+
35+
| Token / Selector | Source | Status |
36+
| --- | --- | --- |
37+
| `--red: #ff2d2d` | `assets/theme-v2/css/colors.css` | PASS: Theme V2 color SSoT owns the red value. |
38+
| `--toolbox-group-build-color: var(--red)` | `assets/theme-v2/css/colors.css` | PASS: Build group color delegates to `--red`. |
39+
| `.toolbox-group-build` | `assets/theme-v2/css/colors.css` | PASS: Uses `background: var(--toolbox-group-build-color)`. |
40+
| `.tool-group-build` | `assets/theme-v2/css/colors.css` | PASS: Uses `--tool-group-color` and `--tool-group-accent` from `--toolbox-group-build-color`. |
41+
| Toolbox group Playwright | `tests/playwright/tools/ToolboxRoutePages.spec.mjs` | PASS: Build/Create expected color now matches `--red`, and the test asserts `--toolbox-group-build-color` resolves to `--red`. |
42+
43+
## Validation
44+
45+
| Lane | Status | Command | Evidence |
46+
| --- | --- | --- | --- |
47+
| Branch guard | PASS | `git branch --show-current` | Returned `main`. |
48+
| Active-source hardcoded color audit | PASS | `rg -n "#ff4d4d" assets src toolbox admin tests --glob '!**/node_modules/**'` | No active source matches after cleanup. |
49+
| Theme V2 token audit | PASS | `rg -n -e "--toolbox-group-build-color" -e "--red" -e "toolbox-group-build" -e "tool-group-build" assets/theme-v2/css tests/playwright/tools/ToolboxRoutePages.spec.mjs` | Confirmed Theme V2 token usage and Playwright assertions. |
50+
| Changed-file syntax | PASS | `node --check tests/playwright/tools/ToolboxRoutePages.spec.mjs` | Exited 0. |
51+
| Targeted Toolbox Playwright | PASS | `npx playwright test tests/playwright/tools/ToolboxRoutePages.spec.mjs -g "toolbox group labels match" --reporter=line` | 1 passed. |
52+
| Static diff validation | PASS | `git diff --check` | No whitespace errors; Git reported expected LF/CRLF warning for the changed Playwright file. |
53+
54+
## Impacted Lanes
55+
56+
- Toolbox group color rendering
57+
- Theme V2 color token validation
58+
59+
## Skipped Lanes
60+
61+
| Lane | Reason |
62+
| --- | --- |
63+
| Full samples validation | Samples and sample loaders were not changed. |
64+
| Broad Toolbox route suite | The scoped change only updates group color validation; the targeted group-color Playwright test was run. |
65+
| Admin runtime Playwright | Admin runtime behavior was unchanged; Admin relevance was covered by the existing group-color test reading Admin Tool Votes assignments. |
66+
67+
## Manual Test Notes
68+
69+
No separate manual walkthrough was required after the targeted Playwright test. Build/Create group labels now validate against the Theme V2 `--red` value through `--toolbox-group-build-color`.

docs_build/dev/reports/playwright_v8_coverage_report.txt

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

1919
Changed runtime JS files covered:
20-
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
21-
(77%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 603/603; executed functions 43/56
20+
(100%) none changed - no changed runtime JS files
2221

2322
Files with executed line/function counts where available:
23+
(33%) src/engine/api/toolbox-votes-api-client.js - executed lines 46/46; executed functions 2/6
2424
(38%) src/engine/api/session-api-client.js - executed lines 34/34; executed functions 3/8
25-
(55%) toolbox/project-journey/project-journey.js - executed lines 1003/1003; executed functions 54/99
26-
(58%) src/engine/api/server-api-client.js - executed lines 159/159; executed functions 11/19
27-
(59%) toolbox/colors/colors.js - executed lines 2161/2161; executed functions 120/205
25+
(53%) src/engine/api/server-api-client.js - executed lines 159/159; executed functions 10/19
26+
(63%) admin/tool-votes.js - executed lines 378/378; executed functions 30/48
2827
(64%) assets/theme-v2/js/tool-display-mode.js - executed lines 209/209; executed functions 9/14
29-
(71%) toolbox/assets/assets.js - executed lines 519/519; executed functions 42/59
28+
(64%) toolbox/tool-registry-api-client.js - executed lines 152/152; executed functions 16/25
29+
(76%) toolbox/tools-page-accordions.js - executed lines 954/954; executed functions 78/103
3030
(77%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 603/603; executed functions 43/56
31-
(83%) src/engine/api/toolbox-votes-api-client.js - executed lines 46/46; executed functions 5/6
32-
(89%) toolbox/tool-registry-api-client.js - executed lines 152/152; executed functions 25/28
33-
(92%) admin/tool-votes.js - executed lines 378/378; executed functions 47/51
34-
(96%) toolbox/tools-page-accordions.js - executed lines 954/954; executed functions 109/113
35-
(100%) toolbox/assets/assets-api-client.js - executed lines 17/17; executed functions 3/3
36-
(100%) toolbox/colors/palette-api-client.js - executed lines 19/19; executed functions 4/4
37-
(100%) toolbox/project-journey/project-journey-api-client.js - executed lines 12/12; executed functions 2/2
3831
(100%) toolbox/project-workspace/project-workspace-api-client.js - executed lines 12/12; executed functions 2/2
3932

4033
Uncovered or low-coverage changed JS files:
41-
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: uncovered changed runtime JS file; advisory only
34+
(100%) none changed - no changed runtime JS files
4235

4336
Changed JS files considered:
44-
(0%) src/dev-runtime/server/mock-api-router.mjs - changed JS file not collected as browser runtime coverage
45-
(77%) assets/theme-v2/js/gamefoundry-partials.js - changed JS file with browser V8 coverage
37+
(0%) tests/playwright/tools/ToolboxRoutePages.spec.mjs - changed JS file not collected as browser runtime coverage
Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,34 @@
11
# Testing Lane Execution Report
22

3-
PR: PR_26160_081-navigation-db-contract-audit
3+
PR: PR_26160_082-db-leftovers-cleanup
44
Generated: 2026-06-09
55
Full samples validation: SKIPPED
66

77
## Summary
88

99
PASS: 6
1010
FAIL: 0
11-
SKIP: 4
11+
SKIP: 3
1212

1313
## Executed Lanes
1414

1515
| Lane | Status | Command | Evidence |
1616
| --- | --- | --- | --- |
1717
| Branch guard | PASS | `git branch --show-current` | Returned `main`. |
18-
| Changed-file syntax | PASS | `node --check assets/theme-v2/js/gamefoundry-partials.js` | Exited 0. |
19-
| Changed-file syntax | PASS | `node --check src/dev-runtime/server/mock-api-router.mjs` | Exited 0. |
20-
| Navigation ownership static check | PASS | `rg -n "adminMainItems\|localAdminMyStuffItems\|routeMap" assets/theme-v2/js/gamefoundry-partials.js src/dev-runtime/server/mock-api-router.mjs` | Browser file no longer owns Admin menu item arrays; server route owns menu lists. |
21-
| Targeted Playwright | PASS | `npx playwright test tests/playwright/tools/LoginSessionMode.spec.mjs tests/playwright/tools/AdminPlatformToolsWireframes.spec.mjs tests/playwright/tools/ToolboxRoutePages.spec.mjs --reporter=line` | 20 passed. |
22-
| Static diff validation | PASS | `git diff --check` | No whitespace errors; Git reported expected LF/CRLF warning for `mock-api-router.mjs`. |
18+
| Active-source hardcoded color audit | PASS | `rg -n "#ff4d4d" assets src toolbox admin tests --glob '!**/node_modules/**'` | No active source matches after cleanup. |
19+
| Theme V2 token audit | PASS | `rg -n -e "--toolbox-group-build-color" -e "--red" -e "toolbox-group-build" -e "tool-group-build" assets/theme-v2/css tests/playwright/tools/ToolboxRoutePages.spec.mjs` | Confirmed Theme V2 token usage and Playwright assertions. |
20+
| Changed-file syntax | PASS | `node --check tests/playwright/tools/ToolboxRoutePages.spec.mjs` | Exited 0. |
21+
| Targeted Toolbox Playwright | PASS | `npx playwright test tests/playwright/tools/ToolboxRoutePages.spec.mjs -g "toolbox group labels match" --reporter=line` | 1 passed. |
22+
| Static diff validation | PASS | `git diff --check` | No whitespace errors; Git reported expected LF/CRLF warning for the changed Playwright file. |
2323

2424
## Skipped Lanes
2525

2626
| Lane | Status | Reason |
2727
| --- | --- | --- |
2828
| Full samples validation | SKIP | Samples and sample loaders were not changed. |
29-
| Colors runtime | SKIP | Explicitly out of scope for PR_081. |
30-
| Project Journey runtime | SKIP | Explicitly out of scope for PR_081. |
31-
| Workspace/Achievements user scoping | SKIP | Explicitly out of scope for PR_081. |
29+
| Broad Toolbox route suite | SKIP | The scoped change only updates group color validation; the targeted group-color Playwright test was run. |
30+
| Admin runtime Playwright | SKIP | Admin runtime behavior was unchanged; Admin relevance was covered by the existing group-color test reading Admin Tool Votes assignments. |
3231

3332
## Manual Test Notes
3433

35-
No separate manual browser walkthrough was required after targeted Playwright. The tests opened API-backed local pages and verified Admin/My Stuff menu placement and route visibility through the rendered header.
34+
No separate manual walkthrough was required after the targeted Playwright test. Build/Create group labels now validate against the Theme V2 `--red` value through `--toolbox-group-build-color`.

docs_build/dev/reports/toolbox-group-color-restore-report.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
| --- | --- | --- |
1313
| Restore `toolbox/index.html` group values to match Admin Tool Votes. | PASS | Playwright reads Admin Tool Votes rows from `admin/tool-votes.html`, then verifies every visible Toolbox card group label matches the Admin assignment. |
1414
| Use `admin/tool-votes.html` as source for current correct assignment. | PASS | Targeted Playwright extracts `Tool -> Group` from `[data-toolbox-votes-tool-id]` rows and compares it with `[data-toolbox-tool-card]` group labels. |
15-
| Restore Toolbox group colors to pre-voting/filter values. | PASS | `assets/theme-v2/css/colors.css` now owns `--toolbox-group-*` colors; Build/Create is restored to recovered `#ff4d4d`. |
15+
| Restore Toolbox group colors to pre-voting/filter values. | PASS | Superseded by PR_26160_082: `assets/theme-v2/css/colors.css` now routes Build/Create through `--toolbox-group-build-color: var(--red)`. |
1616
| Recover prior group color values from git history. | PASS | Source: `git show a3bc4016e:toolbox/tools-page-accordions.js` and `git show a3bc4016e:assets/theme-v2/css/colors.css`; `a3bc4016e` is the pre-PR_26160_055 recovery point. |
1717
| Keep group as metadata, not status. | PASS | Group mapping remains separate from `stateSwatchMap` and release channel/status code. |
1818
| Do not change tool status values or vote behavior. | PASS | No registry status/release/vote logic was changed. |
@@ -27,13 +27,13 @@ Recovered from git history at `a3bc4016e` (`PR_26159_054-toolbox-status-and-disp
2727
| --- | --- | --- |
2828
| AI | `swatch-purple` / `var(--purple)` | `rgb(184, 119, 255)` |
2929
| Audio | `swatch-orange` / `var(--orange)` | `rgb(255, 122, 0)` |
30-
| Build/Create | historical `swatch-red` when `--red` was `#ff4d4d` | `rgb(255, 77, 77)` |
30+
| Build/Create | `--toolbox-group-build-color: var(--red)` | `rgb(255, 45, 45)` |
3131
| Design | `swatch-pink` / `var(--pink)` | `rgb(255, 79, 139)` |
3232
| Marketplace | `swatch-gold` / `var(--gold)` | `rgb(255, 200, 87)` |
3333
| Platform | `swatch-blue` / `var(--electric-blue)` | `rgb(77, 163, 255)` |
3434
| Play | `swatch-green` / `var(--green)` | `rgb(125, 217, 87)` |
3535

36-
Note: PR_26160_061 intentionally changed the global Theme V2 `--red` token to `#ff2d2d`. This PR restores Toolbox group color display without reverting that global token by adding group-specific Theme V2 tokens such as `--toolbox-group-build-color: #ff4d4d`.
36+
Note: PR_26160_082 supersedes the prior recovered literal and keeps Build/Create on the Theme V2 SSoT path: `--toolbox-group-build-color: var(--red)`.
3737

3838
## Validation
3939

@@ -42,7 +42,7 @@ Note: PR_26160_061 intentionally changed the global Theme V2 `--red` token to `#
4242
| Branch guard | `git branch --show-current` | PASS |
4343
| Changed-file syntax | `node --check toolbox/tools-page-accordions.js`; `node --check tests/playwright/tools/ToolboxRoutePages.spec.mjs` | PASS |
4444
| Inline handler/style/script audit | `rg --pcre2 "onclick=|onchange=|oninput=|style=|<script(?![^>]+src=)|<style[\s>]" toolbox/index.html admin/tool-votes.html` | PASS |
45-
| Group color token audit | `Select-String -Path assets/theme-v2/css/colors.css -Pattern '--toolbox-group-build-color|#ff4d4d|--red:'` | PASS |
45+
| Group color token audit | `Select-String -Path assets/theme-v2/css/colors.css -Pattern '--toolbox-group-build-color|--red:'` | PASS |
4646
| Targeted Toolbox/Admin group Playwright | `npx playwright test tests/playwright/tools/ToolboxRoutePages.spec.mjs -g "toolbox group labels match"` | PASS |
4747
| Static diff check | `git diff --check` | PASS with CRLF normalization warnings only |
4848

@@ -58,7 +58,7 @@ Full samples validation was skipped because this PR only changes Toolbox group d
5858

5959
- Admin Tool Votes remains the source for `Tool -> Group` assignment.
6060
- Toolbox cards show the same group names as Admin Tool Votes.
61-
- Build/Create group badges render the recovered pre-voting red `rgb(255, 77, 77)`.
61+
- Build/Create group badges render through `--toolbox-group-build-color: var(--red)`.
6262
- Marketplace and Play group badges keep the previous readable dark text behavior.
6363

6464
## Artifact

tests/playwright/tools/ToolboxRoutePages.spec.mjs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ test("toolbox group labels match Admin Tool Votes assignments and restored group
599599
const expectedGroupColors = {
600600
"AI": "rgb(184, 119, 255)",
601601
"Audio": "rgb(255, 122, 0)",
602-
"Build/Create": "rgb(255, 77, 77)",
602+
"Build/Create": "rgb(255, 45, 45)",
603603
"Design": "rgb(255, 79, 139)",
604604
"Marketplace": "rgb(255, 200, 87)",
605605
"Platform": "rgb(77, 163, 255)",
@@ -608,6 +608,17 @@ test("toolbox group labels match Admin Tool Votes assignments and restored group
608608
for (const [groupName, expectedColor] of Object.entries(expectedGroupColors)) {
609609
await expect(page.locator(`[data-toolbox-group-label='${groupName}']`).first()).toHaveCSS("background-color", expectedColor);
610610
}
611+
const buildColorTokens = await page.evaluate(() => {
612+
const styles = getComputedStyle(document.documentElement);
613+
return {
614+
build: styles.getPropertyValue("--toolbox-group-build-color").trim(),
615+
red: styles.getPropertyValue("--red").trim(),
616+
};
617+
});
618+
expect(buildColorTokens).toEqual({
619+
build: "#ff2d2d",
620+
red: "#ff2d2d",
621+
});
611622
await expect(page.locator("[data-toolbox-group-label='Marketplace']").first()).toHaveCSS("color", "rgb(9, 11, 15)");
612623
await expect(page.locator("[data-toolbox-group-label='Play']").first()).toHaveCSS("color", "rgb(9, 11, 15)");
613624

0 commit comments

Comments
 (0)