Repository navigation
fix(ui): propagate user accent to Talk Mode and widget frames - #128577
Conversation
talk.config forwarded only the operator ui.seamColor, so a user-selected ui.prefs.accent never reached the native Talk overlay; it now wins with the same precedence the Control UI applies (regression test fails pre-fix). The widget-theme observer now explicitly watches the <html> style attribute that carries the inline accent override instead of relying on incidental data-theme re-sets.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 24, 2026, 3:03 AM ET / 07:03 UTC. ClawSweeper reviewWhat this changesThe PR makes the saved user accent override reach the macOS Talk overlay and refreshes embedded widget frames when the Control UI updates its inline theme style. Merge readinessKeep open. Current main still omits the user accent at both projection boundaries; this focused repair appears correct, while repository policy calls for real UI evidence before landing. Likely related: steipete (high confidence). Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — execution before step 1 Assertions:
How this fits togetherThe gateway projects selected configuration into the macOS Talk client, which uses the returned accent for its native overlay. Separately, the Control UI writes accent tokens to the document element and posts computed tokens to embedded widget frames. flowchart LR
A[Saved user accent] --> C[Accent precedence]
B[Operator seam color] --> C
C --> D[Talk configuration response]
D --> E[macOS Talk overlay]
C --> F[HTML inline theme style]
F --> G[Widget theme observer]
G --> H[Embedded widget frames]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +4, Tests +27. Total +31 across 4 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the two owner-boundary changes, then add a sanitized after-fix macOS Talk capture and widget-frame update proof before landing. Do we have a high-confidence way to reproduce the issue? Yes for source reproduction: a saved ui.prefs.accent alongside ui.seamColor makes current main project the lower-priority seam color, while the widget observer excludes the inline style mutation. This was not executed in the read-only review. Is this the best way to solve the issue? Yes. Updating the two producers that project the already-documented precedence is cleaner than adding separate native-client or iframe-specific fallback rules. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 02b8ed7b022b. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
…ots and never live-updates the chat window (#128703) * fix(macos): honor user accent precedence in config snapshot and live-update chat window The Control UI user accent (ui.prefs.accent) landed in #128432/#128577 with precedence user accent -> operator ui.seamColor -> theme default, and the gateway's talk.config payload already applies it. The macOS app had two gaps: - ChannelsStore.applyUIConfig read raw ui.seamColor from the config.get snapshot and clobbered the user accent set from talk.config depending on arrival order. It now resolves ui.prefs.accent ?? ui.seamColor via a testable helper mirroring the gateway precedence. - The native chat window read AppStateStore.seamColorHex once at window construction, so accent changes never live-updated. MacChatSurface now reads the @observable store in body, deleting the one-shot userAccent plumbing. Docs: configuration-reference.md documents the precedence for native-app chrome. Regression test fails pre-fix (snapshot returned the operator seam color instead of the user accent). * fix(macos): refresh config from gateway config.changed events Addresses the review finding that no macOS consumer turned the gateway's hash-only config.changed broadcast into refreshed shared state, so a Control UI accent change never reached an open native chat window while the app ran. ChannelsStore now subscribes to gateway pushes and re-fetches config.get on config.changed, reconnect snapshots, and sequence gaps. The refresh applies non-force so an in-progress local settings draft wins (the gateway rejects stale-hash writes anyway). The in-flight reload queue gains a closed pending level (none/refresh/force) so a refresh arriving during a load is coalesced instead of dropped, and a requeued refresh cannot clobber a dirty draft the way the old boolean force-pending did.
…aw#128577) talk.config forwarded only the operator ui.seamColor, so a user-selected ui.prefs.accent never reached the native Talk overlay; it now wins with the same precedence the Control UI applies (regression test fails pre-fix). The widget-theme observer now explicitly watches the <html> style attribute that carries the inline accent override instead of relying on incidental data-theme re-sets.
…ots and never live-updates the chat window (openclaw#128703) * fix(macos): honor user accent precedence in config snapshot and live-update chat window The Control UI user accent (ui.prefs.accent) landed in openclaw#128432/openclaw#128577 with precedence user accent -> operator ui.seamColor -> theme default, and the gateway's talk.config payload already applies it. The macOS app had two gaps: - ChannelsStore.applyUIConfig read raw ui.seamColor from the config.get snapshot and clobbered the user accent set from talk.config depending on arrival order. It now resolves ui.prefs.accent ?? ui.seamColor via a testable helper mirroring the gateway precedence. - The native chat window read AppStateStore.seamColorHex once at window construction, so accent changes never live-updated. MacChatSurface now reads the @observable store in body, deleting the one-shot userAccent plumbing. Docs: configuration-reference.md documents the precedence for native-app chrome. Regression test fails pre-fix (snapshot returned the operator seam color instead of the user accent). * fix(macos): refresh config from gateway config.changed events Addresses the review finding that no macOS consumer turned the gateway's hash-only config.changed broadcast into refreshed shared state, so a Control UI accent change never reached an open native chat window while the app ran. ChannelsStore now subscribes to gateway pushes and re-fetches config.get on config.changed, reconnect snapshots, and sequence gaps. The refresh applies non-force so an in-progress local settings draft wins (the gateway rejects stale-hash writes anyway). The in-flight reload queue gains a closed pending level (none/refresh/force) so a refresh arriving during a load is coalesced instead of dropped, and a requeued refresh cannot clobber a dirty draft the way the old boolean force-pending did.
What Problem This Solves
Follow-up to #128432 (user-selectable accent color). An adaptivity audit of remaining surfaces found two places the user accent never reached:
talk.configforwarded only the operatorui.seamColor, so a user-selectedui.prefs.accentwas ignored by the native voice overlay — silently diverging from every other surface.data-theme/data-theme-modeattribute mutations. Accent overrides land as inlinestylemutations on<html>; frames were only refreshed incidentally because theme application happens to re-set the data attributes.Why This Change Was Made
The accent precedence (user
ui.prefs.accent→ operatorui.seamColor→ theme default) was confirmed as the product model in #128432; these two consumers must follow the same rule rather than each picking their own source.User Impact
Evidence
talk.config prefers the user accent over the operator seam color— proven to FAIL on pre-fix code, passes after; fullsrc/gateway/server-methods/talk.test.tssuite green.stylefilter and a style-attribute mutation reposts theme to widget frames only.pnpm check:changed,pnpm ui:build,ui/src/components/mcp-app-view.test.ts(adjacent bridge) all green locally.talk.configpayload key (seamColor) unchanged.UI-proof infeasibility (concrete)
Visual capture cannot discriminate this fix, so none is attached:
applyThemePresentationre-setsdata-themein the sametheme.refresh()publish that changes the accent, and attribute sets fire the observer even when values are unchanged. Before/after recordings are therefore pixel-identical; the fix removes the incidental coupling, and the discriminating evidence is the unit test asserting the explicitstyleattributeFilter and the repost on a style-only mutation.talk.configprojection; the native overlay consumes the sameseamColorpayload key unchanged, so a capture would prove the (untouched) native renderer, not this diff. The discriminating evidence is the regression test proven to FAIL on pre-fix code.