Repository navigation
fix(ui): muted theme text below WCAG AA contrast in webchat - #114586
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 28, 2026, 11:40 AM ET / 15:40 UTC. ClawSweeper reviewWhat this changesRaises muted-text color tokens in three Control UI themes and adds a Vitest contrast guardrail for text and surface CSS tokens. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 3 items remain This PR addresses a concrete accessibility regression with a narrowly scoped token update and a useful guardrail, but it still needs redacted after-fix evidence from the actual Control UI before merge. The available proof is focused test output rather than a real theme-picker run, so the item remains necessary until that visible user result is shown. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI loads selectable theme CSS variables and uses them to render webchat text, cards, panels, and backgrounds. This PR changes secondary-text tokens and adds a source-level test intended to prevent future contrast regressions before the UI is shipped. flowchart LR
A[Theme selector] --> B[Theme CSS variable blocks]
B --> C[Text and surface tokens]
C --> D[Webchat rendering]
B --> E[Contrast guardrail test]
E --> F[CI validation]
D --> G[Readable secondary text]
Before merge
Agent review detailsSecurityNone. PR surfaceSource 0, Tests +122. Total +122 across 2 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Mantis proof suggestionA redacted web UI chat proof would directly demonstrate the visible muted-text result that source-level contrast tests cannot establish. A maintainer can ask Mantis to capture proof by posting this exact PR comment: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Add a short redacted before/after screenshot set or recording from the running webchat theme picker covering the affected dark and sepia palettes, then merge if the visible result matches the token guardrail. Do we have a high-confidence way to reproduce the issue? Yes from source: the linked report supplies the affected theme tokens and WCAG contrast calculations, and the proposed guardrail exercises the same CSS-token mechanism. A running-browser reproduction was not established in the available review evidence. Is this the best way to solve the issue? Unclear: raising the affected tokens plus a regression guardrail is a maintainable repair shape, but the branch still needs real Control UI proof that the selected themes render the intended readable result. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against cbe19ed3be23. LabelsLabel 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)
|
e0909a7 to
629a954
Compare
Secondary text using --muted/--muted-foreground measured 3.1-3.5:1 on several bundled themes (issue openclaw#107299), below the 4.5:1 AA floor for normal text. Nudges the offending hex tokens and adds a vitest guardrail that parses base.css and asserts every text-on-surface token pairing in every theme block stays >= 4.5:1 so future palette edits can't regress this silently. Closes openclaw#107299
- Number.parseInt over global parseInt, ** over Math.pow, toSorted over sort - Guard regex capture groups and indexed access under noUncheckedIndexedAccess
629a954 to
5a7f58b
Compare
|
Merged via squash.
|
* origin/main: (128 commits) fix(codex): keep stressed inference turns isolated and observable (#115893) feat(skills): review interrupted deep turns in experience review (#115887) fix: reject malformed UTF-8 in proxy gateway error response bodies (#111852) fix(browser): stabilize atomic download staging (#115892) fix(google): cancel unread response body on video download error (#110045) refactor(ui): give Memory the shared hub header with hoisted agent scope (#115884) fix(test): stop asserting exact video deadline budgets (#115883) feat(gateway): expose MCP tool identity in effective tools (#115870) fix(skills): verify workshop migration without recovery refactor: replace context-engine retry proxy with declared params (#115872) fix: reject malformed UTF-8 in hosted official plugin catalog feed responses (#111768) fix(codex): harden app inventory invalidation and targeted publishes (#115866) fix(browser): uploads fail when the browser runs on a remote node (#115291) fix(scripts): keep format-docs output tails UTF-8 safe (#110825) fix(skills): recover complete apply transitions fix(macos): reap timed-out shell process groups (#115859) refactor(ollama): unify model inspection and setup (#115879) fix(ui): muted theme text below WCAG AA contrast in webchat (#114586) fix(test): restore isolated memory manager tests (#115880) fix(skills): revalidate rollback targets ...
…discovery * origin/main: (72 commits) fix(codex): keep stressed inference turns isolated and observable (#115893) feat(skills): review interrupted deep turns in experience review (#115887) fix: reject malformed UTF-8 in proxy gateway error response bodies (#111852) fix(browser): stabilize atomic download staging (#115892) fix(google): cancel unread response body on video download error (#110045) refactor(ui): give Memory the shared hub header with hoisted agent scope (#115884) fix(test): stop asserting exact video deadline budgets (#115883) feat(gateway): expose MCP tool identity in effective tools (#115870) fix(skills): verify workshop migration without recovery refactor: replace context-engine retry proxy with declared params (#115872) fix: reject malformed UTF-8 in hosted official plugin catalog feed responses (#111768) fix(codex): harden app inventory invalidation and targeted publishes (#115866) fix(browser): uploads fail when the browser runs on a remote node (#115291) fix(scripts): keep format-docs output tails UTF-8 safe (#110825) fix(skills): recover complete apply transitions fix(macos): reap timed-out shell process groups (#115859) refactor(ollama): unify model inspection and setup (#115879) fix(ui): muted theme text below WCAG AA contrast in webchat (#114586) fix(test): restore isolated memory manager tests (#115880) fix(skills): revalidate rollback targets ...
* origin/main: (95 commits) fix(codex): keep stressed inference turns isolated and observable (#115893) feat(skills): review interrupted deep turns in experience review (#115887) fix: reject malformed UTF-8 in proxy gateway error response bodies (#111852) fix(browser): stabilize atomic download staging (#115892) fix(google): cancel unread response body on video download error (#110045) refactor(ui): give Memory the shared hub header with hoisted agent scope (#115884) fix(test): stop asserting exact video deadline budgets (#115883) feat(gateway): expose MCP tool identity in effective tools (#115870) fix(skills): verify workshop migration without recovery refactor: replace context-engine retry proxy with declared params (#115872) fix: reject malformed UTF-8 in hosted official plugin catalog feed responses (#111768) fix(codex): harden app inventory invalidation and targeted publishes (#115866) fix(browser): uploads fail when the browser runs on a remote node (#115291) fix(scripts): keep format-docs output tails UTF-8 safe (#110825) fix(skills): recover complete apply transitions fix(macos): reap timed-out shell process groups (#115859) refactor(ollama): unify model inspection and setup (#115879) fix(ui): muted theme text below WCAG AA contrast in webchat (#114586) fix(test): restore isolated memory manager tests (#115880) fix(skills): revalidate rollback targets ...
…d-fingerprint * origin/main: (36 commits) fix(codex): keep stressed inference turns isolated and observable (#115893) feat(skills): review interrupted deep turns in experience review (#115887) fix: reject malformed UTF-8 in proxy gateway error response bodies (#111852) fix(browser): stabilize atomic download staging (#115892) fix(google): cancel unread response body on video download error (#110045) refactor(ui): give Memory the shared hub header with hoisted agent scope (#115884) fix(test): stop asserting exact video deadline budgets (#115883) feat(gateway): expose MCP tool identity in effective tools (#115870) fix(skills): verify workshop migration without recovery refactor: replace context-engine retry proxy with declared params (#115872) fix: reject malformed UTF-8 in hosted official plugin catalog feed responses (#111768) fix(codex): harden app inventory invalidation and targeted publishes (#115866) fix(browser): uploads fail when the browser runs on a remote node (#115291) fix(scripts): keep format-docs output tails UTF-8 safe (#110825) fix(skills): recover complete apply transitions fix(macos): reap timed-out shell process groups (#115859) refactor(ollama): unify model inspection and setup (#115879) fix(ui): muted theme text below WCAG AA contrast in webchat (#114586) fix(test): restore isolated memory manager tests (#115880) fix(skills): revalidate rollback targets ...
…ocess-probes * origin/main: (56 commits) fix(codex): keep stressed inference turns isolated and observable (#115893) feat(skills): review interrupted deep turns in experience review (#115887) fix: reject malformed UTF-8 in proxy gateway error response bodies (#111852) fix(browser): stabilize atomic download staging (#115892) fix(google): cancel unread response body on video download error (#110045) refactor(ui): give Memory the shared hub header with hoisted agent scope (#115884) fix(test): stop asserting exact video deadline budgets (#115883) feat(gateway): expose MCP tool identity in effective tools (#115870) fix(skills): verify workshop migration without recovery refactor: replace context-engine retry proxy with declared params (#115872) fix: reject malformed UTF-8 in hosted official plugin catalog feed responses (#111768) fix(codex): harden app inventory invalidation and targeted publishes (#115866) fix(browser): uploads fail when the browser runs on a remote node (#115291) fix(scripts): keep format-docs output tails UTF-8 safe (#110825) fix(skills): recover complete apply transitions fix(macos): reap timed-out shell process groups (#115859) refactor(ollama): unify model inspection and setup (#115879) fix(ui): muted theme text below WCAG AA contrast in webchat (#114586) fix(test): restore isolated memory manager tests (#115880) fix(skills): revalidate rollback targets ...
…#114586) * fix(ui): raise muted theme text tokens to WCAG AA contrast Secondary text using --muted/--muted-foreground measured 3.1-3.5:1 on several bundled themes (issue openclaw#107299), below the 4.5:1 AA floor for normal text. Nudges the offending hex tokens and adds a vitest guardrail that parses base.css and asserts every text-on-surface token pairing in every theme block stays >= 4.5:1 so future palette edits can't regress this silently. Closes openclaw#107299 * fix(ui): satisfy oxlint and noUncheckedIndexedAccess in contrast test - Number.parseInt over global parseInt, ** over Math.pow, toSorted over sort - Guard regex capture groups and indexed access under noUncheckedIndexedAccess * test(ui): cover rendered theme contrast in Chromium * test(ui): prove Skill Workshop mobile width in Chromium * test(ui): stabilize deferred history prepend anchors * test(ui): serialize rendered theme color diagnostics --------- Co-authored-by: Peter Steinberger <[email protected]>
Closes #107299
What Problem This Solves
Fixes an issue where users reading secondary/muted text in the webchat Control UI would see contrast as low as 3.1–3.5:1 on several bundled themes, below the WCAG AA floor of 4.5:1 for normal-size text — timestamps, captions, and helper text were hard to read, especially on the affected dark and sepia palettes.
Why This Change Was Made
Nudges the offending
--muted/--muted-strong/--muted-foregroundhex tokens in the three affected theme blocks just far enough to clear 4.5:1 against every surface token the theme defines, without altering the palettes' character. Also adds a vitest guardrail that mechanically parsesbase.cssand asserts every text-on-surface pairing in every theme block meets AA, so future palette edits can't silently regress readability (the original regression shipped unnoticed). Non-hex values (rgba tints, color-mix) are skipped by the guardrail since their contrast depends on a compositing surface; those remain audited in thebase.csscomments.User Impact
Muted/secondary text in the Control UI is now readable (≥ 4.5:1) across all bundled themes, and CI will fail any future theme edit that drops a text token below AA.
Evidence
New guardrail test passes on this branch and fails when the old token values are restored:
The test enumerates every
(:root / :root[data-theme(-mode)])block inbase.css, computes WCAG 2.1 relative-luminance ratios for all--text/--text-strong/--chat-text/--muted/--muted-strong/--muted-foreground×--bg/--bg-elevated/--bg-muted/--card/--panelpairings, and reports any pairing under 4.5:1 with theme, tokens, and measured ratio.Maintainer-verified real-browser evidence (2026-07-29)
The default-dark part of #107299 was independently fixed by #110195. This PR is not a duplicate: current
mainstill fails WCAG 2.1 AA foropenknot-light,dash, anddash-light; the contributor’s seven existing CSS-token changes fix those three remaining themes.Real Chromium on a Blacksmith Testbox exercised the actual Control UI Appearance route, clicked each genuine theme card, verified the outbound
config.patch, awaited the distinct acknowledged Gateway config revision, and rechecked both the visible active card and the real root theme after acknowledgement. It measured every 6×5 foreground/surface pair using browser-resolved CSS, and separately measured the actual visible muted description with browser-computed foreground, the entire ancestor background stack, and compounded opacity.darklightopenknotopenknot-lightdashdash-lightResult: 7/7 real Chromium scenarios pass: all six theme selections, all 180 token/surface combinations, all six real rendered muted descriptions above 4.5:1, and the real Skill Workshop Today route at a 390 px mobile viewport. A real full-page Chromium screenshot and machine-readable computed-contrast JSON were captured and downloaded for every theme. No DOM palette override or injected production stylesheet was used.
Additional focused proof on the same remote checkout: the original contrast regression, the adjacent theme-token contract, and the actual theme-resolution owner all pass (3 test files, 6 tests); touched CSS and TypeScript pass
oxfmt --check. Fresh extra-high-effort review verified the original contributor patch and the real-browser evidence; an initial concern about measuring opacity was fixed by asserting the actual alpha-composited rendered text.Inherited current-main CI repair
The exact-head hosted
checks-uirun exposed a separate regression introduced on currentmainby #115606: the real Skill Workshop Today-mode browser test measures a 390 px mobile container at 438 px. The canonical.sw-todayrule setswidth: 100%plus 24 px padding on each side, but omittedbox-sizing: border-box. The narrowly scoped inherited-main repair adds that single declaration inui/src/styles/skill-workshop.css; it keeps the content-box including its existing padding within 390 px and preserves every theme change. Credit: independently diagnosed and end-to-end verified by the Skill Workshop maintainer lane in #112987. This repair is included so the contributor PR does not merge onto known-red currentmain.Measured final mobile proof: real Gateway-loaded nonempty proposal, actual Today tab click, viewport/body 390 px, Today parent/element 382 px, computed
box-sizing: border-box, and bothscrollWidthandclientWidth382 px. Captured full-page Chromium screenshots and machine-readable evidence for all 7 scenarios. Final focused verification: 7/7 Chromium tests, 20/20 owner-source tests, four-file formatting, and cleangpt-5.6-solextra-high-effort whole-PR review.Inherited full-shard history-race repair
Exact-head hosted Chromium shard 2/4 independently exposed an existing
mainrace inui/src/e2e/claude-sessions.e2e.test.ts, unchanged by the original contributor: both history-prepend scenarios captured a virtualized message anchor before awaiting the Gateway request and loading spinner. The failing browser trace proves the anchor was already absent in the probe’s before sample (viewportTop: null), so every later viewport sample referred to a stale row rather than the actual prepend.The minimal test-only fix moves each of the two existing anchor captures immediately after its loading/request waits and immediately before its existing prepend probe. It preserves every original assertion, wait, Gateway contract, helper, and production behavior; 2 lines relocated, zero runtime changes. This same-file sibling repair prevents landing onto the independently proven inherited red full-shard gate.
Final exact-workflow remote proof on Blacksmith Testbox
tbx_01kypna6hp9gactxtcbt92k2yc:node scripts/ensure-playwright-chromium.mjsandnode scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner --shard 2/4: 27/27 real Chromium test files, 80/80 tests, including both history-prepend scenarios and all browser-video flows.oxfmt --check.gpt-5.6-solextra-high-effort structured review with no accepted or actionable findings.Final current-main full-shard proof
The contributor’s branch was refreshed onto current
mainthrough GitHub’s expected-head-guarded update while preserving@synthalorian, the original branch, both merge parents, and exactly five changed files. This picks up the already-landed canonical Appearance settings route instead of copying unrelated sidebar or settings work into this PR.Fresh Blacksmith Testbox
tbx_01kypqnyajry4785qkk0x0bmwbran the final current-main product tree and the one-line, typed-safe rendered-color diagnostic correction as one sequential, fail-fast command:pnpm lint --threads=8: pass, including full core, plugin, and script oxlint, Control UI i18n and style contracts.oxfmt --checkon all five changed files andgit diff --check: pass.gpt-5.6-sol --thinking xhighstructured autoreview: clean (0.94).exitCode=0; owned Testbox was stopped.The contrast test’s sole lint correction explicitly serializes the already-resolved color for its error message; it changes no production code, runtime behavior, assertions, helper contracts, or PR file scope.