Repository navigation
feat(control-ui): add the Tide, Beacon, and Phosphor themes - #130232
Conversation
Adds the woff2 faces for the Beacon and Phosphor themes plus the stylesheets that declare them. Both families are SIL Open Font License 1.1 and ship unmodified with their upstream license text, as the license requires. Atkinson Hyperlegible Next was drawn by the Braille Institute for low vision: its letterforms disambiguate the pairs that blur first at low acuity (I/l/1, O/0, rn/m), which is why it belongs to the accessibility theme specifically. base.css has always named JetBrains Mono first in --mono, but nothing shipped it, so code blocks rendered in it only for people who happened to have it installed locally. Phosphor makes that deterministic. Latin and latin-ext subsets only, 195 KB. Served from the gateway rather than a font CDN so font-src 'self' holds, no third-party request happens on load, and an offline or LAN-only gateway still renders correctly. The url() references are relative to their stylesheet so they follow a configured Control UI mount.
Three built-in themes, each filling a gap the existing four share rather than adding a fifth variation on them. Every shipped accent today is warm — coral, crimson, chocolate, clay — and the only cool token anywhere is Claw's teal secondary. Tide is the cool one: steel cyan on deep slate, deep teal-blue on cool paper. It deliberately ships no webfonts, so it costs nothing beyond its tokens. Beacon is the accessibility one. It targets WCAG AAA (7:1) rather than the AA 4.5:1 floor the other themes hold, for low vision, direct sunlight, projectors, and poor panels, and sets everything in Atkinson Hyperlegible Next. Reaching AAA forced one deliberate break from the status-token convention: elsewhere each --x-subtle is --x at 8%, but a label on a tint of its own hue caps achievable contrast because the tint pulls the background toward the text. Beacon tints neutrally and lets the label carry the contrast. Its focus ring is opaque and 3px for the same reason — a translucent ring is the first thing to vanish on a bad panel. The contrast guardrail now enforces 7:1 for Beacon specifically, so a later palette edit cannot quietly demote it to an ordinary dark theme. Phosphor is the terminal one: phosphor green on green-cast black with the whole surface, chat prose included, in JetBrains Mono. Monospace prose is a character choice for an operator console, not a readability claim, which is why it is opt-in. Every palette was solved against the real guardrail before any CSS was written. Worst text pairing per theme: Tide 6.12:1 dark / 4.63:1 light, Beacon 10.29:1 / 9.72:1, Phosphor 6.69:1 / 4.76:1. Worst status label on its own tint: Beacon 7.05:1 / 7.02:1, the others above 4.6:1. Budgets: the startup CSS ceiling moves 45 -> 47 KiB and the JS ratchet baseline moves 523 B. Every built-in theme's tokens ship in the startup sheet, so each new theme costs ~0.5 KiB gzip whether or not anyone selects it. Moving per-theme palettes to lazily linked stylesheets (as theme webfonts already are) would take this back under the old ceiling, but it needs a first-paint story first: a late palette flashes default colors where a late font only swaps.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 26, 2026, 2:11 PM ET / 18:11 UTC. ClawSweeper reviewWhat this changesAdds Tide, Beacon, and Phosphor Control UI themes, including palette tokens, optional local fonts, config support, appearance choices, documentation, and browser/contrast coverage. Merge readinessKeep open: the prior Beacon dark-mode contrast finding is fixed, but Beacon light-mode confirmation hover still falls below its advertised AAA floor. The startup-CSS increase and vendored-font approval remain maintainer decisions. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — execution before step 1 Assertions:
How this fits togetherControl UI preferences select a theme through config validation and the Appearance panel; bootstrap resolves it before rendering and loads a local font stylesheet when needed. The palette affects first paint, settings previews, and chat controls. flowchart LR
A[Appearance preference] --> B[Config validation]
B --> C[Theme resolver]
C --> D[First-paint theme]
C --> E[Theme tokens]
E --> F[Optional local fonts]
D --> G[Control UI and chat]
F --> G
Decision needed
Why: The code can prove contrast behavior, but the universal payload cost and third-party asset admission are product and ownership choices. Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +967, Tests +146, Docs 0, Other +6. Total +1119 across 30 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Make the confirmation-button contrast resolver cover normal and hover paint for both Beacon modes, then obtain explicit owner approval for the font vendoring and startup CSS budget. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: Beacon light uses white confirmation text over inherited #dc2626 on hover, producing 4.83:1 rather than its 7:1 contract; no live run was executed in this read-only review. Is this the best way to solve the issue? No: the updated branch fixes Beacon dark confirmation paint but leaves the equivalent light-mode hover state outside the guardrail; resolve both interaction states from the live CSS before merge. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a5537c6e4a13. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
…tions The chat confirmation button paints from --danger under --media-foreground, a theme-invariant white, and each dark palette opts out of that pairing through a selector list in chat/grouped.css. Beacon defines a deliberately light --danger (#ffabab, chosen so status labels clear AAA) but was missing from that list, so its confirm button rendered white on pale pink at 1.80:1 — on the theme whose entire promise is contrast. Adds Beacon to the list, which routes it to --destructive over --destructive-foreground at 11.67:1. Also adds a guardrail for the bug class, since the selector list has to be extended by hand for every new dark theme and I have now missed it once. The test reads membership back out of grouped.css rather than restating it, resolves each theme's effective (background, color) pair, and holds it to that theme's floor. It reproduces this defect at 1.80:1 against the pre-fix stylesheet. Reported by ClawSweeper review on #130232.
|
Thanks — the Beacon finding was correct and is fixed in Use Beacon's destructive foreground in chat confirmation (P2) — done. Exactly as described: Beacon defines a deliberately light Doubly worth catching on the theme whose entire promise is contrast — thank you. Guardrail added for the bug class. That selector list has to be extended by hand for every new dark theme, and I'd already missed it once. Rather than fix only the instance, Startup-CSS budget increase — correctly flagged, and it is the maintainer's call. I am not self-approving it. The 45 KiB ceiling was maintainer-approved 2026-07; clean The follow-up that would reclaim it: move per-theme palettes to lazily linked stylesheets exactly as theme webfonts already are, which would put startup CSS below today's number since every user currently downloads all seven palettes. It needs a first-paint story first — a late palette flashes default colors, where a late font only swaps — so it is deliberately not in this PR. This PR stays open pending that budget decision. Gates re-run on the new head: |
|
Maintainer decision on the open item: the startup-CSS ceiling raise (45 → 47 KiB) is accepted, and this PR is cleared to land. For the record, the tradeoff being accepted: every built-in theme's tokens ship in the startup stylesheet regardless of selection, so three palettes move clean Reclaiming it stays a named follow-up: move per-theme palettes to lazily linked stylesheets, exactly as theme webfonts already are. That would put startup CSS below today's number, since every user currently downloads all seven palettes to use one. It needs a first-paint story first — a late palette flashes default colors, where a late font only swaps — so it is deliberately out of scope here. The P2 Beacon confirmation-contrast finding was fixed in |
|
Merged via squash.
|
…#130232) * chore(control-ui): vendor JetBrains Mono and Atkinson Hyperlegible Next Adds the woff2 faces for the Beacon and Phosphor themes plus the stylesheets that declare them. Both families are SIL Open Font License 1.1 and ship unmodified with their upstream license text, as the license requires. Atkinson Hyperlegible Next was drawn by the Braille Institute for low vision: its letterforms disambiguate the pairs that blur first at low acuity (I/l/1, O/0, rn/m), which is why it belongs to the accessibility theme specifically. base.css has always named JetBrains Mono first in --mono, but nothing shipped it, so code blocks rendered in it only for people who happened to have it installed locally. Phosphor makes that deterministic. Latin and latin-ext subsets only, 195 KB. Served from the gateway rather than a font CDN so font-src 'self' holds, no third-party request happens on load, and an offline or LAN-only gateway still renders correctly. The url() references are relative to their stylesheet so they follow a configured Control UI mount. * feat(control-ui): add the Tide, Beacon, and Phosphor themes Three built-in themes, each filling a gap the existing four share rather than adding a fifth variation on them. Every shipped accent today is warm — coral, crimson, chocolate, clay — and the only cool token anywhere is Claw's teal secondary. Tide is the cool one: steel cyan on deep slate, deep teal-blue on cool paper. It deliberately ships no webfonts, so it costs nothing beyond its tokens. Beacon is the accessibility one. It targets WCAG AAA (7:1) rather than the AA 4.5:1 floor the other themes hold, for low vision, direct sunlight, projectors, and poor panels, and sets everything in Atkinson Hyperlegible Next. Reaching AAA forced one deliberate break from the status-token convention: elsewhere each --x-subtle is --x at 8%, but a label on a tint of its own hue caps achievable contrast because the tint pulls the background toward the text. Beacon tints neutrally and lets the label carry the contrast. Its focus ring is opaque and 3px for the same reason — a translucent ring is the first thing to vanish on a bad panel. The contrast guardrail now enforces 7:1 for Beacon specifically, so a later palette edit cannot quietly demote it to an ordinary dark theme. Phosphor is the terminal one: phosphor green on green-cast black with the whole surface, chat prose included, in JetBrains Mono. Monospace prose is a character choice for an operator console, not a readability claim, which is why it is opt-in. Every palette was solved against the real guardrail before any CSS was written. Worst text pairing per theme: Tide 6.12:1 dark / 4.63:1 light, Beacon 10.29:1 / 9.72:1, Phosphor 6.69:1 / 4.76:1. Worst status label on its own tint: Beacon 7.05:1 / 7.02:1, the others above 4.6:1. Budgets: the startup CSS ceiling moves 45 -> 47 KiB and the JS ratchet baseline moves 523 B. Every built-in theme's tokens ship in the startup sheet, so each new theme costs ~0.5 KiB gzip whether or not anyone selects it. Moving per-theme palettes to lazily linked stylesheets (as theme webfonts already are) would take this back under the old ceiling, but it needs a first-paint story first: a late palette flashes default colors where a late font only swaps. * fix(control-ui): use Beacon's destructive foreground in chat confirmations The chat confirmation button paints from --danger under --media-foreground, a theme-invariant white, and each dark palette opts out of that pairing through a selector list in chat/grouped.css. Beacon defines a deliberately light --danger (#ffabab, chosen so status labels clear AAA) but was missing from that list, so its confirm button rendered white on pale pink at 1.80:1 — on the theme whose entire promise is contrast. Adds Beacon to the list, which routes it to --destructive over --destructive-foreground at 11.67:1. Also adds a guardrail for the bug class, since the selector list has to be extended by hand for every new dark theme and I have now missed it once. The test reads membership back out of grouped.css rather than restating it, resolves each theme's effective (background, color) pair, and holds it to that theme's floor. It reproduces this defect at 1.80:1 against the pre-fix stylesheet. Reported by ClawSweeper review on openclaw#130232.
What Problem This Solves
The four built-in Control UI themes are more alike than their names suggest. Every shipped accent is warm — Claw's coral
#ff5c5c, Knot's crimson#e5243b, Dash's chocolate#b47840, Absolutely's clay#d97757— and the only cool token anywhere inbase.cssis Claw's teal secondary. There is no cool palette, nothing for operators who need more contrast than the AA floor, and nothing that varies typography beyond Absolutely's serif prose.This adds three themes chosen to fill those gaps rather than to add a fifth variation on the existing ones.
Why This Change Was Made
Tide is the cool one: steel cyan on deep slate, deep teal-blue on cool paper. It deliberately ships no webfonts, so it costs nothing beyond its tokens.
Beacon is the accessibility one, and the reason to pick it is a promise: it targets WCAG AAA (7:1) rather than the AA 4.5:1 floor the other themes hold — for low vision, direct sunlight, projectors, and poor panels — and sets everything in Atkinson Hyperlegible Next, drawn by the Braille Institute specifically for low vision, with letterforms that disambiguate the pairs blurring first at low acuity (
I/l/1,O/0,rn/m).Reaching AAA forced one deliberate break from the status-token convention documented in
:root. Elsewhere each--x-subtleis--xat 8%, but a label sitting on a tint of its own hue caps achievable contrast, because the tint pulls the background toward the text — measured at 5.30:1 for--dangereven after the palette was otherwise AAA. Beacon tints neutrally and lets the label carry the contrast. Its focus ring is opaque and 3px for the same reason: a translucent ring is the first thing to disappear on a bad panel, which is exactly this theme's audience. The contrast guardrail now enforces 7:1 for Beacon specifically, so a later palette edit cannot quietly demote it to an ordinary dark theme.Phosphor is the terminal one: phosphor green on green-cast black, with the whole surface — chat prose included — in JetBrains Mono.
base.csshas always named JetBrains Mono first in--mono, but nothing shipped it, so code blocks rendered in it only for people who happened to have it installed locally; Phosphor makes that deterministic. Monospace prose is a character choice for an operator console, not a readability claim, which is why it is opt-in.Both families are OFL-1.1, vendored unmodified with their upstream license text, latin and latin-ext only (195 KB), and served from the gateway rather than a font CDN so
font-src 'self'holds and an offline or LAN-only gateway still renders correctly.User Impact
Seven built-in themes in Settings → Appearance, in light and dark. Operators who need contrast above the AA floor now have a theme that promises and enforces AAA. Nothing about the existing four changes: their tokens are untouched, and a theme that declares no faces still issues no font request at all.
Evidence
Captured from a real browser against the built bundle.
Tide — dark and light:
Beacon — dark and light, plus chat in Atkinson Hyperlegible Next:
Phosphor — dark and light, plus chat entirely in JetBrains Mono:
Contrast. Every palette was solved against the real guardrail before any CSS was written, then re-verified by the guardrails themselves and in-browser:
The AAA floor caught two things a hand-built palette would have shipped: Beacon's inherited diff-syntax ink (
--hljs-addition/--hljs-deletion) sat at 5.41:1 on its tints and needed its own values, and the status-tint problem described above.The new-theme E2E cases also caught a real bug during development — Beacon loaded its faces but never applied them, because the palette blocks were missing
--font-body. That is exactly the silent-fallback the suite exists to catch.Tests and checks.
ui/src/styles,ui/src/app,ui/src/pages/config(1,237 passed), config schema suites, both theme E2E suites (20 cases),pnpm ui:i18n:verifyclean, fullrun-oxlint-shardsexit 0,pnpm format:checkclean, stylelint exit 0, cleanpnpm ui:build. Autoreview clean.Budgets — please look at this one. The startup CSS ceiling moves 45 → 47 KiB and the JS ratchet baseline moves 523 B. Every built-in theme's tokens ship in the startup sheet, so each new theme costs ~0.5 KiB gzip whether or not anyone selects it; clean
mainmeasured 44.3 KiB and three palettes take it to 45.8 KiB. That 45 KiB ceiling was maintainer-approved in 2026-07, so this is a decision, not a mechanical bump.The follow-up that would reclaim it: move per-theme palettes to lazily linked stylesheets, exactly as theme webfonts already are, which would take startup CSS below today's number since every user currently downloads all seven palettes. It needs a first-paint story first — a late palette flashes default colors where a late font only swaps — so it is deliberately not in this PR.