Repository navigation
feat(themes): apply OpenClaw dashboard themes to the Companion - #2292
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 changesAdds a Settings picker that applies dashboard theme colors and bundled fonts throughout Companion. Example: Select Manuscript in Settings with App theme Dark.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR adds a useful capability absent from main, and the reviewed diff has no definite introduced bug. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe native appearance layer turns the persisted theme selection and Windows display settings into shared WinUI brushes, fonts, and window backgrounds. flowchart TD
Settings[Settings picker] --> Saved[Appearance settings]
Saved --> Resolver[Shared theme resolver]
Windows[Windows display settings] --> Applicator[Theme applicator]
Resolver --> Applicator
Applicator --> Resources[WinUI brushes and fonts]
Resources --> Surfaces[Windows dialogs and chat]
Technical reviewBest possible solution: Land the shared-model prerequisite and this native application layer in stack order while preserving Windows defaults and High Contrast. Do we have a high-confidence way to reproduce the issue? This is an intentional feature: current main exposes Windows appearance choices but lacks dashboard theme selection. Is this the best way to solve the issue? The implementation coherently extends existing Settings, window, and chat owners with a dedicated resource applicator and preserves the prior Fluent fallback. 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:
Likely related people:
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 HistoryReviewed November 18, 2026, 6:46 PM ET / 23:46 UTC (Revision 3). |
285dc88 to
79b0cd1
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
General settings gains a Gateway theme picker with the built-in OpenClaw dashboard themes. AppThemeApplicator recolors the bound Fluent, App and chat brushes in the light and dark dictionaries from the theme's palette, including the surfaces the dashboard derives in CSS (sidebar mix, opaque shell, 78% composer, accent-subtle user bubble), and moves accent-driven visuals (navigation indicator, working claw, voice) onto the theme's accent ramp. The theme's typefaces are bundled (OFL, google/fonts) and reach all text through ContentControlThemeFontFamily and a re-declared type ramp. A themed window paints the theme's opaque canvas over its own backdrop, as the dashboard does, and clearing the theme restores every recolored brush. High Contrast dictionaries are never touched, so High Contrast always wins. A caught layout cycle now logs the active theme, focus and open popups.
79b0cd1 to
8c28942
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Co-authored-by: Copilot App <[email protected]>
- Resolve and save treat a malformed saved Definition as Windows instead of throwing. - Judge translucent light theme legibility over the canvas the window renders. - Follow the theme accent only for XAML brushes bound to an accent shade, never by color. - Keep an unlisted saved theme when the picker writes null. - Keep tool details, workspace files and notice names on the live code font. - Rebuild Fraunces with its named instances at WONK=0 so Windows selects Regular. Co-authored-by: Copilot App <[email protected]>
A projected framework brush that happened to equal a Windows accent shade (such as a success fill) was tracked as accent-bound by color, so clearing a theme after a Windows accent change painted it the new accent. Only the seven framework brushes WinAppSDK 2.6.5 binds to a SystemAccentColor shade now follow the Windows accent; every other recolored brush returns to its own color. Co-authored-by: Copilot App <[email protected]>
…tion Co-authored-by: Copilot App <[email protected]>
…tion Co-authored-by: Copilot App <[email protected]>
Settings › General gains a Gateway theme picker with the OpenClaw dashboard's built-in themes. Picking one recolors the Hub, chat, dialogs and flyouts with the theme's palette, swaps the UI, chat and code fonts for the theme's bundled typefaces, and moves accent-driven visuals (navigation indicator, working claw, voice) onto the theme's accent ramp. A themed window paints the theme's opaque canvas over its backdrop, as the dashboard does. Windows default keeps today's look, and Windows High Contrast always wins.
AppThemeApplicatorrecolors the bound Fluent, App and chat brushes in place in both light and dark dictionaries, so open windows switch live without a restart. That includes the surfaces the dashboard derives in CSS, so Manuscript's dark canvas, sidebar and composer render exactly the dashboard's#211E18,#211E18and#2C2920. Clearing the theme restores every recolored brush to each mode's own value. High Contrast dictionaries are never touched. The fonts are bundled under the OFL from google/fonts; Fraunces is instanced atSOFT=0 WONK=0to match the face the dashboard serves.This is part 2 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,
8c28942e feat(themes): apply OpenClaw dashboard themes to the Companion. It depends on #2291 (the shared theme model).This commit is
0e7fd5abrebased onto main1af25869, andgit range-diffshows the same patch plus one fix found in a screenshot review: under a Gateway theme, inline code chips take the theme'sInlineCodecolor for the chat's own mode (GatewayThemeRestoreTests.InlineCodeChipsTakeTheThemesInlineCodeInEachMode). Evidence and validation below name the heads they ran on; in this stack0e7fd5abis now79b0cd1e,783b9ed7is now3f14cc1fand2e98953ais now3c4cacae.Rebased again onto main
30cfe593, which includes #2307 and #2308: this commit is now8c28942e(was79b0cd1e). #2307 resolves the Fluent inline-code chip for the mounted chat's own mode, sogit range-diffshows this layer keeping that fallback and putting a Gateway theme'sInlineCodecolor first; the patch is otherwise the same. #2307'sInlineCodeChip_FollowsTheChatThemeRatherThanTheApplicationThemeand this layer'sGatewayThemeRestoreTests.InlineCodeChipsTakeTheThemesInlineCodeInEachModeboth pass on the new heads (see Validation). Evidence below that names79b0cd1eor an earlier head ran before this merge.Themes architecture
Layer 2 of 11 in the Companion themes stack. This layer applies the selected theme to WinUI: it projects the palette onto Fluent, App and chat brushes, recolors them in place so open windows switch live, and swaps in the theme's bundled fonts. 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 APL,PRJ,FNT layerWhat Problem This Solves
The Companion offers only Windows light and dark, so it looks unrelated to the OpenClaw dashboard people use beside it.
User Impact
User impact: people can give the Companion the same built-in theme as their OpenClaw dashboard from Settings. Nothing changes until they pick one, and High Contrast still replaces the theme's colors.
Why This Change Was Made
ButtonBackgroundandNavigationViewContentBackground, to the app mode's brushes. A read-only framework brush in the app's own mode is replaced once by a writable copy that later themes recolor.BackdropPolicy.ConfigureWindowThemekeeps them in the app's own mode, because they resolve some brushes in code from it, unless a one-palette theme pins a mode; that theme's only palette fills both modes, so code and theme lookups agree. It also re-resolves their styled text after a theme change.ContentControlThemeFontFamilyand a re-declared Fluent type ramp (WinUI hard-codes its own font in those styles). Chat Markdown records each element's prose or code role, so a theme that uses one font for both can't turn prose into code after a later switch.LayoutCycleExceptionnow logs the active theme, focused element and open popups, so a recurrence leaves evidence.Evidence
Inline code chips, rendered by the real chat timeline in the UI test host at the stack top
3c4cacae(developer machine, Windows dark mode, app Dark) and sampled from the captures. In a light CRT chat, the app's other mode, the chip kept the dark Fluent tint before this fix and vanished (#f6f6f5on the#f5f5f4canvas); it is now CRT's InlineCode#eaeaea. Dark chats take CRT#171717, Phosphor#18221aand Dash#302822, the dashboard's tokens. The before row withholds only the chip color this fix publishes.Windows 11 guest,
OpenClaw.GatewayFixtureHost --scenario chat-interactive, Companion built from this PR's earlier head31d2a2cd(the brush lookups changed since; the captures after this table are from the stack top), App theme Dark, driven by local MCPapp.navigateand UI Automation:Pixel samples from those captures against the dashboard (Edge, same theme, dark):
ee37371f#211E18#26241D#211E18#211E18#25221B#211E18#2C2920#3B372F#2C2920--accent-subtleover the canvas#434341#2E2E30(#8fa8e0at 12% over#211E18)The teal bubble in the dashboard screenshot came from that person's own accent preference, which the accent PR in this stack follows.
App theme opposite Windows' mode, Tide saved and the Companion restarted, on the stack top
016f6e1b(since then only dialog theming changed). Before the dictionary fix, a dark Hub on light Windows painted its Settings and chat background, combo boxes and notifications light:#EEF2F7(Tide light)#10151B(Tide dark)#EEF2F7(Tide light)A one-palette theme pins dialogs to its mode. Captured by
GatewayThemeBackdropTests.OpenDialogTakesAOnePaletteThemesPinnedModeWithItsOwnColorson the stack topac745c6awith a dark-only plugin theme: its dark card and readable text in both Windows modes (the test also asserts the card color and a 3:1 text contrast):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 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: theme application changes visible WinUI surfaces (Settings, chat, flyouts, dialogs, backdrop); proven with native UI tests and screenshots 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.8c28942eitself:./build.ps1succeeded; Shared tests with--filter "FullyQualifiedName~Theme|FullyQualifiedName~Appearance": 70 passed, 0 failed; Tray tests with--filter "FullyQualifiedName~Theme|FullyQualifiedName~Settings|FullyQualifiedName~Appearance|FullyQualifiedName~DesktopCompanion|FullyQualifiedName~Chat": 2566 passed, 0 failed; UI tests with--filter "FullyQualifiedName~GatewayTheme": 18 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.79b0cd1eitself:./build.ps1succeeded; Shared tests with--filter "FullyQualifiedName~Theme|FullyQualifiedName~Appearance": 70 passed, 0 failed; Tray tests with--filter "FullyQualifiedName~Theme|FullyQualifiedName~Settings|FullyQualifiedName~Appearance|FullyQualifiedName~DesktopCompanion|FullyQualifiedName~Chat": 2560 passed, 0 failed; UI tests with--filter "FullyQualifiedName~GatewayTheme": 18 passed, 0 failed. The new inline-code test fails without the fix (Light chat paints CRT's InlineCode chip: chip#80F9F9F9, expected#FFEAEAEA).On
0e7fd5ab:./build.ps1: all builds succeeded.dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore --filter "FullyQualifiedName~Theme|FullyQualifiedName~Appearance": 67 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": 2560 passed, 0 failed.dotnet test ./tests/OpenClaw.Tray.UITests/OpenClaw.Tray.UITests.csproj -r win-x64 --filter "FullyQualifiedName~GatewayTheme"(developer machine, Windows dark mode): 17 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
OpenClaw.GatewayFixtureHost --scenario chat-interactivelaunching the Companion Debug build with an isolated profile.0e7fd5abfor the build, unit tests and local UI tests with the app in each mode; earlier head31d2a2cdfor the first screenshots;016f6e1bfor the mode-mismatch captures and guest UI tests in both Windows modes.app.navigateand UI Automation: App theme Dark; Settings and chat under Windows default; Gateway theme Manuscript; Settings and chat; Windows High Contrast on (SPI_SETHIGHCONTRAST), chat; High Contrast off, chat. On the stack top016f6e1b, with Windows' app mode set to Light and then Dark: App theme set to the opposite mode, Gateway theme Tide, Settings and chat; the Companion restarted with Tide saved, Settings and chat; Manuscript; Settings and chat.Yes/No/N/A) YesSecurity Impact
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoYes, explain the risk and mitigation: N/ACompatibility and Migration
Yes/No) YesYes/No) NoYes/No) NoAppearancekeep Windows default. Light and dark follow the Windows/App theme setting, not the dashboard's mode preference; a one-mode theme pins its mode.Review Conversations