Repository navigation
feat(themes): apply OpenClaw dashboard themes to the Companion - #2256
paulcam206 wants to merge 2 commits into
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: ready, awaiting a maintainer decision. What this changesAdds a persisted dashboard-theme picker that changes Companion colors and fonts while preserving Windows default and High Contrast. Example: Choose Manuscript with App theme Dark.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⏳ Ready, awaiting maintainer decision Keep open: dashboard themes are absent from main, this PR contains meaningful implementation, and the previous voice-text finding is fixed; the optional appearance feature still needs a maintainer direction decision. Priority: P3 Decision needed
Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherSettings stores the appearance selection, shared models resolve its palette, and the WinUI applicator updates resources consumed by windows, dialogs, and chat. flowchart LR
A[Settings picker] --> B[Settings persistence]
B --> C[Appearance resolver]
D[Bundled theme palettes] --> C
C --> E[WinUI resource applicator]
E --> F[Windows dialogs and chat]
Technical reviewBest possible solution: If approved, land the built-in theme picker through the existing settings owners and focused resource applicator while preserving Windows default, High Contrast, and stored preferences. Do we have a high-confidence way to reproduce the issue? Main's source confirms the stated limitation to Windows appearance modes; this is a feature request rather than a reproducible defect. Is this the best way to solve the issue? The palette projection and resource applicator address a missing responsibility while retaining existing persistence and window owners; native tests cover distinct restoration, typography, mode, and backdrop failures. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a0a2a24ec1dd. 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. LabelsLabel 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 (1 earlier review cycle)
Reviewed November 17, 2026, 1:55 AM ET / 06:55 UTC (Revision 2). |
Add the shared theme model the Companion's appearance will build on: CSS Color 4 parsing, resolved light and dark palettes in the Control UI's vocabulary (including the surfaces it derives in CSS: sidebar mix, shell, 78% composer fill and accent-subtle user bubble), the Gateway's themes.list/themes.get wire shapes and definition limits, plugin palette expansion, a 3:1 legibility floor, and a persisted, tolerant appearance setting. Built-in palettes come from a table generated by scripts/Update-GatewayThemeTable.ps1, which resolves the Control UI cascade in headless Edge at a pinned openclaw/openclaw ref (here the packaged Gateway 2026.11.1, 4ffdd204). Nothing applies a theme yet.
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.
31d2a2c to
0e7fd5a
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Superseded by # in native stack #2302. |
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 10 in the Companion themes stack. Each PR in the stack targets
mainand carries the commits below it, so review only this PR's own commit,0e7fd5ab feat(themes): apply OpenClaw dashboard themes to the Companion. It depends on #2255 (the shared theme model).What 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
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 (#2264 at
2e98953a, which contains this stack's 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 #2264'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
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