Skip to content

fix(ui): propagate user accent to Talk Mode and widget frames - #128577

Merged
steipete merged 1 commit into
mainfrom
steipete/talk-user-accent
Aug 24, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/talk-user-accent

Conversation

@steipete

@steipete steipete commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

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:

  1. Native Talk Mode: talk.config forwarded only the operator ui.seamColor, so a user-selected ui.prefs.accent was ignored by the native voice overlay — silently diverging from every other surface.
  2. Widget iframes: the widget-theme observer watched only data-theme/data-theme-mode attribute mutations. Accent overrides land as inline style mutations 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 → operator ui.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

  • The native Talk overlay now uses the user's chosen accent when set, falling back to the operator seam color as before.
  • Embedded widget iframes now receive theme token updates explicitly whenever the accent changes, instead of relying on incidental attribute re-sets.

Evidence

  • Regression test talk.config prefers the user accent over the operator seam color — proven to FAIL on pre-fix code, passes after; full src/gateway/server-methods/talk.test.ts suite green.
  • Widget-theme unit test extended: observer options assert the style filter 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.
  • Codex autoreview: clean pass (0.99), no actionable findings.
  • Proof gap, stated: no live native Talk overlay capture — the change is a bounded deterministic config projection covered by the failing/passing regression test; the native app consumes the same talk.config payload key (seamColor) unchanged.
  • Production LOC: +7/−3 (two-line precedence change + one observer filter entry + comments); tests +34/−3.

UI-proof infeasibility (concrete)

Visual capture cannot discriminate this fix, so none is attached:

  • Widget frames: pre-fix code already refreshed frames incidentally — applyThemePresentation re-sets data-theme in the same theme.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 explicit style attributeFilter and the repost on a style-only mutation.
  • Native Talk Mode: the change is a server-side talk.config projection; the native overlay consumes the same seamColor payload 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.

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

clawsweeper Bot commented Aug 24, 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 app: web-ui App: web-ui gateway Gateway runtime size: XS maintainer Maintainer-authored PR labels Aug 24, 2026
@steipete
steipete marked this pull request as ready for review August 24, 2026 06:57
@clawsweeper clawsweeper Bot added 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. P2 Normal backlog priority with limited blast radius. labels Aug 24, 2026
@clawsweeper

clawsweeper Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 24, 2026, 3:03 AM ET / 07:03 UTC.

ClawSweeper review

What this changes

The 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 readiness

⚠️ Ready for maintainer review - 3 items remain

Keep 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
Reviewed head: bdf7e9160235a373f2d99221cf175dd63453e1ca

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is a well-scoped owner-boundary repair with direct regression coverage, pending the repository-required visual proof.
Proof confidence 🌊 off-meta tidepool Not applicable: Maintainer-authored PRs are outside the external-contributor proof gate, but repository policy still calls for sanitized real UI evidence before landing.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Maintainer-authored PRs are outside the external-contributor proof gate, but repository policy still calls for sanitized real UI evidence before landing.
Evidence reviewed 7 items Current-main gap: Current main projects only ui.seamColor in the Talk configuration response, so a valid ui.prefs.accent cannot reach the native Talk client.
Talk client boundary: The macOS client requests talk.config, reads ui.seamColor, and applies it to the Talk overlay state; the branch preserves that established payload key while fixing its source value.
Documented precedence: Current config help defines ui.prefs.accent as overriding ui.seamColor, matching the branch’s precedence expression.
Findings None None.
Security None None.

Live Verification

Command: pnpm ui:build

Result: FAIL (failed) — execution before step 1 run: live-proof package manager pnpm is unavailable after its official installer (curl -fsSL https://get.pnpm.io/install.sh | sh -): command failed without output

live-proof package manager pnpm is unavailable after its official installer (curl -fsSL https://get.pnpm.io/install.sh | sh -): command failed without output

Assertions:

  • FAIL expect_output: built in

How this fits together

The 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]
Loading

Before merge

  • Resolve merge risk (P1) - Repository policy requires real UI evidence for this visible repair; the PR body reports no native Talk or widget-frame capture.
  • Resolve merge risk (P1) - Production code is +6/−2; the +4 net is limited to two direct fixes and four invariant comments, so it should not grow further.
  • Complete next step (P2) - No repair dispatch: this is an active maintainer-owned PR with no actionable code finding; complete normal exact-head validation and visible proof.
Agent review details

Security

None.

PR surface

Source +4, Tests +27. Total +31 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 2 6 2 +4
Tests 2 28 1 +27
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 34 3 +31

Review metrics

Metric Value Why it matters
Production versus test LOC production +6/−2; tests +28/−1 The small positive production delta is confined to the two boundary fixes and explanatory invariant comments; regression coverage carries the remaining change.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the two owner-boundary changes, then add a sanitized after-fix macOS Talk capture and widget-frame update proof before landing.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

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

Labels

Label changes:

  • add P2: This is a bounded correction to existing Talk and widget presentation behavior without availability, security, or data-loss impact.
  • 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: Maintainer-authored PRs are outside the external-contributor proof gate, but repository policy still calls for sanitized real UI evidence before landing.

Label justifications:

  • P2: This is a bounded correction to existing Talk and widget presentation behavior without availability, security, or data-loss impact.
  • 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: Maintainer-authored PRs are outside the external-contributor proof gate, but repository policy still calls for sanitized real UI evidence before landing.

Evidence

What I checked:

Likely related people:

Rank-up moves

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

  • Attach a sanitized after-fix macOS Talk capture and a widget-frame theme-update capture, or state the concrete infeasibility in the PR body.

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.

@steipete
steipete merged commit 4dc083d into main Aug 24, 2026
321 checks passed
@steipete
steipete deleted the steipete/talk-user-accent branch August 24, 2026 07:16
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Aug 24, 2026
…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.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 25, 2026
…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.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 25, 2026
…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.
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 gateway Gateway runtime maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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