Repository navigation
feat(live): scope palette and legend window in the customizer (#882 M2) - #999
Conversation
Theme keys scope1-12, scopeNone, scopeUnknown and scopeOther (--scope-*) in THEME_CSS_MAP and THEME_COLOR_KEYS, with light and dark values in every theme preset (the stylesheet palette, so a preset pick changes nothing). Each colourblind preset carries a light and a dark scope palette (--mc-scope-<mode>-*), read by style.css before the M1 default; a user pick is set inline only when it differs from the default, so a preset pick never hides the colourblind palette. Display > Live scope legend: minutes listed (1-60, default 15) and rows (1-12, default 12), per browser in the liveScope section, by the rule LiveScopeColor.SETTINGS; built with createElement. Live re-reads them on each legend render and retitles "SCOPES (last N min)". The cap of 64 stays fixed. Relates to #882 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Report — #882 M2, head
|
| Job | Result | Time |
|---|---|---|
| Go Build & Test | ✅ pass | <1 min |
| Go Server Tests (1/3) | ✅ pass | 11 min |
| Go Server Tests (2/3) | ✅ pass | 13 min |
| Go Server Tests (3/3) | ✅ pass | 16 min |
| Go Ingestor Tests | ✅ pass | 4 min |
| Go Libraries & CLI | ✅ pass | 6 min |
| Verify Go Test Assignments | ✅ pass | 1 min |
| JavaScript Unit Tests & Lint | ✅ pass | 3 min |
| Script & Container Unit Checks | ✅ pass | 1 min |
| Validate Docker Image | ✅ pass | 1 min |
| Playwright E2E Tests (1/3) | ✅ pass | 31 min |
| Playwright E2E Tests (2/3) | ✅ pass | 39 min |
| Playwright E2E Tests (3/3) | ✅ pass | 39 min |
| Verify E2E Shards & Coverage | ✅ pass | <1 min |
| Build & Publish Docker Image | ✅ pass | <1 min |
| Release Artifacts, Deploy Staging, Publish Badges | skipped (PR) | — |
[CI]
Local runs
These ran on the working tree that was committed unchanged as 8f82aa1d (runs 11:50–12:09, commit 12:10, tree clean since), against a local server with the CI-prepared fixture.
sh test-all.sh: 380 passed, 0 failed [T]- Live and customizer E2E, 51 suites: 50 pass [T]. The one failure is
test-issue-670-live-feed-capped-e2e.js, one case at 820×400 ("no panel control centre inside the feed 12,207,372,296"). It fails the same way on a plainorigin/masterexport (71372e9), so it is pre-existing and local, not from this PR [T]; the same case passes in CI [CI]. This PR does not change the Live controls panel [A]. - New suites:
test-882-m2-scope-customizer.js25/25 andtest-882-m2-scope-customizer-e2e.js9/9 [T].
Mutants (28/28 killed) [T]
| # | Mutant | Killed by |
|---|---|---|
| M1 | scope keys left out of THEME_COLOR_KEYS |
unit |
| M2 | scope12 not mapped in THEME_CSS_MAP |
unit |
| M3 | the mono preset gets no scope palette | unit |
| M4 | Default preset light slot 1 drifts from style.css | unit |
| M5 | applyCSS: a default-equal value is stamped inline |
unit |
| M6 | applyCSS: scope keys skipped |
unit |
| M7 | colourblind scope palette not applied | unit |
| M8 | trit light slot 4 too light for the map tile (1.58:1) | unit (contrast) |
| M9 | clearPreset keeps the scope variables |
unit |
| M10 | style.css dark block reads the light hook | unit |
| M11 | legendRows bound raised to 24 |
unit |
| M12 | fractions accepted | unit |
| M13 | registry: window ignores the settings | unit |
| M14 | registry: rows ignore the settings | unit |
| M15 | liveScope not a known section |
unit |
| M16 | values stored unvalidated | unit |
| M17 | bad values pass validateShape |
unit |
| M18 | Display badge does not count liveScope |
unit |
| M19 | Reset All keeps --mc-scope-* |
unit |
| M20 | section title via innerHTML |
unit |
| M21 | window input max not from the rule | unit |
| M22 | no scope colour group in the Theme tab | unit |
| M23 | legend never re-reads the window | E2E |
| M24 | legend title not updated | E2E |
| M25 | palette cache kept on theme-changed |
E2E |
| M26 | registry ignores SITE_CONFIG |
E2E |
| M27 | Display section not mounted | E2E |
| M28 | change handler never stores | E2E |
Three were redone before they counted: M8 and M10 first matched twice and were re-anchored, and M16's first kill was a syntax error, so it was rewritten as a real mutant and killed by the persistence test.
Phone and themes
375×560 touch phone from a cold start, light and dark, real taps: the Theme and Display sections and Live with "Color by scope" (covered by the E2E's phone cases). Desktop legend screenshots in light and dark were taken locally.
🤖 Generated with Claude Code
Review — CS-VM1 PR#999 — head 8f82aa1Dom: REQUEST CHANGES The feature is in good shape. It does what #882 M2 asks, the defaults are unchanged, the phone flow works by real taps, and the PR's own mutants are all killed. It cannot be merged as it stands, though:
Both are cheap to fix in the same rebase. Evidence: [T] = I ran it here (linux/amd64); [K] = read in the code at the head or in the merged tree; [A] = my analysis or inference, not run. Findings
Resolving #1 (what I did to test the merged tree, for the author's rebase):
With that resolution, the merged tree passes every check in this review (below). The author should still rebase, rerun everything and let CI confirm it [A]. Master moved during this review. It went from Answers to the checklist
Phone check (my own flow, merged tree, cold start at
|
| Run | Tree | Result |
|---|---|---|
sh test-all.sh |
merged | 373/382 files. The 9 that fail are perf-budget or timing asserts: test-live-heard-filter, test-live-scope-color (perf case only, 19/20), test-live-follow, test-issue-724-masts-hint, test-issue-728-ortho-base, test-issue-941-predicted-reach, test-issue-730-buildings-ui, test-dagi-filter, test-issue-598-hop-path-inference. The same files fail on master here (all 9; on merged, test-dagi-filter passed on a rerun), so this is environmental. |
node test-frontend-helpers.js |
merged | 738 passed, 0 failed |
test-882-m2-scope-customizer.js |
master / head / merged | 0/25 / 25/25 / 25/25 |
test-882-m2-scope-customizer-e2e.js (40 s line wait) |
master / merged | 1/9 / 9/9 |
| same, unmodified | head / merged | 4/9 / 4/9 (desktop line waits time out, see the note; the 2 phone steps pass) |
scripts/run-e2e-shard.js --validate |
merged / head | OK, 292 / 290 suites in three shards |
scripts/check-xss-sinks.sh --diff origin/master |
head | exit 0, clean |
| Live and customizer E2E (merged, run alone) | merged | Pass: 881-m3-moments-customizer 8/8, 914-heat-palette 14/14, 968-kiosk-customizer 8/8, customize-theme 8/8, customize-display 8/8, customize-export 6/6, customize-branding, logo-theme, 741-customizer 6/6, 734-customizer-overlays 6/6, 681-m6-customizer-terrain 30/30, 883-live-teardown 10/10, 839-live-teardown 4/4, 428-live-listener-leak 6/6, 480-no-scope 25/25, 1204-live-panel-structure. Fail here on master as well: 880-m3-follow-customizer (merged 5/8, master 4/8) and issue-880-live-follow (merged 8/13 and 7/13, master 9/13 twice). Their failures are clicks on #chooseExp or the auto-hidden top nav, and 1.5–15 s timing windows; the PR does not touch Follow [A]. In a first run under parallel load, 968, 734 and 839 failed; alone they all pass. |
Go cmd/server (targeted) |
merged | TestGraphScore629_GoldenBitIdentical PASS on amd64; the three read-only invariant tests PASS; go vet clean |
Go cmd/ingestor (go test -count=1 -timeout 45m ./...) |
merged | ok (1017 s). A first run with Go's default 10 min timeout was cut off inside TestNeighborEdgesBuilderDeltaScan, with 0 failures before that; this VM is slower than CI (4m54s). |
The E2E server followed CI: freshen, the inline seed SQL, corescope-migrate, then the 2073, 199, 245 and 122 seeds. I used 245 and 122 as well because the current workflow runs them. The Go binaries were built from the merged tree, and the servers were stopped by port after checking each process's command line.
Mutants [T]
All mutants were applied to a copy of the merged tree.
| # | Mutant | Result |
|---|---|---|
| PR M5 | applyCSS stamps a default-equal value inline |
killed (unit) |
| PR M9 | clearPreset keeps --mc-scope-* |
killed (unit) |
| PR M12 | fractions accepted | killed (unit) |
| PR M14 | registry rows ignore the setting | killed (unit) |
| PR M18 | Display badge does not count liveScope |
killed (unit) |
| PR M19 | Reset All keeps --mc-scope-* |
killed (unit) |
| PR M23 | legend never re-reads the window (configure() removed) |
killed (E2E, 3 steps) |
| PR M25 | palette cache kept on theme-changed |
killed (E2E, 3 steps) |
| O1 | _applyScopeCSS compares with the light defaults in dark mode |
survived unit 25/25 and E2E 9/9 → finding 2 |
| O3 | the default value stored as an override instead of cleared | survived → finding 4 |
| O5 | case-sensitive default comparison | survived → finding 4 |
| O6 | registry expiry uses the fixed 15 min instead of the setting | killed (unit, 2 tests) |
| O8 | colourblind preset writes its light palette into the dark hooks | killed (unit, 2 tests) |
Not verified
- The full Go
cmd/serversuite. The PR changes no Go and the merged tree's Go is byte-identical to master; I ran only the targeted tests above. - Of the author's 28 mutants I reran 8; the other 20 I did not run.
- Of the 61 Live/customizer E2E suites, I ran 19 (listed above), not all.
- The unmodified desktop E2E steps with their 8 s timeout, on hardware like CI's: here they fail on master too.
- A real native colour picker on a phone (the value is filled, as in the PR's E2E).
- An iOS/Safari engine (Chromium only).
- My conflict resolution is a reviewer's resolution for testing, not the author's. After the rebase, CI on the new head is what counts.
- Real traffic, and whether achromatopsia users actually confuse the colours in finding 3 (computed luminance only).
Resolves the conflicts with #880 M3 (follow colours and settings) in public/customize-v2.js and public/cb-presets.js by keeping both sides: VALID_SECTIONS/OBJECT_SECTIONS list 'follow' and 'liveScope', the Display badge counts both, each colourblind preset carries followAccents and scopePalette, applyPreset/clearPreset set and clear both, and the import validation and the Theme tab rows keep both blocks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ette copy less (#882 M2) Review of #999: - test the dark half of _applyScopeCSS (a preset pick in dark mode stays off <html>) and its case-insensitive default comparison (mutants O1, O5); - setLiveScopeSetting(): the legend window's store rule, out of the change handler, like setFollowSetting; a default typed back clears the override (mutant O3), now unit-tested; - achromat scope palette: 14 even luminance steps (slots, unknown, other), each >= 1.13:1 from the next; "no scope" below 3:1 on the tile and >= 1.79:1 from every slot (was 1.02-1.05 against the nearest slot); - the Default colourblind preset no longer repeats the style.css palette, and Reset All derives the 15 hook names from SCOPE_COLOR_KEYS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review feedback addressed (commit
Mutants (unit suite, each on a scratch copy): O1, O3, O5, Reset All skipping the scope hooks, the old achromat light palette, the old achromat dark palette, Default with a palette, and Checks on
|
Review — CS-VM3 PR#999 — head 5d92663Dom: APPROVE This is a re-review after the fix round: merge commit
Evidence: [T] = I ran it here (linux/amd64, 4 vCPU); [K] = read in the code at the head or in the merged tree; [A] = my analysis or inference, not run. Findings
Merge resolution (
|
| Mode | Slots vs tile (min) | Adjacent slots (min) | none (vs tile / nearest slot) | unknown | other | none/unknown, none/other, unknown/other |
|---|---|---|---|---|---|---|
| light | 4.01 | 1.134 | 2.22 / 1.81 | 3.49 / 1.15 | 3.05 / 1.32 | 1.57, 1.37, 1.15 |
| dark | 4.00 | 1.133 | 2.23 / 1.80 | 3.46 / 1.15 | 3.03 / 1.32 | 1.56, 1.36, 1.14 |
This matches the author's numbers.
Answers to the checklist
- Every required finding is fixed, and each nit is fixed or explained. Yes, see findings 1–6. [T] [K]
- The merge resolution is correct. Yes, see above. [T] [K]
- The follow-colour (Live: “Follow a packet” – replay how one packet spreads through the mesh #880/feat(live): Follow a packet settings and colours in the customizer (#880 M3) #1000) and scope-palette suites on the merged tree [T]:
- unit:
test-880-m3-follow-customizer22/22,test-live-follow39/39,test-882-m2-scope-customizer29/29,test-live-scope-color19/20; - the one failing case in
test-live-scope-coloris the perf assert, which fails on master too: 273–518 ms against a 50 ms budget on this VM; test-live-follow's perf case flaked once under load and passed on 5 reruns.
- unit:
- The new tests are red without the fix and green with it. [T]
- The fix commit's test file run against
a63c68abgives 26/29. The 3 red tests are: Default carries no palette; achromat neutrals;setLiveScopeSetting. - The O1 and O5 tests pass at
a63c68ab, because they guard code that was already correct. They do kill the O1/O5 mutants (below). - On the merged tree all 29 are green.
- Against master the unit suite is 1/29, and the E2E is 1/9 (only the "defaults unchanged" guard passes), as the PR says.
- The fix commit's test file run against
- Nothing else changed unseen. Yes. I diffed the fix commit alone, the merge against both parents, the merge against Git's own auto-merge, the whole PR against master, and the merge with current master. [T]
- No behaviour change beyond the purpose. [T] [K]
- The PR's
live.jsandlive-scope-color.jschanges are identical to what the first review saw. - The neighbouring suites on the merged tree give the same results as master, run one after another: moments 8/8, kiosk 8/8,
480-no-scope25/25, M1 scope 8/8 (both at 40 s), the follow E2Es (same failures as master, below), and9128/8.
- The PR's
cmd/serverstays read-only, and there are no newmap[string]interface{}.- No Go file changes; the merged tree's Go is byte-identical to master. [T]
- The diff adds 0
map[string]interface{}. [T] TestServerDBHasNoWriteMethods,TestServerDBConnIsReadOnlyandTestServerSourceHasNoCachedRWCallspass. [T]
- No hardcoded colours. The added hex is in
style.css--scope-*definitions (unchanged since the first review) and in preset data incb-presets.js/customize-v2.js, as already done there.live.jsandlive-scope-color.jsadd no hex. [T] [K] - XSS.
scripts/check-xss-sinks.sh --diff origin/masterexits 0, both on the head and on the merged tree (run in a scratch clone). [T] - Fork guards, closing keywords and author. [T]
- The fork guards (
github.repository == 'Kpa-clawbot/CoreScope') stand at 9 indeploy.ymland 1 inrelease-fast-path.yml, on the head and on the merged tree. No workflow is changed. - There is no closing keyword in the body or the commits ("Relates to Live: colour packet lines by scope #882").
- All 3 commits are authored and committed by
dborup <kontakt@meshview.dk>.
- The fork guards (
- CI. Run
46135740607is on head5d926634(checked with the public API): conclusion success. All jobs passed; Release, Deploy Staging and Publish Badges were skipped, as usual for a PR. [T]
Phone and browser (my own walk, merged tree, local server) [T]
The walk starts cold: a fresh context at /, no deep link and no storage priming. The theme comes from colorScheme only. Touch is on with isMobile. Before every tap, an elementFromPoint check confirms the target is the visible element and inside the viewport. Then touchscreen.tap at its centre.
The steps:
- More → Customize.
- Theme → tap "Live scope colours (15 options)". 15 rows for the mode's section (
themeorthemeDark), and the picker is 48×48. Pick scope 1, and--scope-1follows. - Theme → tap "Live follow a packet (4 options)". 4 rows; pick the observer colour, and
--follow-observerfollows. - Colors → tap the Deuteranopia radio.
- The unpicked
--scope-2changes to the deut palette of the mode (light#c25000, dark#fe6100), and nothing is stamped inline. - The picked
--scope-1still wins. - The unpicked
--follow-relaychanges to deut's#fe6100, and the picked observer still wins.
- The unpicked
- Display → tap and type 7 and 2 in "Live scope legend". The inputs are 48 px tall.
- A typed 40 is put back to 2.
- The storage holds
{"windowMinutes":7,"legendRows":2}, and the Display badge reads 2.
- Close → Live through the bottom nav → tap "Color by scope". Three packets are injected with real fixture nodes (no
/api/nodesstub).- The slot-1 line is
#cc0077(the pick), and the slot-2 line is the deut colour. - The legend reads "SCOPES (last 7 min)" with 2 rows plus "+1 more".
- The slot-1 line is
Results:
- 375×560 and 360×640, light and dark: 4/4 runs pass, no step impossible, nothing had to be closed first, 0 page errors, and no sideways scroll on any screen.
- Outside this PR (as in the first review): on a first visit the "Tip: swipe in from the left edge…" bubble overlays the customizer header. It did not block any tap, and it is the same on master [A].
- The PR's own E2E phone steps (375×560, light and dark) pass too.
Tests [T]
| Run | Tree | Result |
|---|---|---|
sh test-all.sh |
merged (060ccbfa) |
374/384. 2 of the 10 failures need a git checkout (test-issue-628-vendor-gitattributes, test-issue-715-og-denmark) and pass 4/4 and 10/10 in a git clone of the merged tree. The other 8 are perf or timing asserts and fail the same way on master: live-heard-filter, live-scope-color (perf), 724, 728, 941, 730, dagi-filter (master passed once), and 598, which loads only hop-resolver.js (master failed 5 on a rerun, merged 4). |
node test-frontend-helpers.js |
merged | 738 passed, 0 failed |
Go cmd/ingestor go test -count=1 ./... |
merged | ok (1395 s) |
Go cmd/server go test -count=1 ./... |
merged | FAIL on 4 perf budgets only: TestAdvertIntervalAnalytics_AggregatePerf (32 ms against 25), TestProfileCard_Cost, and TestCoverage941_PerfBudget and TestCoverage941M2_PerfBudget (terrain 504 under a load average of about 10). The first two fail the same way on master run alone. The Go is byte-identical to master. TestGraphScore629_GoldenBitIdentical PASSES (amd64), and so do the 3 read-only invariant tests. |
test-882-m2-scope-customizer.js |
master / a63c68ab / head / merged |
1/29 / 26/29 / 29/29 / 29/29 |
test-882-m2-scope-customizer-e2e.js |
merged | unmodified: 7/9 (the dark desktop step hits the 8 s line wait, and the colourblind step then reads a page left in dark mode). With only the line wait raised to 40 s: 9/9. Against master with 40 s: 1/9. |
test-live-scope-color-e2e.js (M1) |
master / merged | 8 s: 4/8 and 5/8; at 40 s: 8/8 / 8/8 |
test-880-m3-follow-customizer-e2e.js |
master / merged | 4/8 / 5/8. The same steps fail on master (settle timing, and the phone steps' "Element is not attached to the DOM"). |
test-issue-880-live-follow-e2e.js |
master / merged | 8/13 / 8/13, with the same 5 steps failing on both |
881-m3-moments-customizer, 968-kiosk-customizer, issue-480-no-scope |
master / merged (run one after another) | 8/8, 8/8, 25/25 on both |
customize-theme, customize-display, customize-export |
merged | 8/8, 8/8, 6/6 |
issue-428-live-listener-leak, 883-live-teardown, issue-912-live-1byte-hops |
merged | 6/6, 10/10, 8/8 |
How the E2E was run:
- The E2E server followed CI: freshen, the inline seed SQL from
deploy.yml,corescope-migrate, then the 2073, 199, 245 and 122 seeds. The current workflow also runs 245 and 122. - The binaries were built from each tree.
- Master ran on a second port with its own fixture.
- The servers were stopped by port, after checking each process's command line.
- A first pass ran beside the Go suites at a load average of about 10, and several suites timed out on page loads. Every suite that failed then was rerun alone, master and merged one after another; the table gives those reruns.
Mutants (all on a copy of the merged tree, unit suites 882-m2, 880-m3-follow, live-follow, live-scope-color) [T]
| # | Mutant | Result |
|---|---|---|
| O1 | _applyScopeCSS compares with the light defaults in dark mode |
killed by "applyCSS, dark mode: …" |
| O3 | the default value stored instead of cleared in setLiveScopeSetting |
killed by "setLiveScopeSetting: …" |
| O5 | .toLowerCase() dropped in the default comparison |
killed by "the default comparison ignores case" |
| N1 | Reset All clears only the light --mc-scope-* hooks |
killed ("Reset All strips the colourblind scope variables too") |
| N2 | setLiveScopeSetting without validation |
killed |
| N3 | _applyScopeCSS never removes an inline value |
killed |
| N4 | cb-presets applyPreset writes the light list into the dark hooks |
killed |
| N5 | merge: 'follow' dropped from VALID_SECTIONS |
killed (follow suite, 7 tests) |
| N6 | merge: the Display badge drops follow |
killed (follow suite) |
| N7 | merge: clearPreset keeps --mc-follow-* |
killed (follow suite) |
| N8 | import validation skips liveScope |
killed |
| N9 | achromat dark "no scope" set to slot 12's grey | killed (achromat neutrals test) |
| N10 | merge: the Display badge drops liveScope |
killed |
| N11 | merge: clearPreset keeps the scope hooks |
killed |
All 14 are syntactically valid (node --check), and each anchor matched exactly once.
Not verified
- An iOS/Safari engine; only Chromium was run. A real native colour picker: the value is filled and
changedispatched, as in the PR's E2E. - The unmodified desktop E2E steps with their 8 s line wait, on hardware like CI's. Here they fail on master too, and CI ran them green on this head.
- The Go
cmd/serverperf budgets on an unloaded machine. Two of them fail on master here too; the 941 terrain budgets I did not rerun on master. The Go code is byte-identical to master. - E2E-level mutants. All my mutants were unit-level.
- Of the author's 28 + 8 mutants I reran O1, O3 and O5 (plus my own 11).
- Live/customizer E2E suites beyond the 15 listed.
- Whether achromatopsia users actually tell the 1.13–1.15 luminance steps apart on a real map. I computed luminance only.
Relates to #882
What
M2 of #882 (AGENTS.md rule 8): the Live "Color by scope" palette and the SCOPES legend window are now in the customizer. M1 (#919) shipped both as hardcoded defaults.
scope1–scope12,scopeNone,scopeUnknownandscopeOtherare inTHEME_CSS_MAP(→--scope-*) and inTHEME_COLOR_KEYS, so they take part in preset detection. Every theme preset has a light and a dark value for each key. Theme → Live scope colours (15 rows) edits the palette for the current mode, like the other Live colour groups.cb-presets.jshas ascopePalettewith a light and a dark list. It sets--mc-scope-{light|dark}-*, andstyle.cssreads it before the default:--scope-N: var(--mc-scope-<mode>-N, <M1 default>). Default (Wong) has noscopePalette, so the stylesheet's M1 palette applies. Deut/prot, trit and achromat have tuned palettes. The achromat ramp is 14 even luminance steps: slots 1–12, then unknown and other. Each step is at least 1.13:1 from the next, and "no scope" sits below 3:1 on the tile, at least 1.79:1 from every slot.liveScopesection ofcs-theme-overrides. The rule lives inLiveScopeColor.SETTINGS; the customizer stores by it and Live reads it back. The legend title follows the setting ("SCOPES (last N min)"). The cap of 64 stays fixed because it bounds memory; the M0 plan only exposes window and rows.Plan and choices (no separate plan was posted; recorded here)
_applyScopeCSStherefore sets--scope-Ninline only when the value differs from the stylesheet default for the mode; otherwise it removes it. This also makes a cleared pick take effect without a reload. The trade-off: picking exactly the default colour while a colourblind preset is active shows the preset's colour.createElement/textContent. The new Display section is built withcreateElementand mounted before_bindEvents. The colour rows reuse the existing_renderColorRow, which has static labels only, so all colour rows behave the same.var(--scope-*)) and every new line.THEME_COLOR_KEYS, as Live: colour packet lines by scope #882 asks, so a theme preset defines them. As a result, one scope colour pick means no theme preset is active any more: after Ocean and then a scope pick,detectActivePreset()returnsnull, and no preset button is highlighted. The other Live colour groups (moments, kiosk, follow) stay outside preset detection, because no preset defines them. This was a deliberate choice (review finding 6). It is not changed here.theme-changedreached Live, so a saved window was ignored.renderScopeLegendnow re-reads the two keys on every render (at most once a second, O(1)).No change at the defaults
--scope-*keeps its M1 value as the fallback. With no preset and no pick, the computed palette is identical (unit test pins all 15 × 2 values; the E2E checks the computed values on a fresh page and after picking Ocean).Perf
Map.get/set).configure()runs at most once a second, in the legend render, with two key lookups._applyScopeCSSruns once per pipeline run: 15 keys.Tests
test-882-m2-scope-customizer.js(29, intest-all.sh):SETTINGSkeys, defaults and bounds; the registry followingconfigure();setLiveScopeSetting: a default typed back clears the override; storage, import validation, export round trip, the Display badge;innerHTMLthrows);test-882-m2-scope-customizer-e2e.js(9, shard 1):test-live-scope-color.js: the style.css check now reads the default behind the colourblind hook.Customizer implications (rule 8)
Done here. Not exposed: the cap of 64 (a memory bound) and per-scope counts in the legend (optional in M0, not built).
🤖 Generated with Claude Code