Repository navigation
fix(ui): restore WCAG AA contrast for muted webchat text (AI-assisted) - #110195
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 25, 2026, 1:05 AM ET / 05:05 UTC. ClawSweeper reviewWhat this changesRemoves opacity dimming from dark-theme Webchat timestamps and slash-command argument hints, documents the contrast invariant, and adds regression coverage for the affected CSS colors and opacity combinations. Merge readinessKeep this PR open for normal maintainer review. It makes a narrowly scoped accessibility repair, has focused regression coverage, and includes redacted after-fix Control UI screenshots; the only remaining review-state concern is that its clean branch is behind current Likely related people: the submitted patch is currently attributable to Priority: P2 Review scores
Verification
How this fits togetherThe Control UI renders grouped chat messages and slash-command suggestions from CSS theme tokens. These two muted-text selectors sit on dark chat backgrounds, so their final composited foreground color determines whether secondary UI text remains readable. flowchart LR
ThemeTokens[Dark theme tokens] --> ChatStyles[Chat and slash-menu styles]
ChatStyles --> OpacityDecision[Muted-text opacity]
OpacityDecision --> RenderedText[Rendered timestamp and argument hints]
RenderedText --> ContrastCheck[Contrast regression test]
ContrastCheck --> Webchat[Accessible Webchat UI]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +2, Tests +149. Total +151 across 4 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. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the selector-level fix and regression test, then land the current merge result once maintainers confirm it remains clean against current Do we have a high-confidence way to reproduce the issue? Unclear for a fresh live current-main run in this review, but the source path is concrete: the two selectors apply muted text with opacity on dark chat surfaces, and the PR documents the resulting composite contrast failure. Is this the best way to solve the issue? Yes. Removing opacity only from the failing selectors preserves the shared muted-token hierarchy while repairing the demonstrated rendered-text failure; it is narrower than globally brightening the token as the closed related PR proposed. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b82d8e56b643. 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 (6 earlier review cycles)
|
|
Thanks for the CI catch. Pushed Local verify: Note: |
|
CI fix landed in Dark-theme Control UI screenshot is still blocked in this environment (no local Control UI session for a redacted after-fix capture). @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Dark-theme Control UI proof for the muted contrast fix. Redacted after-fix screenshot (mock gateway Control UI e2e on this branch; no private paths or tokens): Computed styles in that capture:
PR Evidence section updated with the same artifact. @clawsweeper re-review |
|
Updated dark-theme Control UI proof (clearer crops). Combined frame (timestamp Timestamp crop: Slash-menu args crop: Computed styles (
Note: the message footer is hover-gated in normal UI; the combined frame forces that footer visible so both surfaces can appear in one shot. Measured selector colors/opacities are the real after-fix rules. PR Evidence section updated. Release: https://github.com/stantheman0128/openclaw/releases/tag/pr-110195-wcag-proof @clawsweeper re-review |
8a3c096 to
d0657a3
Compare
|
Addressed the ClawSweeper follow-ups on
Local checks after rebase: Existing screenshot proof still applies; no new capture needed for this cleanup. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
7c159e2 to
1d79e67
Compare
4a9aba6 to
5fe59e3
Compare
Dark theme --muted tokens already meet AA, but chat timestamps and slash-arg hints applied opacity that composited below 4.5:1. Drop the opacity dimming and add a token/composited contrast regression test. Co-authored-by: Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
Shorten the dark-theme --muted WCAG rationale to the repo inline-comment style while keeping the no-opacity-dimming invariant. Co-authored-by: Cursor <[email protected]>
5fe59e3 to
cf6b5a3
Compare
|
Quick status check: this PR is still open (not merged yet). Thanks @steipete for merging ClawSweeper still shows ready for maintainer look; all checks green on the latest run. Happy to rebase again on request. Stan Shih (@stantheman0128) |
|
Merged via squash.
|
openclaw#110195) * fix(ui): restore WCAG AA contrast for muted webchat text Dark theme --muted tokens already meet AA, but chat timestamps and slash-arg hints applied opacity that composited below 4.5:1. Drop the opacity dimming and add a token/composited contrast regression test. Co-authored-by: Cursor <[email protected]> * fix(ui): narrow theme contrast test types for strict TS Co-authored-by: Cursor <[email protected]> * fix(ui): condense muted contrast comment Shorten the dark-theme --muted WCAG rationale to the repo inline-comment style while keeping the no-opacity-dimming invariant. Co-authored-by: Cursor <[email protected]> * ci: retrigger after unrelated tui-backend.test timeout Co-authored-by: Cursor <[email protected]> --------- Co-authored-by: Cursor <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>




Closes #107299
What Problem This Solves
Fixes an issue where webchat users on the dark theme would see secondary text (message timestamps, slash-menu argument hints) that falls below WCAG AA contrast (4.5:1), even though the shared
--mutedtoken itself already meets AA on declared dark backgrounds.Why This Change Was Made
Prior closed PR #107562 brightened the shared dark
--mutedtokens globally. ClawSweeper correctly blocked that: at currentmain,#8b8b94/#898990already pass AA on--bg,--bg-elevated, and--bg-muted.The remaining HEAD failure is composited opacity on real chat selectors:
--bg.chat-group-timestampcolor: var(--muted); opacity: 0.7.slash-menu-argscolor: var(--muted); opacity: 0.65This PR removes that opacity dimming so muted text renders at the already-AA token color, documents the dark-theme AA floor in
base.css, and adds a regression test for token and composited pairings.AI-assisted contribution (Cursor/Grok). Human author: Stan Shih (stantheman0128).
User Impact
theme-contrast.test.ts.Evidence
Computed contrast (sRGB relative luminance) on current
maintokens--muted #8b8b94:Before (opacity composite on
--bg #0e1015):opacity: 0.7=> ~3.34:1 FAILopacity: 0.65=> ~3.04:1 FAILAfter (full-opacity
--muted):--bg #0e1015: 5.63:1 PASS--bg-elevated #191c24: 5.04:1 PASS--bg-muted #1f2330: 4.64:1 PASS--card #161920: 5.21:1 PASSFocused test:
CI follow-up (
8a3c09633c): narrowed luminance/CSS-var helpers with proper undefined guards sopnpm check:test-typespasses under strict indexed access. Local re-run: vitest 2/2 passed;pnpm check:test-typesexit 0.Dark-theme Control UI proof (after fix)
Redacted Control UI browser capture on this branch (mock gateway e2e session; no private paths or tokens). Combined frame forces the hover-gated message footer visible so timestamp and slash menu can appear together; measured colors/opacities are the real post-fix rules.
Crops:
Full Control UI frame:
Runtime computed styles from that capture (
data-theme-mode=dark,--muted #8b8b94on--bg #0e1015):.chat-group-timestamp:color: rgb(139, 139, 148);opacity: 1; label2m ago.slash-menu-args:color: rgb(139, 139, 148);opacity: 1; text<message>(from/redirect)Artifact release: https://github.com/stantheman0128/openclaw/releases/tag/pr-110195-wcag-proof
Related: closed unmerged #107562 (token brightening without current-main failing selector). This PR addresses the proven composited failure instead.