Skip to content

feat(ui): user-selectable accent color for the Control UI - #128432

Merged
steipete merged 4 commits into
mainfrom
steipete/user-accents-theming-a9d814
Aug 24, 2026
Merged

steipete merged 4 commits into
mainfrom
steipete/user-accents-theming-a9d814

Conversation

@steipete

@steipete steipete commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Control UI's accent color was effectively hardcoded to each theme's signature (claw red #ff5c5c by default) with no user control. An operator-level override existed (ui.seamColor, shipped 2026.7.1) but was never surfaced in any UI, making it undiscoverable. Separately, several surfaces baked literal copies of accent/status colors — the embedded terminal hand-copied the claw palette (desyncing on Knot/Dash/custom themes), and status glows/tints carried stale rgba copies of old --danger/--info values that never adapted to theme families or light mode.

Why This Change Was Made

Users want to pick their own accent without editing gateway config. The existing token layer and seam-color apply path already do the heavy lifting, so this promotes accent to a first-class synced user preference and consolidates both inputs into one apply path, then fixes the accent/status-literal drift in the same invariant sweep.

User Impact

  • New Accent color section in Settings → Appearance: 9 curated preset swatches plus a native custom color input. The "Theme default" swatch previews the active theme's own accent even while an override is applied.
  • Persists as gateway-synced ui.prefs.accent (#rrggbb), following you across devices like theme/mode, with the standard provenance/reset affordances. Precedence: user pref → operator ui.seamColor → theme default.
  • The apply path now derives --accent-foreground/--primary-foreground from accent luminance, so light accents (mint, amber) get readable dark ink on primary controls — this also fixes the pre-existing seamColor path.
  • Embedded terminal background/cursor/foreground now resolve from live computed tokens (canvas-flattened for color-mix values), so terminals follow Knot/Dash/custom themes and user accents instead of always rendering the claw palette.
  • Status-dot glows, callout gradients, compaction-indicator borders, chips, and dreams pulse animations now derive from --ok/--warn/--warn-strong/--danger/--info via color-mix instead of stale literals, so they finally track theme family and light mode.
  • Docs updated: docs/web/control-ui.md Appearance section and ui/docs/design-system/color-tokens.md.

Evidence

  • Before: Appearance had no accent control at all (feature addition); terminals and status tints rendered claw-palette literals on every theme. After: screenshots below show mint applied across the UI with the default swatch still previewing the theme's own accent, and restore-to-default returning to claw red.
  • Gates (all green): pnpm ui:build, pnpm lint:ui:styles, pnpm ui:i18n:baseline/verify, pnpm tsgo:ui/tsgo:core/tsgo:test:ui, pnpm check:base-config-schema, pnpm check:bundled-channel-config-metadata, pnpm check:changed.
  • Tests: pnpm test ui/src/app (10,047 passed), pnpm test ui/src/styles (9,995), pnpm test ui/src/pages/config (10,064), plus a 326-test targeted regression run over the new prefs/presentation/terminal/config surfaces.
  • Real-browser proof: OPENCLAW_CAPTURE_UI_PROOF=1 pnpm test:ui:e2e — 13 Chromium tests covering startup application, gateway sync, preset selection, custom colors, luminance ink, theme switching, operator-default restore, and terminal computed-color verification.
  • Codex autoreview: two clean passes (feature bundle 0.98, cleanup bundle 0.99), no actionable findings.
  • Production LOC: +448/−159 net (+289, incl. docs +5/−1), justified by the new settings surface, pref plumbing, and luminance ink derivation; offset by the environment-presentation lazy split (−2.5 KB gzip startup JS). Tests: +369/−16.

Accent picker with mint applied; default swatch previews the theme default

Restored to theme default

Adds an Accent color section to Settings -> Appearance: curated preset
swatches plus a native custom color input. The choice persists as the
gateway-synced ui.prefs.accent (#rrggbb) and takes precedence over the
operator-level ui.seamColor, falling back to the active theme's accent
when cleared. The shared apply path now also derives readable
--accent-foreground/--primary-foreground ink from accent luminance, so
light accents keep dark text on primary controls.

Bundled accent-invariant cleanup: the embedded terminal resolves its
background/cursor/foreground from live computed tokens instead of a
hand-copied claw palette (fixes desync on knot/dash/custom themes),
a baked rgba(255,92,92) gradient now uses color-mix over --accent, and
duplicated diff-tint literals collapse into --danger-subtle/--ok-subtle.
Environment branding moved behind a lazy runtime module (-2.5KB gzip
startup JS).
Status-dot glows, callout gradients, compaction-indicator borders, chip
borders, and dreams pulse animations baked literal green/blue/amber/red
rgba values -- several stale copies of old --danger/--info hexes -- so
they ignored theme families and light mode's deeper status hues. All 22
sites now color-mix over --ok/--warn/--warn-strong/--danger/--info.
@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 docs Improvements or additions to documentation app: web-ui App: web-ui size: L maintainer Maintainer-authored PR labels Aug 24, 2026
@steipete
steipete marked this pull request as ready for review August 24, 2026 00:59
Reusing .settings-theme-card--<theme> on the accent swatch made theme-card
Playwright locators resolve to two elements (strict-mode violation in the
prefs-reconnect e2e suite). The default swatch now uses
.settings-accent-theme--<theme>, added alongside the theme-card selectors
in the theme-invariant chip var blocks.
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 24, 2026
@clawsweeper

clawsweeper Bot commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 23, 2026, 10:25 PM ET / August 24, 2026, 02:25 UTC.

ClawSweeper review

What this changes

Adds a gateway-synced Control UI accent preference, selectable in Appearance, and applies its tokens to interface controls and the embedded terminal.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

No blocking patch defect remains after rechecking the prior findings. This maintainer-authored, protected PR should remain open for normal human review rather than automated cleanup.

Priority: P3
Reviewed head: 3d08dfd732b367ced099ed1a242034ebe0c509ca

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch has strong described browser evidence and focused boundary tests; its persisted-config compatibility contract still merits normal human review.
Proof confidence 🦞 diamond lobster (5/6) Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body nevertheless includes before/after UI screenshots and reports browser E2E coverage.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body nevertheless includes before/after UI screenshots and reports browser E2E coverage.
Evidence reviewed 6 items Current main lacks this feature: Current main's strict ui.prefs schema has theme and themeMode but no accent field; the PR adds the optional validated accent key.
Canonical preference boundary: The branch adds accent to the central synced-preference descriptor, including normalization, write, and reset behavior.
Prior compatibility finding is intentionally resolved: The UI guide defines Control UI and Gateway as one coupled-version install with no compatibility path for older Gateway versions; the PR discussion records maintainer confirmation of the user-pref → operator-seam-color → theme-default precedence.
Findings None None.
Security None None.

Live Verification

Command: OPENCLAW_CAPTURE_UI_PROOF=1 pnpm test:ui:e2e

Result: FAIL (partial) — step 2 expect_output appearance-settings-defaults.e2e.test.ts: expected terminal output was not visible within 30 seconds: "appearance-settings-defaults.e2e.test.ts"

OPENCLAW_CAPTURE_UI_PROOF=1 pnpm test:ui:e2e
runner@runnervm76f27:/tmp/clawsweeper-live-proof-128432-6r9XAB/target$ OPENCLAW_CAPTURE_UI_PROOF=1 pnpm test:ui:e2e
$ node --import tsx scripts/ensure-playwright-chromium.mts && node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner
OPENCLAW_CAPTURE_UI_PROOF=1 pnpm test:ui:e2e
[ui-e2e] Using system Chromium at /usr/bin/chromium-browser.
Downloading FFmpeg (playwright ffmpeg v1011) from https://cdn.playwright.dev/dbazure/download/playwright/builds/ffmpeg/1011/ffmpeg-linux.zip
2.3 MiB [====================] 100% 0.0s
FFmpeg (playwright ffmpeg v1011) downloaded to /tmp/clawsweeper-live-proof-128432-6r9XAB/profile/cache/ms-playwright/ffmpeg-1011

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-128432-6r9XAB/target









































Assertions:

  • FAIL expect_output: appearance-settings-defaults.e2e.test.ts

How this fits together

The Control UI stores a local presentation mirror, synchronizes selected preferences through Gateway config, and refreshes CSS tokens when settings or server config change. Those tokens drive the visible interface and terminal color replies.

flowchart LR
A[Appearance settings] --> B[Local preference mirror]
B --> C[Gateway config patch]
C --> D[Server preference snapshot]
D --> E[Theme token application]
E --> F[Control UI controls]
E --> G[Embedded terminal]
G --> H[Terminal color replies]
Loading

Before merge

  • Resolve merge risk (P1) - This adds a persisted ui.prefs.accent key; rolling back to an older Gateway would reject that strict config shape. The Control UI guide explicitly treats UI/Gateway version skew as unsupported, and the PR discussion records maintainer acceptance of this contract.
  • Complete next step (P2) - No repair work is indicated; this protected maintainer PR needs ordinary human review rather than automated remediation.
Agent review details

Security

None.

PR surface

Source +296, Tests +388, Docs +4, Generated +1. Total +689 across 37 files.

View PR surface stats
Area Files Added Removed Net
Source 25 462 166 +296
Tests 9 404 16 +388
Docs 2 5 1 +4
Config 0 0 0 0
Generated 1 1 0 +1
Other 0 0 0 0
Total 37 872 183 +689

Review metrics

Metric Value Why it matters
Production versus test LOC production +448/-159; tests +369/-16 The reported production growth is tied to a new settings surface, synced preference path, and token application; the tests cover the affected configuration and browser behavior.
Persisted preference surface 1 optional config key added ui.prefs.accent is a new strict configuration field and therefore has upgrade compatibility significance.

Stored data model

Persistent data-model change detected: serialized state: ui/src/app/control-ui-environment-presentation.runtime.ts, serialized state: ui/src/app/server-prefs.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Land under the coupled-version contract (recommended)
    Accept the new optional persisted preference because the Control UI and Gateway intentionally ship as one versioned install.
  2. Avoid persisted config expansion
    Remove server synchronization and retain only a browser-local accent if maintainers no longer accept unsupported Gateway rollback behavior.

Technical review

Best possible solution:

Keep the single synced-preference and token-application flow, and land it only after normal maintainer review confirms the coupled-version configuration contract remains accepted.

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

Not applicable: this PR adds a new Appearance capability rather than repairing an existing defect. Its browser E2E coverage provides a concrete after-change exercise path.

Is this the best way to solve the issue?

Yes. It extends the existing synced ui.prefs owner boundary and centralizes accent-token application rather than introducing a parallel storage or theming flow.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 1ac7f0161c9e.

Labels

Label changes:

  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. This maintainer-authored PR is exempt from the external-contributor proof gate; its body nevertheless includes before/after UI screenshots and reports browser E2E coverage.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster 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: This maintainer-authored PR is exempt from the external-contributor proof gate; its body nevertheless includes before/after UI screenshots and reports browser E2E coverage.
  • 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 ergonomics feature rather than a regression or reliability incident.
  • merge-risk: 🚨 compatibility: The PR persists a new strict ui.prefs.accent configuration key, so an unsupported Gateway rollback can reject saved config.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body nevertheless includes before/after UI screenshots and reports browser E2E coverage.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. This maintainer-authored PR is exempt from the external-contributor proof gate; its body nevertheless includes before/after UI screenshots and reports browser E2E coverage.

Evidence

What I checked:

  • Current main lacks this feature: Current main's strict ui.prefs schema has theme and themeMode but no accent field; the PR adds the optional validated accent key. (src/config/zod-schema.root-shape.ts:232, 1ac7f0161c9e)
  • Canonical preference boundary: The branch adds accent to the central synced-preference descriptor, including normalization, write, and reset behavior. (ui/src/app/server-prefs-state.ts:51, 3d08dfd732b3)
  • Prior compatibility finding is intentionally resolved: The UI guide defines Control UI and Gateway as one coupled-version install with no compatibility path for older Gateway versions; the PR discussion records maintainer confirmation of the user-pref → operator-seam-color → theme-default precedence. (ui/AGENTS.md:39, 3d08dfd732b3)
  • Behavior-focused coverage: The browser E2E test exercises boot-time local preference application, Gateway synchronization, presets, custom colors, reset to operator default, and hover-token rendering; unit tests cover config validation and preference reset semantics. (ui/src/e2e/appearance-settings-defaults.e2e.test.ts:388, 3d08dfd732b3)
  • Preference-schema provenance: The existing strict ui.prefs owner boundary dates to Dallin Romney's commit 8a3afa8, while the new accent descriptor is attributed to Peter Steinberger on this branch. (src/config/zod-schema.root-shape.ts:225, 8a3afa8820b4)
  • Terminal-area history: Peter Steinberger has repeatedly maintained the embedded-terminal color path, including the earlier light-mode correction and palette-aware terminal work. (ui/src/components/terminal/terminal-theme.ts:77, dbea5a77f08f)

Likely related people:

  • Peter Steinberger: Introduced this branch's accent flow and has substantial prior history on the embedded-terminal color path. (role: recent area contributor; confidence: high; commits: 3d08dfd732b3, dbea5a77f08f, 1d22f1d34c48; files: ui/src/app/control-ui-presentation.ts, ui/src/components/terminal/terminal-theme.ts)
  • Dallin Romney: Blame identifies this person as the author of the strict ui.prefs schema boundary that the new field extends. (role: adjacent owner; confidence: high; commits: 8a3afa8820b4; files: src/config/zod-schema.root-shape.ts)

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 (2 earlier review cycles)
  • reviewed 2026-08-24T01:22:00.941Z sha cbf1d70 :: found issues before merge. :: [P2] Derive the dark primary hover token from the accent
  • reviewed 2026-08-24T02:14:40.571Z sha 3d08dfd :: found issues before merge. :: [P1] Keep saved accents from breaking an older Gateway | [P2] Composite translucent custom-theme tokens before terminal replies | [P2] Keep white text readable on dark-accent hover states

The accent apply path set --primary but not --primary-hover, so dark
Claw/Knot primary buttons reverted to the theme hover color while an
accent was active (ClawSweeper P2). Derive it from --primary like the
accent hover, clear it on reset, and prove the resolved hover color via
a painted probe in the appearance e2e.
@steipete

Copy link
Copy Markdown
Contributor Author

ClawSweeper findings addressed in 3d08dfd:

  • [P2] --primary-hover outside the accent path — fixed. The shared apply function now sets --primary-hover (color-mix(in srgb, var(--primary) 82%, white 18%)) alongside the accent family and clears it on reset. Unit coverage asserts set/clear; the appearance e2e resolves the hover token to concrete channels via a painted probe and asserts it tracks the selected accent (tolerance-based, since Chromium serializes mixed colors as color(srgb …) floats).
  • [P1] precedence decision — confirmed by maintainer: user ui.prefs.accent → operator ui.seamColor → theme default is the intended authority model. The operator seam color remains the fleet-wide default for users who have not chosen an accent; a user's explicit preference wins on their own account, and Restore default returns them to the operator value. This landing proceeds under explicit maintainer direction.
  • Rank-up moves: both applied (hover token derived/cleared; dark-theme hover coverage added).
  • Stored data model note: ui.prefs.accent is an additive optional key validated as #rrggbb; older readers ignore it and no migration is required. The flagged files are a lazy-boundary module split and tests, not serialized-state changes.
  • Live Verification harness note: the FAIL was the probe command itself — Vitest 4 has no --grep flag, so the runner filtered everything out and timed out waiting for output. The suite passes with a path filter locally and in the checks-ui-e2e CI lane on this head.

@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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 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 24, 2026
@steipete
steipete merged commit 8e6c34f into main Aug 24, 2026
245 checks passed
@steipete
steipete deleted the steipete/user-accents-theming-a9d814 branch August 24, 2026 03:32
@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 24, 2026
…28432)

* feat(ui): user-selectable accent color for the Control UI

Adds an Accent color section to Settings -> Appearance: curated preset
swatches plus a native custom color input. The choice persists as the
gateway-synced ui.prefs.accent (#rrggbb) and takes precedence over the
operator-level ui.seamColor, falling back to the active theme's accent
when cleared. The shared apply path now also derives readable
--accent-foreground/--primary-foreground ink from accent luminance, so
light accents keep dark text on primary controls.

Bundled accent-invariant cleanup: the embedded terminal resolves its
background/cursor/foreground from live computed tokens instead of a
hand-copied claw palette (fixes desync on knot/dash/custom themes),
a baked rgba(255,92,92) gradient now uses color-mix over --accent, and
duplicated diff-tint literals collapse into --danger-subtle/--ok-subtle.
Environment branding moved behind a lazy runtime module (-2.5KB gzip
startup JS).

* fix(ui): derive status glows and tints from semantic tokens

Status-dot glows, callout gradients, compaction-indicator borders, chip
borders, and dreams pulse animations baked literal green/blue/amber/red
rgba values -- several stale copies of old --danger/--info hexes -- so
they ignored theme families and light mode's deeper status hues. All 22
sites now color-mix over --ok/--warn/--warn-strong/--danger/--info.

* fix(ui): scope default accent swatch chip vars to a swatch class

Reusing .settings-theme-card--<theme> on the accent swatch made theme-card
Playwright locators resolve to two elements (strict-mode violation in the
prefs-reconnect e2e suite). The default swatch now uses
.settings-accent-theme--<theme>, added alongside the theme-card selectors
in the theme-invariant chip var blocks.

* fix(ui): carry --primary-hover through the accent override

The accent apply path set --primary but not --primary-hover, so dark
Claw/Knot primary buttons reverted to the theme hover color while an
accent was active (ClawSweeper P2). Derive it from --primary like the
accent hover, clear it on reset, and prove the resolved hover color via
a painted probe in the appearance e2e.
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
…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 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. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL 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