Skip to content

feat(themes): apply OpenClaw dashboard themes to the Companion - #2256

Closed
paulcam206 wants to merge 2 commits into
openclaw:mainfrom
paulcam206:paulcam206-themes-02-apply
Closed

paulcam206 wants to merge 2 commits into
openclaw:mainfrom
paulcam206:paulcam206-themes-02-apply

Conversation

@paulcam206

@paulcam206 paulcam206 commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

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.

AppThemeApplicator recolors 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, #211E18 and #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 at SOFT=0 WONK=0 to match the face the dashboard serves.

This is part 2 of 10 in the Companion themes stack. Each PR in the stack targets main and 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

  • Recoloring shared brushes in place, rather than swapping dictionaries, updates open windows, templates and running animations immediately and never touches High Contrast resources.
  • Each brush is captured under its own light/dark mode before it's recolored, so clearing a theme can't leave one mode showing the other's colors.
  • Framework brushes are recolored through the instances in WinUI's own theme dictionaries, looked up by key. WinUI's dictionary for the mode the app isn't running in (Windows decides the app mode; the App theme setting only themes windows) is never written: writing it before that mode renders binds every alias in it, such as ButtonBackground and NavigationViewContentBackground, 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.
  • Standalone dialogs (pairing and exec approval, consent, update) aren't reached by App's window refresh. BackdropPolicy.ConfigureWindowTheme keeps 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.
  • The window canvas is composited over black, the background the theme's text contrast is checked against, so a plugin or imported theme with transparent surfaces never shows the desktop through a themed window. Voice's status badge and transcript bubble take the theme's primary foreground on the voice accent.
  • The UI font reaches every text root through ContentControlThemeFontFamily and 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.
  • A caught LayoutCycleException now 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 head 31d2a2cd (the brush lookups changed since; the captures after this table are from the stack top), App theme Dark, driven by local MCP app.navigate and UI Automation:

Windows default, Settings Windows default, chat Manuscript, Settings Manuscript, chat
Windows default settings Windows default chat Manuscript settings Manuscript chat
Manuscript under Windows High Contrast High Contrast off again
High Contrast After High Contrast

Pixel samples from those captures against the dashboard (Edge, same theme, dark):

Surface Dashboard Earlier themes build ee37371f This head
Chat canvas #211E18 #26241D #211E18
Sidebar #211E18 #25221B #211E18
Composer #2C2920 #3B372F #2C2920
User bubble Manuscript --accent-subtle over the canvas #434341 #2E2E30 (#8fa8e0 at 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:

Before: Windows light, App theme Dark After: Windows light, App theme Dark After: Windows dark, App theme Light
Before After, dark app After, light app
content #EEF2F7 (Tide light) content #10151B (Tide dark) content #EEF2F7 (Tide light)

A one-palette theme pins dialogs to its mode. Captured by GatewayThemeBackdropTests.OpenDialogTakesAOnePaletteThemesPinnedModeWithItsOwnColors on the stack top ac745c6a with 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):

Dark-only theme, Windows light Dark-only theme, Windows dark
Dialog, Windows light Dialog, Windows dark

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 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 #2264'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: 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.
  • 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: Crabbox Hyper-V guest, Windows 11 Insider Preview build 29683, interactive desktop; OpenClaw.GatewayFixtureHost --scenario chat-interactive launching the Companion Debug build with an isolated profile.
  • PR head or commit tested: 0e7fd5ab for the build, unit tests and local UI tests with the app in each mode; earlier head 31d2a2cd for the first screenshots; 016f6e1b for the mode-mismatch captures and guest UI tests in both Windows modes.
  • Exact steps or command run: a guest script drives the Companion through local MCP app.navigate and 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 top 016f6e1b, 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.
  • Evidence after fix: the screenshots and pixel samples in Evidence.
  • Observed result: Manuscript recolors and re-fonts Settings, navigation, chat and the composer live; the measured surfaces equal the dashboard's; High Contrast replaces the theme's colors and the theme returns unchanged afterward. With the App theme opposite Windows' mode, every window paints its own mode's palette at startup and after live switches.
  • Screenshot or artifact links verified? (Yes/No/N/A) Yes
  • Not verified or blocked: light-mode screenshots (covered by UI tests). A Hyper-V guest can't render Mica's wallpaper bleed, so backdrop proof is by window state and logs, not pixels.

Security Impact

  • New permissions or capabilities? (Yes/No) No
  • Secrets or tokens handling changed? (Yes/No) No
  • New or changed network calls? (Yes/No) No
  • 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: N/A

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. Settings without Appearance keep 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

  • 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 17, 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.

@clawsweeper clawsweeper Bot added the clawsweeper:intake:feature Preliminary submission classification; full source review pending. label Nov 17, 2026
@clawsweeper clawsweeper Bot added P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 17, 2026
@clawsweeper

clawsweeper Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Codex review: ready, awaiting a maintainer decision.

What this changes

Adds 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.

  • Before: Settings and chat use Windows colors and Segoe UI.
  • After: Settings and chat use Manuscript typography and its #211E18 canvas.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Substantial native behavior evidence and focused coverage support the implementation, with no remaining discrete code finding; product direction remains unresolved.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected Windows fixture screenshots exercise native Settings/chat theming and High Contrast, while descendant-stack captures exercise corrected mode handling; the linked v2026.11.3 upgrade run covers the preserved settings owner and additive Appearance field through selection and restart.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete
User problem: People using Companion beside the dashboard cannot choose matching colors and typography.
Reason: The optional behavior has visible value, but adding a persisted customization surface and bundled typefaces needs an owner decision.

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
Reviewed head: 0e7fd5ab7832fa38a8764c226b2cd05c9af4c94e
Owner decision: Required. See Decision needed.

Decision needed

  • Question: Should Companion offer opt-in dashboard palettes and bundled typography alongside the Windows default appearance?
  • Recommendation: Approve the scoped built-in theme feature: Accept the optional picker and bundled fonts, coordinating its shared-model prerequisite and the overlapping earlier draft.
  • Why: This adds a persisted appearance choice and deliberately changes established native presentation after selection; no maintainer approval of that direction appears in the inspected discussion.

Before merge

None.

Findings

None.

Agent review details

How this fits together

Settings 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]
Loading

Technical review

Best 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

  • Windows appearance preference keeps the original intent (1fb28ee: The Settings reorganization added System, Light, and Dark selection with live application.)
  • Native typography and presentation changes intended behavior with a stated reason (improve(ui): align window chrome, Settings, Usage and chat composer with the Fluent design system #2131: Fluent alignment unified window chrome, Settings, and chat presentation; this PR explicitly substitutes dashboard fonts and colors only after selection.)
  • Chat font-role recognition changes intended behavior with a stated reason (243f9cf: Native Markdown distinguished code from prose by font; selectable themes can assign both roles the same font, so explicit element roles preserve that distinction.)
  • Voice transcript colors changes intended behavior with a stated reason (cd4acf0: The voice revamp established inline transcript bubbles; the new theme-aware fill now carries its matching foreground.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Pinned introduction: Reviewed the merge-base-to-head introduction, including the shared-model prerequisite carried from feat(themes): model the OpenClaw dashboard themes #2255 (feat(themes): model the OpenClaw dashboard themes); Store publication changes belong exclusively to base movement. (0e7fd5ab7832)
  • Current main lacks the feature: Main's ThemeHelper supports System, Light, and Dark preferences; searches of main source and tests found no dashboard-theme applicator or appearance model. (src/OpenClaw.Tray.WinUI/Helpers/ThemeHelper.cs:34, a0a2a24ec1dd)
  • Previous finding resolved: The voice transcript now uses VoiceAccentForegroundBrush alongside VoiceAccentBrush, and the projection supplies PrimaryForeground; focused coverage checks contrast across built-in palettes. (src/OpenClaw.Tray.WinUI/Pages/VoiceSettingsPage.xaml.cs:524, 0e7fd5ab7832)
  • Native visual evidence inspected: Inspected the prepared Windows default and Manuscript Settings/chat screenshots, plus linked High Contrast, opposite-mode startup, and upgrade captures; they show native palette and typography changes and system High Contrast takeover. (0e7fd5ab7832)
  • Latest-stable upgrade evidence: The linked record in feat(themes): resolve built-in palettes from the connected Gateway #2264 (feat(themes): resolve built-in palettes from the connected Gateway) exercises a v2026.11.3 profile through upgrade, theme selection, and restart, preserving preferences and device credentials; comparison confirms this PR's SettingsManager persistence owner is unchanged there and existing SettingsData fields retain their format. (src/OpenClaw.Shared/SettingsData.cs:200, 0e7fd5ab7832)
  • Feature history and original intent: History across current and Moltbot paths identifies the foundational Windows theme helper, the later App theme preference, Settings view-model ownership, Reactor theme resources, and recent Fluent presentation work; the optional selection retains the Windows defaults established by those changes. (src/OpenClaw.Tray.WinUI/Helpers/ThemeHelper.cs:36, 1fb28ee19072)

Likely related people:

  • Scott Hanselman: Raw commit eae6626 adds src/Moltbot.Tray.WinUI/Helpers/ThemeHelper.cs:12 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: eae6626635ba; files: src/Moltbot.Tray.WinUI/Helpers/ThemeHelper.cs)

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.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.
  • remove status: 📣 needs proof: Current PR status label is status: ⏳ waiting on maintainer.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.

Label justifications:

  • P3: Optional visual customization does not repair an urgent failure for existing users.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.
  • 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 (1 earlier review cycle)
  • reviewed 2026-11-17T01:45:24.206Z sha 31d2a2c :: needs real behavior proof before merge. :: [P2] Pair the themed voice bubble with its matching foreground

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.
@paulcam206
paulcam206 force-pushed the paulcam206-themes-02-apply branch from 31d2a2c to 0e7fd5a Compare November 17, 2026 06:39
@paulcam206

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Nov 17, 2026
@paulcam206

Copy link
Copy Markdown
Collaborator Author

Superseded by # in native stack #2302.

@paulcam206 paulcam206 closed this Nov 18, 2026
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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant