Skip to content

feat(control-ui): add the Absolutely theme with self-hosted typography - #129885

Merged
steipete merged 6 commits into
mainfrom
steipete/neutral-skill-ui-c41900
Aug 26, 2026
Merged

steipete merged 6 commits into
mainfrom
steipete/neutral-skill-ui-c41900

Conversation

@steipete

@steipete steipete commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Control UI ships three built-in themes, all of them cool-toned and all of them typographically identical: every theme renders in whatever sans the operator's OS provides. The --font-body token nominally asks for Inter, but nothing self-hosts it, so in practice the UI is SF Pro on macOS and Segoe UI on Windows and there is no way to pick a different feel.

This adds a fourth theme, Absolutely — warm, paper-and-clay, with its own typography — for operators who want the console to read like a writing surface instead of a control panel.

Why This Change Was Made

The theme is terracotta clay on warm graphite in dark mode and burnt clay on ivory in light mode, and it is the first theme with typography of its own: Space Grotesk for chrome, Lora for chat prose.

Typography is deliberately theme-owned, not global. A new --font-chat token defaults to --font-body, so Claw, Knot, and Dash are byte-for-byte unchanged. The face declarations live in a static stylesheet that the theme applier links only while a theme that declares fonts is active, which means a default-theme load issues no font request at all — asserted directly in the new e2e test.

Both families are OFL-1.1 and vendored unmodified with their upstream license text, latin and latin-ext subsets only, 184 KB total. They are served from the gateway rather than a font CDN: this keeps font-src 'self' intact, avoids a third-party request on every page load, and works on an offline or LAN-only gateway. (The CSP already permits Google Fonts, so the CDN was available — self-hosting is a deliberate choice, not a workaround.)

Two defects surfaced while building this and are fixed here rather than left behind:

  • Theme cards overflowed their border on long labels. The card grid's 1fr label track floors at min-content, so a label longer than "Claw" pushed the trailing column past the card edge — measured at scrollWidth 173 against clientWidth 163, with the trailing element's right edge 10px outside the card. The track is now minmax(0, 1fr) with an ellipsis, which also covers imported tweakcn labels, verified with a 44-character label. The selected-state checkmark that made the overflow visible is removed: the accent border, tint, and ring already carry selection, and aria-pressed owns the semantics (the checkmark was aria-hidden). The active skin is strengthened to stay clearly ahead of hover now that it stands alone.
  • The first-paint bootstrap only knew claw|knot|dash. Any new theme flashed the default palette before the app corrected it. index.html now resolves the new theme and has a matching pre-paint background, with mount-fallback coverage for both modes and a matcher that no longer breaks when the theme map changes.

Non-goals: no existing theme changes appearance, and no global typography change.

User Impact

Operators get a fourth theme in Settings → Appearance, in both light and dark, with chat prose set in a reading serif while chrome, chips, tables, and code stay in the UI face. Selecting it is the only way to get the new fonts; every other theme loads exactly what it loads today.

Long theme names — including imported tweakcn themes — no longer spill outside their card.

Evidence

Palette and typography, captured from a real browser against the built bundle:

Chat — default Claw (unchanged, system sans):

claw-chat-dark

Chat — Absolutely (Space Grotesk chrome, Lora prose):

absolutely-chat-dark

Appearance panel, dark and light:

absolutely

absolutely-light

Accessibility. Every text-token-on-surface pairing is asserted at WCAG AA by the existing guardrails, which the new theme is now enumerated in (base-theme-contrast.node.test.ts, theme-contrast.test.ts, theme-muted-contrast.e2e.test.ts). Worst measured pair in a real browser: --muted on --bg-muted at 4.68:1 (dark) and 4.80:1 (light), both above the 4.5:1 floor. I confirmed the guardrail actually covers the new theme by temporarily dimming --muted and watching it fail with five named absolutely: violations.

New regression test (ui/src/e2e/theme-typography.e2e.test.ts, 2 tests): asserts the font stylesheet is linked, both families reach loaded, every /fonts/ response is 200, and the computed primary family is Space Grotesk for chrome and Lora for chat prose — and, for a default theme, that no link is injected and no font request is made at all.

Live gateway. An isolated gateway (own state dir, port 19317) serves /fonts/absolutely.css and the woff2 faces at HTTP 200.

Bundle budgets. Startup CSS stays within its 45 KiB ceiling, which is why the faces are a linked static asset rather than a bundled import — declaring them in the startup stylesheet pushed it over. Startup JS grows 198 B (theme wiring, appearance option, locale strings, font loader), which fits the existing ratchet tolerance, so no budget baseline moves in this PR and the fixed 350 KiB ceiling is untouched.

Tests and checks. ui/src/styles, ui/src/app, ui/src/pages/config (1,203 passed), src/config (3,511 passed), the two theme e2e suites, pnpm ui:i18n:verify clean with no baseline drift, check-changed clean, and a clean pnpm ui:build. Autoreview (Codex, gpt-5.6-sol, high) returned no findings.

Only en.ts carries new locale strings; the translation workflow owns the other locales post-merge.

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

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: L maintainer Maintainer-authored PR labels Aug 26, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Visual proof. Chat: default Claw (unchanged, system sans) vs Absolutely (Space Grotesk chrome, Lora prose). Appearance panel in both modes.

claw-chat-dark

absolutely-chat-dark

absolutely

absolutely-light

Adds the woff2 faces the Absolutely theme paints in, plus the stylesheet that
declares them. Both families are SIL Open Font License 1.1 and ship unmodified,
with their upstream license text beside the files as the license requires.

Latin and latin-ext subsets only, 184 KB total. Serving these from the gateway
rather than a font CDN keeps font-src 'self' intact, avoids a third-party
request on every load, and works on an offline or LAN-only gateway.

The stylesheet is a static asset rather than a bundled import: it is linked at
runtime only while a theme that declares faces is active, so it stays out of
the startup CSS budget and out of every other theme's load.
Adds a fourth built-in Control UI theme: terracotta clay on warm graphite in
dark mode, burnt clay on ivory in light mode, with its own typography — Space
Grotesk for chrome and Lora for chat prose.

Typography is theme-owned rather than global. A new --font-chat token defaults
to --font-body, so every other theme is byte-for-byte unchanged, and the face
declarations live in a static stylesheet that the theme applier links only
while a theme that declares fonts is active. Themes without declared faces
issue no font request at all.

The faces themselves are vendored in the preceding commit.

Also fixes two defects found while building it:
- Theme cards overflowed their border on long labels: the grid's 1fr label
  track floors at min-content, so a long name pushed the trailing column past
  the card edge. The track is now minmax(0, 1fr) with an ellipsis, which also
  covers imported tweakcn labels. The selected-state checkmark that made the
  overflow visible is gone; the accent border, tint, and ring already carry
  selection, and aria-pressed owns the semantics.
- index.html's first-paint bootstrap only knew claw/knot/dash, so any new theme
  flashed the default palette before the app corrected it. It now resolves the
  new theme and has a matching pre-paint background, with mount-fallback
  coverage for both modes.

Startup JS grows 198 B for the theme wiring, appearance option, locale
strings, and font loader, which fits the existing ratchet tolerance, so no
budget baseline moves. Startup CSS stays within its 45 KiB ceiling, which is
why the faces are a linked static asset rather than a bundled import.
@steipete
steipete force-pushed the steipete/neutral-skill-ui-c41900 branch from 7af5938 to 820978d Compare August 26, 2026 05:14
@steipete
steipete marked this pull request as ready for review August 26, 2026 05:21
The generated @font-face block kept its upstream single-line unicode-range
declarations, which oxfmt wraps. Repo-wide `pnpm format:check` is clean.
Reuses the chat-flow requireRecord/requireString helpers instead of asserting
the params shape, so runId is a real string rather than an unknown coerced by
String() (oxlint no-base-to-string).
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. 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: needs maintainer review before merge. Reviewed August 26, 2026, 3:41 AM ET / 07:41 UTC.

ClawSweeper review

What this changes

This PR adds an Absolutely Control UI theme with conditional self-hosted fonts, theme-card overflow handling, and startup-paint support.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open for maintainer product/merge review. The prior mounted-path finding is addressed on the PR head, and no new concrete patch defect was found; current-main blob hydration failed locally, so current-main equivalence could not be independently completed.

Priority: P3
Reviewed head: b5344d5c950ba72feb16e988729802b360891639
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch has focused browser coverage and resolves the prior base-path defect, with remaining review centered on product scope and exact-head CI.
Proof confidence 🌊 off-meta tidepool Not applicable: The PR context identifies a maintainer-associated author; supplied browser screenshots are useful supporting evidence, but the external-contributor proof gate does not apply.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The PR context identifies a maintainer-associated author; supplied browser screenshots are useful supporting evidence, but the external-contributor proof gate does not apply.
Evidence reviewed 6 items Conditional asset owner: The theme resolver selects a font stylesheet only for Absolutely, removes it for all other themes, and resolves the href through the existing Control UI public-asset path helper.
Caller and update path: Initial bootstrap and later preference refreshes both flow through applyThemePresentation, which invokes the stylesheet synchronizer after resolving the selected theme.
Mounted-path regression coverage: The browser test asserts the stylesheet link resolves under /openclaw and that the browser requests the mounted stylesheet; it also checks computed font families and that the default theme requests no font assets.
Findings None None.
Security None None.

Live Verification

Command: pnpm ui:build

Result: PASS (completed)

../dist/control-ui/assets/tcl-Ba8B3QEu.js                                             2.48 kB │ gzip:   1.32 kB │ map:     6.50 kB
../dist/control-ui/assets/shell-B1oByMWF.js                                           2.56 kB │ gzip:   1.30 kB │ map:     7.94 kB
../dist/control-ui/assets/webidl-C2iEcUXH.js                                          2.62 kB │ gzip:   1.37 kB │ map:     7.72 kB
../dist/control-ui/assets/puppet-vmUf8xpM.js                                          2.65 kB │ gzip:   1.29 kB │ map:     8.99 kB
../dist/control-ui/assets/pig-Bt8Qvkze.js                                             2.65 kB │ gzip:   1.49 kB │ map:     6.60 kB
../dist/control-ui/assets/forth-CEw5LND1.js                                           2.67 kB │ gzip:   1.42 kB │ map:     6.18 kB
../dist/control-ui/assets/dist-CglKcEOs.js                                            2.78 kB │ gzip:   1.60 kB │ map:     5.05 kB
../dist/control-ui/assets/input-dialog-DxSWWuV3.js                                    2.82 kB │ gzip:   1.18 kB │ map:     8.64 kB
../dist/control-ui/assets/velocity-F0QlomFP.js                                        2.84 kB │ gzip:   1.20 kB │ map:     8.42 kB
../dist/control-ui/assets/session-progress-B4sXz4PX.js                                2.87 kB │ gzip:   1.16 kB │ map:     6.18 kB
../dist/control-ui/assets/workboard-mini-B0dsk-5H.js                                  2.88 kB │ gzip:   1.13 kB │ map:     5.60 kB
../dist/control-ui/assets/tiddlywiki-DLHM8fNz.js                                      2.92 kB │ gzip:   1.18 kB │ map:    11.09 kB
../dist/control-ui/assets/modelica--0xTveIu.js                                        2.94 kB │ gzip:   1.38 kB │ map:     8.06 kB
../dist/control-ui/assets/oz-DTY2GRqL.js                                              3.03 kB │ gzip:   1.38 kB │ map:     9.47 kB
../dist/control-ui/assets/r-CadXD0eR.js                                               3.06 kB │ gzip:   1.45 kB │ map:     9.92 kB
../dist/control-ui/assets/workboard-card-DtajKffQ.js                                  3.12 kB │ gzip:   1.16 kB │ map:     5.94 kB
../dist/control-ui/assets/gateway-page-controller-9g0jgARt.js                         3.16 kB │ gzip:   1.04 kB │ map:    10.09 kB
../dist/control-ui/assets/stex-CveJubUk.js                                            3.22 kB │ gzip:   1.26 kB │ map:    11.27 kB
../dist/control-ui/assets/lua-yYK_8aRA.js                                             3.27 kB │ gzip:   1.51 kB │ map:     7.76 kB
../dist/control-ui/assets/cypher-CIhKfSWw.js                                          3.33 kB │ gzip:   1.60 kB │ map:     8.52 kB
../dist/control-ui/assets/tiki-CryU3a6e.js                                            3.35 kB │ gzip:   1.35 kB │ map:    12.41 kB
../dist/control-ui/assets/sparql-ChxjJbEr.js                                          3.47 kB │ gzip:   1.70 kB │ map:     9.50 kB
../dist/control-ui/assets/vhdl-DlYBPd1w.js                                            3.47 kB │ gzip:   1.61 kB │ map:     9.63 kB
../dist/control-ui/assets/catalog-target-DcHh1Fac.js                                  3.49 kB │ gzip:   1.42 kB │ map:    11.34 kB
../dist/control-ui/assets/dist-UiEpQGFe.js                                            3.54 kB │ gzip:   1.83 kB │ map:     6.94 kB
../dist/control-ui/assets/update-confirmation.runtime-kEhkNdTw.js                     3.54 kB │ gzip:   1.42 kB │ map:    11.07 kB
../dist/control-ui/assets/exec-approval-DUuzha14.js                                   3.57 kB │ gzip:   1.49 kB │ map:     9.94 kB
../dist/control-ui/assets/portaled-hovercard-DyIN9wuS.js                              3.58 kB │ gzip:   1.29 kB │ map:    10.73 kB
../dist/control-ui/assets/mscgen-Cfn4e7TB.js                                          3.64 kB │ gzip:   1.08 kB │ map:     9.69 kB
../dist/control-ui/assets/device-placement-C28vDSh7.js                                3.73 kB │ gzip:   1.61 kB │ map:    13.00 kB
../dist/control-ui/assets/app-sidebar-workboar
… output truncated …

Assertions:

  • PASS expect_output: built in

How this fits together

The Control UI reads synced appearance preferences and resolves them into browser theme tokens during startup and preference changes. The selected Absolutely theme additionally loads a Gateway-served stylesheet containing its local font faces.

flowchart LR
A[Synced appearance preference] --> B[Theme resolver]
B --> C[Startup and live theme application]
C --> D[Conditional font stylesheet]
D --> E[Gateway static font assets]
C --> F[Control UI chrome and chat]
E --> F
Loading

Decision needed

Question Recommendation
Should OpenClaw ship this fourth bundled, self-hosted-typography theme rather than keep the built-in theme set unchanged? Accept the bundled theme: Keep the bounded implementation in the existing Control UI theme system, with fonts loaded only when Absolutely is selected.

Why: This is a new core visual capability with vendored assets and a synchronized preference value; correctness does not establish whether that product scope is desired.

Before merge

  • Resolve merge risk (P1) - Selecting the new persisted ui.prefs.theme value is additive for upgrades, but an older reader after a downgrade may not accept that value.
  • Resolve merge risk (P1) - A full current-main comparison needs a hydrated checkout; this is reviewer infrastructure uncertainty, not missing contributor proof.
Agent review details

Security

None.

PR surface

Source +531, Tests +216, Docs 0. Total +747 across 29 files.

View PR surface stats
Area Files Added Removed Net
Source 22 556 25 +531
Tests 6 219 3 +216
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 29 776 29 +747

Review metrics

Metric Value Why it matters
Implementation and test delta production +556/-25; tests +219/-3; static font binaries +184 KiB The feature adds a substantial but contained UI asset payload while keeping most executable coverage in browser and contrast tests.
Persisted preference enum 1 accepted value added to ui.prefs.theme The existing synchronized preference gains a new value, so upgrade and downgrade behavior matters before merge.

Stored data model

Persistent data-model change detected: serialized state: ui/src/e2e/theme-typography.e2e.test.ts, vector/embedding metadata: ui/public/fonts/lora-OFL.txt, vector/embedding metadata: ui/public/fonts/space-grotesk-OFL.txt. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Verify persisted-preference upgrade behavior (recommended)
    Before merge, confirm exact-head validation covers existing saved theme values and document that rolling back after selecting Absolutely is not a supported config shape.
  2. Accept the downgrade limitation
    Merge with the existing current-schema policy, accepting that an older reader may reject the newly selected preference after a rollback.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Confirm the additive ui.prefs.theme upgrade path and the intended downgrade behavior before merging.

Technical review

Best possible solution:

If maintainers endorse another bundled theme, retain the conditional local-font design and land after exact-head CI confirms the UI/config paths; do not add a parallel theme mechanism.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this is a feature PR; its browser behavior is covered by supplied visual evidence and focused browser tests rather than a reported failure reproduction.

Is this the best way to solve the issue?

Unclear on product scope: the implementation reuses the existing theme, preference, and public-asset owners, but maintainers must decide whether another bundled theme and its font payload belong in core.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is an optional Control UI appearance feature and minor visual cleanup, not an urgent workflow regression.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The PR context identifies a maintainer-associated author; supplied browser screenshots are useful supporting evidence, but the external-contributor proof gate does not apply.
  • remove P2: Current review triage priority is P3, so this older priority label is no longer current.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P3: This is an optional Control UI appearance feature and minor visual cleanup, not an urgent workflow regression.
  • merge-risk: 🚨 compatibility: The PR adds a persisted ui.prefs.theme value that older readers may not understand after a downgrade.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The PR context identifies a maintainer-associated author; supplied browser screenshots are useful supporting evidence, but the external-contributor proof gate does not apply.

Evidence

What I checked:

  • Conditional asset owner: The theme resolver selects a font stylesheet only for Absolutely, removes it for all other themes, and resolves the href through the existing Control UI public-asset path helper. (ui/src/app/theme.ts:77, b5344d5c950b)
  • Caller and update path: Initial bootstrap and later preference refreshes both flow through applyThemePresentation, which invokes the stylesheet synchronizer after resolving the selected theme. (ui/src/app/bootstrap.ts:77, b5344d5c950b)
  • Mounted-path regression coverage: The browser test asserts the stylesheet link resolves under /openclaw and that the browser requests the mounted stylesheet; it also checks computed font families and that the default theme requests no font assets. (ui/src/e2e/theme-typography.e2e.test.ts:99, b5344d5c950b)
  • Preference contract: The persisted ui.prefs.theme schema and Control UI preference parser both accept the new value, keeping the UI and Gateway config contract aligned. (src/config/zod-schema.root-shape.ts:220, b5344d5c950b)
  • Area provenance: Recent main history shows steipete maintained the Control UI resource-path contract and appearance settings before this PR. (ui/src/app/public-assets.ts:20, 0b715e3f5bfb)
  • Current-main inspection limitation: The PR head and its files were readable, but attempting to read current-main blobs required a promisor fetch and failed because github.com DNS was unavailable; this review cannot claim a completed current-main source comparison. (0dfd87ebe781)

Likely related people:

  • steipete: Current-main history attributes the Control UI resource-route and appearance work to this contributor, in addition to the reviewed branch. (role: recent Control UI contributor; confidence: high; commits: 0b715e3f5bfb, 8e6c34fba3db; files: ui/src/app/public-assets.ts, ui/src/app/theme.ts, ui/src/pages/config/view-appearance.ts)

Rank-up moves

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

  • Complete exact-head CI and re-run the current-main comparison from a checkout that can hydrate missing blobs.

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-26T06:24:05.744Z sha 90f5746 :: found issues before merge. :: [P2] Route theme fonts through the configured UI base path

The theme font stylesheet and its faces used root-absolute URLs, so a gateway
served under a configured Control UI base path (gateway.controlUi.basePath,
for example /openclaw) fetched them from the wrong origin path. Both requests
404ed there and Absolutely silently fell back to system fonts while its palette
still applied, which reads as "the theme looks a bit off" rather than as a
broken asset.

The link href now goes through inferControlUiPublicAssetPath, the same helper
plugin art and provider icons already use, and the stylesheet's own url()
references are relative to it, so both levels follow the mount without the
loader knowing the base path. Adds an e2e case under /openclaw asserting the
resolved href and that the browser fetches below the mount; it fails on the
previous code with the root-absolute path.

Reported by ClawSweeper review on #129885.
@steipete

Copy link
Copy Markdown
Contributor Author

Thanks — the base-path finding was correct and is fixed in 2a5cbab8b98.

Route theme fonts through the configured UI base path (P2) — done. Both levels were root-absolute. The link href now resolves through inferControlUiPublicAssetPath, the same helper plugin art and provider icons already use, and the stylesheet's own url() references are now relative to the stylesheet rather than to the origin root, so they follow the mount without the loader needing to know the base path.

Added a mounted-path E2E case (/openclaw) asserting both the resolved href and that the browser actually fetches below the mount. It fails on the previous code for the right reason:

AssertionError: expected '/fonts/absolutely.css' to be '/openclaw/fonts/absolutely.css'

Merge risk (P1) — resolved by the above. Non-root mounts now get the theme's typography rather than a silent fallback to system faces.

Stored data model — skipping, false positive. The report lists vector/embedding metadata: ui/public/fonts/lora-OFL.txt and space-grotesk-OFL.txt as a persistent data-model change needing migration proof. Those two files are the plain-text SIL Open Font License texts that OFL 1.1 requires be distributed alongside the font binaries. They are never read at runtime, carry no schema, and need no migration or upgrade compatibility proof. The serialized state: ui/src/e2e/theme-typography.e2e.test.ts entry is likewise the E2E test file, not a persisted store.

The one genuine persistence note is the one already flagged under review metrics: ui.prefs.theme gains absolutely as an accepted value. That is additive to a synced enum — older readers reject the unknown value and fall back to claw via the existing parseThemeSelection guard, and the first-paint bootstrap does the same, so no migration is required.

Gates re-run on the new head: full run-oxlint-shards exit 0, pnpm format:check clean, stylelint exit 0, pnpm ui:build with no budget violations, and the UI lanes green (10,405 + 52 + 3). Autoreview clean.

…d test

`bounds dedicated reads without timing out shared clients` asserted the mock
server received exactly two requests, but the read client aborts at 20ms and
the server records on arrival, so whether the aborted request lands first is a
race. It failed on a loaded CI runner with 1 received.

The bound is still asserted directly (read rejects, shared resolves); the count
now only requires the shared client's arrival, and checks its token so the
dedicated client is still proven not to have carried the call.

Unrelated to this PR's theme work; fixed here rather than left red.
@openclaw-barnacle openclaw-barnacle Bot added the channel: slack Channel integration: slack label Aug 26, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed P2 Normal backlog priority with limited blast radius. 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
@steipete
steipete merged commit 80ecc7c into main Aug 26, 2026
211 checks passed
@steipete
steipete deleted the steipete/neutral-skill-ui-c41900 branch August 26, 2026 08:06
@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
openclaw#129885)

* chore(control-ui): vendor Space Grotesk and Lora webfont subsets

Adds the woff2 faces the Absolutely theme paints in, plus the stylesheet that
declares them. Both families are SIL Open Font License 1.1 and ship unmodified,
with their upstream license text beside the files as the license requires.

Latin and latin-ext subsets only, 184 KB total. Serving these from the gateway
rather than a font CDN keeps font-src 'self' intact, avoids a third-party
request on every load, and works on an offline or LAN-only gateway.

The stylesheet is a static asset rather than a bundled import: it is linked at
runtime only while a theme that declares faces is active, so it stays out of
the startup CSS budget and out of every other theme's load.

* feat(control-ui): add the Absolutely theme with self-hosted typography

Adds a fourth built-in Control UI theme: terracotta clay on warm graphite in
dark mode, burnt clay on ivory in light mode, with its own typography — Space
Grotesk for chrome and Lora for chat prose.

Typography is theme-owned rather than global. A new --font-chat token defaults
to --font-body, so every other theme is byte-for-byte unchanged, and the face
declarations live in a static stylesheet that the theme applier links only
while a theme that declares fonts is active. Themes without declared faces
issue no font request at all.

The faces themselves are vendored in the preceding commit.

Also fixes two defects found while building it:
- Theme cards overflowed their border on long labels: the grid's 1fr label
  track floors at min-content, so a long name pushed the trailing column past
  the card edge. The track is now minmax(0, 1fr) with an ellipsis, which also
  covers imported tweakcn labels. The selected-state checkmark that made the
  overflow visible is gone; the accent border, tint, and ring already carry
  selection, and aria-pressed owns the semantics.
- index.html's first-paint bootstrap only knew claw/knot/dash, so any new theme
  flashed the default palette before the app corrected it. It now resolves the
  new theme and has a matching pre-paint background, with mount-fallback
  coverage for both modes.

Startup JS grows 198 B for the theme wiring, appearance option, locale
strings, and font loader, which fits the existing ratchet tolerance, so no
budget baseline moves. Startup CSS stays within its 45 KiB ceiling, which is
why the faces are a linked static asset rather than a bundled import.

* style(control-ui): format the vendored font stylesheet

The generated @font-face block kept its upstream single-line unicode-range
declarations, which oxfmt wraps. Repo-wide `pnpm format:check` is clean.

* test(control-ui): type the chat runId in the typography e2e

Reuses the chat-flow requireRecord/requireString helpers instead of asserting
the params shape, so runId is a real string rather than an unknown coerced by
String() (oxlint no-base-to-string).

* fix(control-ui): resolve theme fonts against the configured UI mount

The theme font stylesheet and its faces used root-absolute URLs, so a gateway
served under a configured Control UI base path (gateway.controlUi.basePath,
for example /openclaw) fetched them from the wrong origin path. Both requests
404ed there and Absolutely silently fell back to system fonts while its palette
still applied, which reads as "the theme looks a bit off" rather than as a
broken asset.

The link href now goes through inferControlUiPublicAssetPath, the same helper
plugin art and provider icons already use, and the stylesheet's own url()
references are relative to it, so both levels follow the mount without the
loader knowing the base path. Adds an e2e case under /openclaw asserting the
resolved href and that the browser fetches below the mount; it fails on the
previous code with the root-absolute path.

Reported by ClawSweeper review on openclaw#129885.

* test(slack): stop racing the aborted read request in the Web API bound test

`bounds dedicated reads without timing out shared clients` asserted the mock
server received exactly two requests, but the read client aborts at 20ms and
the server records on arrival, so whether the aborted request lands first is a
race. It failed on a loaded CI runner with 1 received.

The bound is still asserted directly (read rejects, shared resolves); the count
now only requires the shared client's arrival, and checks its token so the
dedicated client is still proven not to have carried the call.

Unrelated to this PR's theme work; fixed here rather than left red.
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 channel: slack Channel integration: slack docs Improvements or additions to documentation maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant