Skip to content

feat(control-ui): add the Tide, Beacon, and Phosphor themes - #130232

Merged
steipete merged 3 commits into
mainfrom
steipete/control-ui-themes-tide-beacon-phosphor
Aug 26, 2026
Merged

steipete merged 3 commits into
mainfrom
steipete/control-ui-themes-tide-beacon-phosphor

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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 in base.css is 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-subtle is --x at 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 --danger even 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.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. 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:

tide

tide-light

Beacon — dark and light, plus chat in Atkinson Hyperlegible Next:

beacon

beacon-light

beacon-chat

Phosphor — dark and light, plus chat entirely in JetBrains Mono:

phosphor

phosphor-light

phosphor-chat

Contrast. Every palette was solved against the real guardrail before any CSS was written, then re-verified by the guardrails themselves and in-browser:

Theme Worst text pair (dark / light) Worst status label on its tint Floor
Tide 6.12:1 / 4.63:1 4.65:1 4.5 (AA)
Beacon 10.29:1 / 9.72:1 7.05:1 / 7.02:1 7.0 (AAA)
Phosphor 6.69:1 / 4.76:1 5.32:1 4.5 (AA)

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:verify clean, full run-oxlint-shards exit 0, pnpm format:check clean, stylelint exit 0, clean pnpm 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 main measured 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.

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.
@clawsweeper

clawsweeper Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete
steipete marked this pull request as ready for review August 26, 2026 16:53
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui scripts Repository scripts size: XL maintainer Maintainer-authored PR labels Aug 26, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 26, 2026
@clawsweeper

clawsweeper Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 26, 2026, 2:11 PM ET / 18:11 UTC.

ClawSweeper review

What this changes

Adds Tide, Beacon, and Phosphor Control UI themes, including palette tokens, optional local fonts, config support, appearance choices, documentation, and browser/contrast coverage.

Merge readiness

⚠️ Ready for maintainer review - 6 items remain

Keep 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
Reviewed head: 53d5553e68ec48d98d7572245b0eb30e9322ba2e
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The feature wiring and prior contrast repair are coherent, but the remaining AAA hover failure blocks merge and the budget/vendor choice needs ownership approval.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body nevertheless links browser screenshots and describes built-bundle checks.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body nevertheless links browser screenshots and describes built-bundle checks.
Evidence reviewed 7 items Current-main comparison: Current main still defines only the pre-existing theme names, so the requested feature is not already implemented.
Theme owner path: Bootstrap resolves the selected theme, applies root data attributes, and invokes the font-sheet loader; the branch adds Beacon and Phosphor to that mapping.
Configuration and UI coverage: The new names are accepted by the root schema and listed in Appearance, keeping stored preferences and the picker aligned.
Findings 1 actionable finding [P2] Preserve Beacon AAA contrast on confirmation hover
Security None None.

Live Verification

Command: pnpm exec vitest run ui/src/styles/base-theme-contrast.node.test.ts

Result: FAIL (failed) — execution before step 1 run: terminal command did not produce output or exit within 30 seconds: "pnpm exec vitest run ui/src/styles/base-theme-contrast.node.test.ts"

terminal command did not produce output or exit within 30 seconds: "pnpm exec vitest run ui/src/styles/base-theme-contrast.node.test.ts"

Captured output:



















































Assertions:

  • FAIL expect_output: Test Files

How this fits together

Control 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
Loading

Decision needed

Question Recommendation
After the Beacon light hover repair, should OpenClaw approve vendoring these two font families and raise the global startup CSS ceiling from 45 KiB to 47 KiB? Repair and approve the tradeoff: Fix the Beacon light hover path, add regression coverage, and accept the vendored fonts plus the 47 KiB startup CSS ceiling.

Why: The code can prove contrast behavior, but the universal payload cost and third-party asset admission are product and ownership choices.

Before merge

  • Preserve Beacon AAA contrast on confirmation hover (P2) - Beacon light keeps white confirmation text but falls back to the generic --danger-solid-hover fill (#dc2626) on hover, only 4.83:1. This violates the theme’s 7:1 promise; add an AAA-safe light hover path and make the contrast guard evaluate hover paint too.
  • Resolve merge risk (P1) - Beacon’s advertised AAA contrast is violated while hovering the destructive confirmation action in light mode.
  • Resolve merge risk (P1) - The 45 KiB to 47 KiB startup CSS increase affects every Control UI load, including users who never select these themes.
  • Resolve merge risk (P1) - Eight runtime-vendored font binaries require explicit owner approval under repository policy; upstream provenance could not be independently inspected because github.com DNS was unavailable.
  • Complete next step (P2) - A narrow CSS/test repair is clear, but the protected maintainer item also requires human approval of the startup budget and vendored font assets.

Findings

  • [P2] Preserve Beacon AAA contrast on confirmation hover — ui/src/styles/chat/grouped.css:1203
Agent review details

Security

None.

PR surface

Source +967, Tests +146, Docs 0, Other +6. Total +1119 across 30 files.

View PR surface stats
Area Files Added Removed Net
Source 22 977 10 +967
Tests 5 152 6 +146
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 9 3 +6
Total 30 1139 20 +1119

Review metrics

Metric Value Why it matters
Production versus test LOC production +800/-13; tests +152/-6; legal text +186; 8 static font assets The feature materially grows startup styling and adds vendored assets; the code growth is feature-motivated but requires the stated budget decision.
Startup CSS budget 45 KiB → 47 KiB Every built-in palette remains in startup CSS, making this a global load-cost change rather than an opt-in-only asset cost.

Stored data model

Persistent data-model change detected: vector/embedding metadata: ui/public/fonts/atkinson-hyperlegible-next-OFL.txt, vector/embedding metadata: ui/public/fonts/jetbrains-mono-OFL.txt. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Repair Beacon hover before merge (recommended)
    Use an AAA-safe Beacon-light hover fill and extend the existing paint guard to evaluate hover state before deciding on the budget and font assets.
  2. Pause the theme expansion
    Do not merge if owners do not accept the universal startup CSS and vendored-font tradeoff.

Technical review

Best 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:

  • [P2] Preserve Beacon AAA contrast on confirmation hover — ui/src/styles/chat/grouped.css:1203
    Beacon light keeps white confirmation text but falls back to the generic --danger-solid-hover fill (#dc2626) on hover, only 4.83:1. This violates the theme’s 7:1 promise; add an AAA-safe light hover path and make the contrast guard evaluate hover paint too.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against a5537c6e4a13.

Labels

Label changes:

  • add P2: The new accessibility theme has a concrete interactive state that violates its promised AAA contrast floor.
  • remove P3: Current review triage priority is P2, so this older priority label is no longer current.

Label justifications:

  • P2: The new accessibility theme has a concrete interactive state that violates its promised AAA contrast floor.
  • merge-risk: 🚨 other: The PR intentionally raises a global startup performance budget and vendors runtime font binaries, neither of which normal correctness checks decide.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body nevertheless links browser screenshots and describes built-bundle checks.

Evidence

What I checked:

Likely related people:

  • steipete: Authored the current PR head and prior Control UI boot-budget work in the relevant history. (role: recent Control UI and performance contributor; confidence: high; commits: 53d5553e68ec, 8fe2c1b83ca2, b3376cedca51; files: ui/src/app/theme.ts, ui/src/styles/chat/grouped.css, scripts/check-control-ui-performance.mts)
  • Vyctor H. Brzezowski: Introduced an earlier documented Control UI startup-budget decision in the same performance owner surface. (role: adjacent Control UI budget contributor; confidence: medium; commits: e7ba2e1f6b1f; files: scripts/check-control-ui-performance.mts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Fix and regression-test Beacon light confirmation hover at the 7:1 floor.
  • Obtain explicit approval for the runtime font vendoring and 45 KiB to 47 KiB startup CSS budget.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-26T17:23:18.198Z sha c53cbdd :: found issues before merge. :: [P2] Use Beacon’s destructive foreground in chat confirmation

…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.
@steipete

Copy link
Copy Markdown
Contributor Author

Thanks — the Beacon finding was correct and is fixed in 53d5553e68e.

Use Beacon's destructive foreground in chat confirmation (P2) — done. Exactly as described: Beacon defines a deliberately light --danger (#ffabab, chosen so status labels clear AAA against neutral tints) but was missing from the dark-theme selector list in chat/grouped.css, so its confirm button fell through to the base --danger / --media-foreground pairing and rendered white on pale pink. I measured the same 1.80:1 you did. Adding Beacon to the list routes it to --destructive over --destructive-foreground at 11.67:1.

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, base-theme-contrast.node.test.ts now reads list membership back out of grouped.css, resolves each theme's effective (background, color) pair, and holds it to that theme's floor (AAA for Beacon, AA elsewhere). Verified it reproduces this defect against the pre-fix stylesheet:

beacon: --media-foreground #ffffff on --danger #ffabab = 1.80:1 (< 7:1)

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 main measures 44.3 KiB and three palettes take it to 45.8 KiB, so this PR proposes 45 → 47 KiB. Every built-in theme's tokens ship in the startup sheet whether or not anyone selects that theme.

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: ui/src/styles + ui/src/app (958 passed), pnpm format:check clean, stylelint exit 0. Autoreview clean.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. and removed P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Aug 26, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

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 main from 44.3 KiB to 45.8 KiB gzip. The fixed 350 KiB JS ceiling is untouched; only the ratchet baseline moved (523 B).

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 53d5553e68e (1.80:1 → 11.67:1) with a guardrail that reads selector-list membership out of grouped.css, so the bug class cannot recur silently for the next dark theme. Exact-head CI is green.

@steipete
steipete merged commit 08a42a5 into main Aug 26, 2026
352 of 354 checks passed
@steipete
steipete deleted the steipete/control-ui-themes-tide-beacon-phosphor branch August 26, 2026 18:47
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 27, 2026
…#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation maintainer Maintainer-authored PR merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant