Repository navigation
feat(themes): follow the dashboard accent with the Gateway theme - #2296
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThe 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.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete 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 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherGatewayThemeCatalog 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]
Technical reviewBest 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
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Preflight sourceSource 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
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (3 earlier review cycles)Reviewed November 18, 2026, 6:50 PM ET / 23:50 UTC (Revision 4). |
9862a8b to
67f146f
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
67f146f to
1599f27
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
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.
1599f27 to
75208d6
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
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.accentin their Gateway profile. The Companion reads it withusers.prefs.get(operator.read) alongsidethemes.list, re-reads it onusers.prefs.changed, and paints it over the theme's accent tokens exactly as the Control UI'sapplyControlUiAccentdoes. 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
345fd28crebased onto main1af25869, andgit range-diffshows the same patch. Evidence and validation below name the heads they ran on; in this stack345fd28cis now1599f279,783b9ed7is now3f14cc1fand2e98953ais now3c4cacae.Rebased again onto main
30cfe593, which includes #2307 and #2308: this commit is now75208d62(was1599f279), andgit range-diffshows the same patch. Evidence below that names1599f279or 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 layerWhat 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
applyControlUiAccentsets--accent,--ring,--primaryand--accent-mutedto the color, derives the foregrounds from luminance (black above 0.179, else white), the hover from 82% color mixed with white, and--accent-subtleat 16%.ThemeAccent.Applymirrors it, so the derived surfaces (including the user bubble) follow.#rrggbbor"theme". The whole value must match, so a trailing newline is rejected rather than reaching the color parser.Evidence
GatewayThemeSettingsTests.FollowingTracksTheDashboardAccentLiveAndKeepsItWhenPreferencesAreUnknown(fixture Gateway proxy): the profile'sui.accentreplaces Manuscript's accent and its 16%--accent-subtlewhile the canvas stays the theme's; ano_durable_identityread 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#rrggbbform is ignored.GatewayThemeAccentTests(UI): accent visuals take the theme's accent ramp and return to the Windows accent.#3a9b9bat 16% over Manuscript's dark canvas#211E18gives a#25322Duser bubble, where Manuscript's own accent gives#2E2E30.GatewayThemeCatalogWireTests.FollowingCompanionTracksTheGatewaySelectionPushedByPrefsEvents(real authenticated fixture socket): the fixture'susers.prefs.getaccent reaches the followed theme afterusers.prefs.changed.GatewayThemeSettingsTests.SelectionIsPublishedBeforeSlowProfilePreferencesArrive: a stalledusers.prefs.getno 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-themesand its newaccentconsole command, Follow Gateway theme on and the fixture's selection Manuscript. Afteraccent #3a9b9bthe Companion saved"FollowedAccent":"#3a9b9b"and the user bubble took the teal accent; afteraccent themethe saved accent was removed and the bubble took Manuscript's own accent again:#3a9b9baccent themeUpgrade 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 top783b9ed7): 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 addedAppearanceblock. Capture after the upgrade and restart; the settings diff and full record are in #2301's description.Change Type
Scope
winnodeRequired 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
30cfe593(fix: match inline code chips to the chat theme #2307), on the new stack top601932d6, which contains this commit:./build.ps1succeeded;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.1af25869, on the new stack top3c4cacae, which contains this commit:./build.ps1succeeded;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.783b9ed7, which contains this commit:./build.ps1succeeded;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.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.ac745c6a, same guest, Windows light then dark:--filter "FullyQualifiedName~GatewayThemeBackdropTests": 5 passed, 0 failed in each mode.Real Behavior Proof
345fd28cfor the build, unit tests and the native accent run;016f6e1bfor the guest UI tests in both Windows modes.select manuscript,accent #3a9b9bandaccent themeinto the fixture Gateway's console.ChatUserBrushand the accent ramp live.#rrggbbaccent replaces the theme's accent tokens;"theme"and Follow off use the theme's own accent.Yes/No/N/A) Yesusers.prefs.get). The lower-precedenceui.seamColor(Control UI bootstrap over HTTP) isn't followed.Security Impact
Yes/No) NoYes/No) NoYes/No) YesYes/No) NoYes/No) NoYes, explain the risk and mitigation: one read-onlyusers.prefs.getover the existing authenticated operator connection, only while following and only with operator read. Onlyui.accent(and, in the next PR,ui.background) is used; other preferences are ignored. Nothing is written.Compatibility and Migration
Yes/No) YesYes/No) NoYes/No) Nousers.prefs.getor a profile keep the theme's accent.Review Conversations