Skip to content

feat(themes): follow the dashboard accent with the Gateway theme - #2296

Merged
bkudiess merged 6 commits into
paulcam206-themes-05-radiusfrom
paulcam206-themes-06-accent
Nov 26, 2026
Merged

bkudiess merged 6 commits into
paulcam206-themes-05-radiusfrom
paulcam206-themes-06-accent

Conversation

@paulcam206

@paulcam206 paulcam206 commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

With Follow Gateway theme on, the Companion now also follows the person's own dashboard accent. That's the color picked in the dashboard's appearance settings, stored as ui.accent in their Gateway profile. The Companion reads it with users.prefs.get (operator.read) alongside themes.list, re-reads it on users.prefs.changed, and paints it over the theme's accent tokens exactly as the Control UI's applyControlUiAccent does. The user's chat bubble gets the same 16% accent wash the dashboard shows, which was the teal-versus-grey mismatch in the side-by-side comparison.

"theme" or an unset accent uses the theme's own accent. An unknown read (no durable profile, an older Gateway, a failed call) keeps the last followed accent, which is persisted so offline starts look the same. With Follow off, the theme's own accent applies. Nothing is written back to the Gateway.

This is part 6 of 11 in the Companion themes stack, opened as a native GitHub stack: each PR is based on the layer below it, so this diff is only this layer's commit, 75208d62 feat(themes): follow the dashboard accent with the Gateway theme. It depends on #2295 (corner radii).

This commit is 345fd28c rebased onto main 1af25869, and git range-diff shows the same patch. Evidence and validation below name the heads they ran on; in this stack 345fd28c is now 1599f279, 783b9ed7 is now 3f14cc1f and 2e98953a is now 3c4cacae.

Rebased again onto main 30cfe593, which includes #2307 and #2308: this commit is now 75208d62 (was 1599f279), and git range-diff shows the same patch. Evidence below that names 1599f279 or an earlier head ran on this same patch.

Themes architecture

Layer 6 of 11 in the Companion themes stack. This layer reads the person's dashboard accent (users.prefs.get, ui.accent) while following and overlays it on the theme's accent tokens the same way the dashboard does. The nodes this pull request adds are highlighted below. For the full write-up, with code links, see OpenClaw Windows Companion: theme architecture.

flowchart TD
  subgraph src["Sources"]
    GW["Gateway"]
    UI["Settings page"]
    WIN["Windows settings"]
    SYNC["Daily table sync"]
    TBL["Built-in table"]
    FNT["Bundled fonts"]
    ARTA["Artwork images"]
  end
  subgraph proc["Processing"]
    CAT["Theme catalog"]
    FOL["Follower"]
    RES["Palette resolver"]
    PRB["WebView2 probe"]
    CCH["Palette cache"]
    MOD["Theme model"]
    SET["Appearance setting"]
    SEL["Theme selection"]
    ACC["Accent overlay"]
  end
  subgraph app["Application"]
    APL["Theme applicator"]
    PRJ["WinUI brushes"]
    RAD["Corner radii"]
    BKP["Mica backdrop"]
    ART["Chat artwork"]
    BUB["Lobster bubble"]
    BRD["Branding"]
  end
  GW -->|catalog and prefs| CAT
  GW -->|Control UI CSS| RES
  SYNC -->|regenerates| TBL
  TBL -->|fallback| RES
  RES --> PRB
  PRB --> CCH
  CCH -->|reuse| RES
  CAT -->|built-in names| RES
  CAT -->|plugin themes| MOD
  CAT -->|dashboard choice| FOL
  FOL -->|followed values| SET
  UI -->|manual choice| SET
  MOD --> SEL
  RES -->|built-in palettes| SEL
  SET --> SEL
  SEL --> ACC
  ACC --> APL
  WIN --> APL
  WIN --> BKP
  FNT --> PRJ
  APL --> PRJ
  APL --> RAD
  APL --> BKP
  APL --> BRD
  APL --> ART
  ARTA --> ART
  BKP --> BUB
  classDef layer fill:#ffd866,stroke:#7a5200,stroke-width:3px,color:#000000
  class ACC layer
Loading

What Problem This Solves

Fixes: with Follow Gateway theme on, the Companion's accent and user bubble don't match the dashboard when the person has chosen their own accent there.

User Impact

User impact: someone following the Gateway theme sees their dashboard accent (buttons, focus, selection and the user bubble) in the Companion too, live.

Why This Change Was Made

  • Upstream applyControlUiAccent sets --accent, --ring, --primary and --accent-muted to the color, derives the foregrounds from luminance (black above 0.179, else white), the hover from 82% color mixed with white, and --accent-subtle at 16%. ThemeAccent.Apply mirrors it, so the derived surfaces (including the user bubble) follow.
  • The accent normalizer accepts exactly upstream's forms: #rrggbb or "theme". The whole value must match, so a trailing newline is rejected rather than reaching the color parser.
  • A read that can't tell (no durable identity, failure) must not flip the color back, so the last followed accent is kept and persisted.

Evidence

  • GatewayThemeSettingsTests.FollowingTracksTheDashboardAccentLiveAndKeepsItWhenPreferencesAreUnknown (fixture Gateway proxy): the profile's ui.accent replaces Manuscript's accent and its 16% --accent-subtle while the canvas stays the theme's; a no_durable_identity read keeps the followed accent; "theme" gives the theme's accent back; Follow off shows the manual choice with its own accent.
  • GatewayThemeTests.MalformedFollowedAccentKeepsTheThemeAccent: a persisted accent outside upstream's #rrggbb form is ignored.
  • GatewayThemeAccentTests (UI): accent visuals take the theme's accent ramp and return to the Windows accent.
  • For example, a followed accent of #3a9b9b at 16% over Manuscript's dark canvas #211E18 gives a #25322D user bubble, where Manuscript's own accent gives #2E2E30.
  • GatewayThemeCatalogWireTests.FollowingCompanionTracksTheGatewaySelectionPushedByPrefsEvents (real authenticated fixture socket): the fixture's users.prefs.get accent reaches the followed theme after users.prefs.changed.
  • GatewayThemeSettingsTests.SelectionIsPublishedBeforeSlowProfilePreferencesArrive: a stalled users.prefs.get no longer holds back the Gateway's selected theme; the accent arrives on its own.

Built and run at this PR's head (345fd28c) on a Windows 11 guest (Crabbox Hyper-V, build 29683) in light mode with the App theme Dark, OpenClaw.GatewayFixtureHost --scenario gateway-themes and its new accent console command, Follow Gateway theme on and the fixture's selection Manuscript. After accent #3a9b9b the Companion saved "FollowedAccent":"#3a9b9b" and the user bubble took the teal accent; after accent theme the saved accent was removed and the bubble took Manuscript's own accent again:

Manuscript's accent Dashboard accent #3a9b9b Settings while following the accent accent theme
Theme accent Followed accent Settings Accent back to the theme

Upgrade from the released Companion, run on a Windows 11 guest in light mode for the runtime-palette PR stacked on this one (#2301, at its earlier head 2e98953a, which contained this stack's previous top 783b9ed7): the latest stable Companion, v2026.11.3 (portable zip, SHA-256 verified against the release digest, the artifact CI's released-profile check uses), was paired to a real Gateway 2026.11.4 on an isolated profile, then that build opened the same profile. Notification settings, App theme Dark, the gateway record, device id and device token were preserved, with no new pairing request. Manuscript, picked in Settings, stayed applied in dark mode after a restart (canvas #211E18), and the only settings.json change was the added Appearance block. Capture after the upgrade and restart; the settings diff and full record are in #2301's description.

Change Type

  • Bug fix
  • Feature
  • Refactor
  • Docs or instructions
  • Tests or validation
  • Security hardening
  • Chore or infrastructure

Scope

  • Tray or WinUI UX
  • Windows node capability
  • Local MCP or winnode
  • Gateway, connection, or pairing
  • Setup or onboarding
  • Permissions, privacy, or security
  • Tests, CI, or docs

Required proof pools

  • windows-winui-interactive: the followed accent changes visible WinUI and chat surfaces; proven by the tests above and native UI tests on an interactive Windows guest.

Validation

  • After rebasing onto main 30cfe593 (fix: match inline code chips to the chat theme #2307), on the new stack top 601932d6, which contains this commit: ./build.ps1 succeeded; dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore: 6016 passed, 0 failed, 29 skipped (existing opt-in integration skips); dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore: 6807 passed, 0 failed; dotnet test ./tests/OpenClaw.Tray.UITests/OpenClaw.Tray.UITests.csproj -r win-x64 --filter "FullyQualifiedName~GatewayTheme|FullyQualifiedName~GatewayBuiltinThemeProbe|FullyQualifiedName~DesktopCompanionWindowTests.OpenBubble|FullyQualifiedName~ReactorMarkdownWebParity|FullyQualifiedName~ReactorToolActivityProofTests|FullyQualifiedName~WorkAlignment": 63 passed, 0 failed.
  • After rebasing onto main 1af25869, on the new stack top 3c4cacae, which contains this commit: ./build.ps1 succeeded; dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore: 6012 passed, 0 failed, 29 skipped (existing opt-in integration skips); dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore: 6801 passed, 0 failed; dotnet test ./tests/OpenClaw.Tray.UITests -r win-x64 --filter "FullyQualifiedName~GatewayTheme|FullyQualifiedName~GatewayBuiltinThemeProbe|FullyQualifiedName~DesktopCompanionWindowTests.OpenBubble|FullyQualifiedName~ReactorMarkdownWebParity" (developer machine, Windows dark mode): 33 passed, 0 failed.

On 345fd28c:

  • ./build.ps1: all builds succeeded.
  • dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore --filter "FullyQualifiedName~Theme|FullyQualifiedName~Appearance": 75 passed, 0 failed.
  • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore --filter "FullyQualifiedName~Theme|FullyQualifiedName~Settings|FullyQualifiedName~Appearance|FullyQualifiedName~DesktopCompanion|FullyQualifiedName~Chat": 2578 passed, 0 failed.
  • dotnet test ./tests/OpenClaw.Tray.UITests/OpenClaw.Tray.UITests.csproj -r win-x64 --filter "FullyQualifiedName~GatewayTheme" (developer machine, Windows dark mode): 21 passed, 0 failed.
  • Full suites on the stack top 783b9ed7, which contains this commit: ./build.ps1 succeeded; dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore: 5982 passed, 0 failed, 29 skipped (existing opt-in integration skips); dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore: 6791 passed, 0 failed.
  • Guest UI tests on the stack top 016f6e1b (Crabbox Hyper-V Windows 11 build 29683, interactive desktop, isolated tray profile, proof captures on), once with Windows in light mode and once in dark: dotnet test tests\OpenClaw.Tray.UITests -c Debug -r win-x64 --filter "Category!=Accessibility&...&(FullyQualifiedName~GatewayTheme|FullyQualifiedName~DesktopCompanionWindowTests|FullyQualifiedName~ChatThemeProofScope|FullyQualifiedName~SettingsPageInsetTests|FullyQualifiedName~ChatMarkdown)": 53 passed, 4 skipped (opt-in pointer tests), 1 failed in each mode. The failure, DesktopCompanionWindowTests.MascotScale_UpdatesLayoutAndHitRegionWithoutScalingOrReplacingPopup(chatOpen: True), needs a larger work area than the guest's 1024x720 at 200% scale.
  • On the stack top ac745c6a, same guest, Windows light then dark: --filter "FullyQualifiedName~GatewayThemeBackdropTests": 5 passed, 0 failed in each mode.

Real Behavior Proof

  • Environment tested: Windows 11 host (unit and wire tests) and a Crabbox Hyper-V guest (native UI tests), fixture Gateway.
  • PR head or commit tested: 345fd28c for the build, unit tests and the native accent run; 016f6e1b for the guest UI tests in both Windows modes.
  • Exact steps or command run: the Tray test filter above; guest UI tests (filter in Validation); a guest script turns Follow Gateway theme on through UI Automation and types select manuscript, accent #3a9b9b and accent theme into the fixture Gateway's console.
  • Evidence after fix: the accent tests pass; the followed accent reaches ChatUserBrush and the accent ramp live.
  • Observed result: a followed #rrggbb accent replaces the theme's accent tokens; "theme" and Follow off use the theme's own accent.
  • Screenshot or artifact links verified? (Yes/No/N/A) Yes
  • Not verified or blocked: a live Gateway with a real profile accent (proven against the fixture Gateway's users.prefs.get). The lower-precedence ui.seamColor (Control UI bootstrap over HTTP) isn't followed.

Security Impact

  • New permissions or capabilities? (Yes/No) No
  • Secrets or tokens handling changed? (Yes/No) No
  • New or changed network calls? (Yes/No) Yes
  • Command or tool execution surface changed? (Yes/No) No
  • Data access scope changed? (Yes/No) No
  • If any answer is Yes, explain the risk and mitigation: one read-only users.prefs.get over the existing authenticated operator connection, only while following and only with operator read. Only ui.accent (and, in the next PR, ui.background) is used; other preferences are ignored. Nothing is written.

Compatibility and Migration

  • Backward compatible? (Yes/No) Yes
  • Config or environment changes? (Yes/No) No
  • Migration needed? (Yes/No) No
  • If yes, list the exact upgrade steps: none. Gateways without users.prefs.get or a profile keep the theme's accent.

Review Conversations

  • I replied to or resolved every bot review conversation addressed by this PR.
  • I left unresolved only conversations that still need maintainer judgment.

@clawsweeper

clawsweeper Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@paulcam206
paulcam206 added this pull request to stack #2302 November 18, 2026 00:03
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: sufficient Contributor real behavior proof is sufficient. 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 clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 18, 2026
@clawsweeper

clawsweeper Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Codex review: needs maintainer review before merge.

What this changes

The Companion follows and remembers the dashboard’s personal accent when Follow Gateway theme is enabled.

Example: Follow Manuscript in dark mode with dashboard accent #3a9b9b.

  • Before: The user bubble uses Manuscript’s grey accent wash, #2E2E30.
  • After: The user bubble uses the dashboard’s teal accent wash, #25322D; choosing "theme" restores Manuscript’s accent.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, focused and demonstrated through the native app, with distinct persistence and socket coverage; production profile integration is supported by source rather than a live accent run.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected Windows Companion screenshots against the fixture Gateway show Manuscript’s bubble adopting #3a9b9b and reverting on "theme"; REST confirms the demonstrated patch matches this head, while a live Gateway profile accent remains explicitly unverified.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Following a dashboard theme leaves Companion buttons and user bubbles using the theme accent instead of the person’s selected dashboard accent.
Reason: The maintainer-authored direction completes the existing Follow behavior with a narrow, read-only extension and preserves manual appearance when Follow is off.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it adds useful accent following that current main lacks, has inspected native UI proof, and introduces no actionable defect found in this review.

Priority: P3
Reviewed head: 75208d628e59223310594070a792c9f05642420f

Before merge

None.

Findings

None.

Agent review details

How this fits together

GatewayThemeCatalog reads preferences over the existing authenticated operator connection; GatewayThemeFollower saves the followed accent, and AppearanceResolver overlays it before existing WinUI resource projection.

flowchart LR
  G[Gateway preferences] --> C[Theme catalog]
  C --> F[Theme follower]
  F --> S[Appearance settings]
  S --> R[Appearance resolver]
  R --> W[WinUI and chat brushes]
Loading

Technical review

Best possible solution:

Land the focused accent overlay through the existing theme stack while preserving manual choices, unknown-read fallback and offline appearance.

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

This is a feature addition; inspected screenshots demonstrate the declared accent scenario, and source confirms current main lacks the capability.

Is this the best way to solve the issue?

The change uses the existing catalog, follower and resolver, keeps unknown preferences distinct from an unset accent, and adds no competing owner or unnecessary production machinery.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against c38dbcc53e7d.

Provenance checked

  • Gateway catalog and followed appearance keeps the original intent (6ebe234: The preceding stack layer follows the dashboard selection while preserving a renderable offline snapshot and never writing Gateway preferences.)
  • Tolerant appearance persistence and resolution keeps the original intent (bbdefc6: Appearance settings load field by field so malformed optional theme data cannot discard unrelated settings.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Introduced scope Production +206/-13; tests and fixtures +142/-8; documentation +2/-2 Growth implements preference parsing, palette projection and independent preference publication, with distinct persistence, transport and fallback coverage.

Root-cause cluster

Relationship: canonical
Canonical: #2296
Summary: This PR carries the focused accent layer replacing the earlier unmerged submission.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is an optional appearance improvement with limited operational impact.
  • 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.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (3 earlier review cycles)
  • reviewed 2026-11-18T00:16:58.256Z sha 9862a8b :: needs maintainer review before merge. :: none
  • reviewed 2026-11-18T01:56:21.577Z sha 67f146f :: needs maintainer review before merge. :: none
  • reviewed 2026-11-18T03:20:39.890Z sha 1599f27 :: needs maintainer review before merge. :: none

Reviewed November 18, 2026, 6:50 PM ET / 23:50 UTC (Revision 4).

@paulcam206
paulcam206 force-pushed the paulcam206-themes-06-accent branch from 9862a8b to 67f146f Compare November 18, 2026 01:20
@paulcam206

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

🦞👀
Exact review queued.

Re-review progress:

@paulcam206
paulcam206 force-pushed the paulcam206-themes-06-accent branch from 67f146f to 1599f27 Compare November 18, 2026 02:51
@paulcam206

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

🦞👀
Exact review queued.

Re-review progress:

@paulcam206
paulcam206 marked this pull request as ready for review November 18, 2026 03:38
While following the Gateway theme, the Companion reads the person's
saved dashboard accent (users.prefs.get ui.accent, operator.read) with
themes.list and re-reads it on users.prefs.changed. A hex accent is
drawn over the theme's accent tokens exactly as the Control UI's
applyControlUiAccent does, so the user bubble takes the same 16% wash.
"theme" or unset uses the theme's own accent; an unknown read (no
durable profile, older Gateway, failure) keeps the last followed accent,
which is persisted for offline starts. Nothing is written back.
@paulcam206
paulcam206 force-pushed the paulcam206-themes-06-accent branch from 1599f27 to 75208d6 Compare November 18, 2026 22:56
@paulcam206

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

🦞👀
Exact review queued.

Re-review progress:

@bkudiess
bkudiess merged commit a972b45 into main Nov 26, 2026
32 checks passed
@bkudiess
bkudiess deleted the paulcam206-themes-06-accent branch November 26, 2026 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient Contributor real behavior proof is sufficient. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants