Files
meshcore-analyzer/public
Kpa-clawbot 074e3d6bed fix(#1438): write customizer override to body.style too (follow-up to #1439) (#1441)
## Summary

Follow-up to #1439. Empirical CDP verification on staging caught a
residual bug: the customizer per-role override updated
`documentElement.style` (where the override helper writes) but mounted
SVG markers and other CSS-var consumers kept showing the active preset
colour.

## Root cause

`cb-presets.js` ships stylesheet rules of the form:

```css
body[data-cb-preset="deut"] {
  --mc-role-companion: #648FFF;
  ...
}
```

This selector beats inheritance from `:root.style` (which is where
#1439's `setRoleColorOverride` wrote). Body inline style beats both.

## Fix

`setRoleColorOverride` now writes the override to BOTH
`documentElement.style` and `document.body.style`. The first-override
snapshot is captured per target so clear-override still restores the
active preset value (#1412 contract preserved).

## Verification

- `test-issue-1438-marker-css-vars.js` extended with assertion E2
(helper touches `document.body` / `body.style`)
- `test-issue-1412-customizer-no-override.js` — 13/13 still pass
(clear-override-restores-preset)
- `test-issue-1407-cb-preset-propagation.js` — 61/61 still pass
- Staging CDP verified: `applyPreset('deut')` +
`setRoleColorOverride('companion', '#ff00ff')` repaints all 55 mounted
companion markers to magenta without reload.

## Preflight

`bash ~/.openclaw/skills/pr-preflight/scripts/run-all.sh origin/master`
— clean.

Fixes the residual case left after #1439.

Co-authored-by: OpenClaw Bot <bot@openclaw>
2026-05-27 10:14:34 -07:00
..