Skip to content

feat(themes): add a Mica backdrop setting for the Windows default look - #2293

Merged
bkudiess merged 5 commits into
paulcam206-themes-02-applyfrom
paulcam206-themes-03-mica
Nov 26, 2026
Merged

bkudiess merged 5 commits into
paulcam206-themes-02-applyfrom
paulcam206-themes-03-mica

Conversation

@paulcam206

@paulcam206 paulcam206 commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Settings › General gains a Mica backdrop toggle for the Windows default look. On, windows and dialogs show their own Mica; off, they paint the opaque Fluent canvas instead. A Gateway theme stays opaque either way, as the dashboard is, and Windows High Contrast keeps its system colors: windows show the system backdrop, or with the toggle off, the opaque High Contrast window color.

The toggle applies live to every open window and dialog, without a restart. It works by painting or clearing the window root's background over the window's own backdrop, never by swapping SystemBackdrop objects, which faulted inside WinUI across a theme refresh. Each window logs its backdrop mode ([Themes] Backdrop <window>: System|Opaque …), so a report can show which mode a window was in. The setting persists in Appearance.UseMica and defaults to on, so existing installs look the same.

This is part 3 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, f0ce273c feat(themes): add a Mica backdrop setting for the Windows default look. It depends on #2292 (applying themes).

This commit is 078b9c40 rebased onto main 1af25869, and git range-diff shows the same patch plus one wording fix from this PR's first hosted review: DESIGN.md now says High Contrast keeps its system colors and, with the Mica setting off, paints the opaque High Contrast window color. Evidence and validation below name the heads they ran on; in this stack 078b9c40 is now d6f91d2d, 783b9ed7 is now 3f14cc1f and 2e98953a is now 3c4cacae.

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

Themes architecture

Layer 3 of 11 in the Companion themes stack. This layer adds the Mica backdrop setting and the backdrop policy: Gateway themes stay opaque, Mica shows only with the Windows default look, and High Contrast keeps the system backdrop. 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 BKP layer
Loading

What Problem This Solves

Fixes: there's no way to turn off Mica's wallpaper-tinted backdrop when someone wants a solid window.

User Impact

User impact: people can turn Mica off for the Windows default look and get the opaque Fluent canvas in every open window immediately. Gateway themes are always opaque, and High Contrast is unchanged.

Why This Change Was Made

  • An earlier version tinted Mica with the theme color, which no longer matched the dashboard's solid surfaces and made the toggle look like it did nothing under a theme. Mica now belongs to the Windows default look only.
  • Painting the window root keeps the window's own backdrop object, so there's no backdrop swap to fault during a light/dark or High Contrast refresh.
  • The copy is localized in all six languages.

Evidence

  • GatewayThemeBackdropTests.NodeCanvasWindowsFollowTheMicaSettingWhenOpenedBeforeOrAfterIt: the node-owned web and A2UI canvas windows register with BackdropPolicy, so canvases opened before or after Mica is turned off paint the opaque canvas and show Mica again when it's turned back on (this test fails without the registration). Captured on the stack top ac745c6a, Windows light, Mica off:
Web canvas opened before Mica was turned off A2UI canvas opened after
Web canvas A2UI canvas

Live run on the earlier stack top (955d82c1; this layer's product code is unchanged since), guest, fixture Gateway: Mica turned off and back on in Settings under Windows default, then Manuscript applied, then Windows High Contrast on and off. The Companion's own log, with no restart:

16:57:05 [Themes] Backdrop WorkspaceWindow: System (Mica setting on, theme Windows default, High Contrast False); system backdrop MicaBackdrop, root transparent
16:57:28 [Themes] Backdrop WorkspaceWindow: Opaque (Mica setting off, theme Windows default, High Contrast False); system backdrop MicaBackdrop, root #FF202020
16:57:41 [Themes] Backdrop WorkspaceWindow: System (Mica setting on, theme Windows default, High Contrast False); system backdrop MicaBackdrop, root transparent
16:57:45 [Themes] Backdrop WorkspaceWindow: Opaque (Mica setting on, theme manuscript, High Contrast False); system backdrop MicaBackdrop, root #FF211E18
16:58:50 [Themes] Backdrop WorkspaceWindow: System (Mica setting on, theme manuscript, High Contrast True); system backdrop MicaBackdrop, root transparent
16:59:05 [Themes] Backdrop WorkspaceWindow: Opaque (Mica setting on, theme manuscript, High Contrast False); system backdrop MicaBackdrop, root #FF211E18

The window keeps the same MicaBackdrop object throughout; only the root's paint changes. Settings with Mica on and off. A Hyper-V guest draws Mica's solid fallback color (software composition), so those two captures look alike; real wallpaper bleed needs GPU composition, and the backdrop UI tests assert the backdrop and root state instead.
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 backdrop of every open window and dialog changes live; proven with native UI tests and window logs 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 078b9c40:

  • ./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": 2563 passed, 0 failed.
  • dotnet test ./tests/OpenClaw.Tray.UITests/OpenClaw.Tray.UITests.csproj -r win-x64 --filter "FullyQualifiedName~GatewayTheme" (developer machine, Windows dark mode): 18 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; native UI tests, and the Companion under OpenClaw.GatewayFixtureHost --scenario gateway-themes.
  • PR head or commit tested: 078b9c40 for the build and unit tests; 9eb8d148 for the backdrop UI tests and the earlier stack top 955d82c1 for the live log and captures (this layer's product code is unchanged since both); 016f6e1b, the stack top, for the theme UI tests in both Windows modes after the theme-application fixes below this layer.
  • Exact steps or command run: dotnet test tests\OpenClaw.Tray.UITests -c Debug -r win-x64 --filter "FullyQualifiedName~GatewayThemeBackdropTests" on the guest's interactive desktop; a guest script toggles SettingsPageUseMica through UI Automation and collects the app log.
  • Evidence after fix: GatewayThemeBackdropTests (switching themes and Mica keeps the window's backdrop and raises no framework fault; an open dialog follows the Mica setting and theme) and GatewayThemeSettingsTests.MicaShowsOnlyForWindowsDefaultWithTheSettingOn pass; the log in Evidence.
  • Observed result: the toggle changes every open window live; a theme stays opaque; High Contrast keeps the system backdrop; nothing needs a restart.
  • Screenshot or artifact links verified? (Yes/No/N/A) N/A
  • Not verified or blocked: visible wallpaper bleed on real GPU composition (Hyper-V guests draw Mica's fallback color).

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; UseMica defaults to on.

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

Adds a persistent Mica backdrop toggle that updates open windows and dialogs immediately.

Example: With Windows default selected and App theme Dark, turn Mica backdrop off.

  • Before: The Companion provides no app-specific control for an opaque window background.
  • After: Open windows paint the opaque Fluent canvas, while Gateway themes remain opaque regardless of the toggle.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Focused implementation, distinct persistence and native-window coverage, real application evidence, and passing exact-head CI support landing within the stack.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (logs): Inspected Windows 11 fixture-app screenshots and supplied live logs exercise the Settings toggle, opaque canvas rendering, theme selection, and High Contrast transitions; verified source continuity supports reuse of earlier captures, and the linked stable-release upgrade preserves settings and identity. GPU wallpaper bleed is explicitly unverified because the guest uses software composition.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: People using the Windows default appearance cannot choose a solid Companion window background independently of Windows-wide appearance preferences.
Reason: The collaborator-authored direction adds a discoverable, localized choice at modest implementation cost while retaining existing behavior by default.

Merge readiness

✅ Ready for maintainer review

Keep open: this collaborator-authored feature provides a useful appearance choice absent from main, with no actionable introduced defects found and passing CI for the exact head.

Priority: P3
Reviewed head: f0ce273c1eb23ad13b609f18652f500b7a4cb021

Before merge

None.

Findings

None.

Agent review details

How this fits together

General Settings persists Appearance.UseMica through the existing settings store; App passes that preference, the active theme, and Windows accessibility state to the backdrop policy, which updates window backgrounds.

flowchart TD
  A[General Settings toggle] --> B[SettingsPageViewModel]
  B --> C[Appearance settings]
  C --> D[App theme application]
  E[Gateway theme and Windows contrast] --> D
  D --> F[BackdropPolicy]
  F --> G[Open windows and dialogs]
Loading

Technical review

Best possible solution:

Land the additive preference through the existing settings and backdrop owners after its prerequisite, preserving the enabled default and system High Contrast colors.

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

This is an optional capability request rather than a reported failure; current-main source confirms the missing app-specific preference.

Is this the best way to solve the issue?

The smallest complete implementation adds one persisted boolean and extends the existing policy while preserving backdrop identity, independent theme selection, and accessibility colors; the diff follows that boundary without unnecessary machinery.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Backdrop rendering and live window refresh keeps the original intent (8c28942: The prerequisite theme-application layer deliberately paints themed surfaces over each window's existing backdrop to preserve dashboard colors and avoid WinUI faults from backdrop replacement.)
  • Tolerant persisted appearance model keeps the original intent (bbdefc6: The model layer reads appearance fields tolerantly so malformed optional appearance data cannot discard unrelated settings.)
  • Settings persistence ownership keeps the original intent (d2638dd: The Settings extraction established a WinUI-free view model and settings store that preserve auto-save and external-change behavior.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Barbara Kudiess: Raw commit d2638dd adds src/OpenClaw.Tray.WinUI/Presentation/SettingsPageViewModel.cs:287 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: d2638ddbef57; files: src/OpenClaw.Tray.WinUI/Presentation/SettingsPageViewModel.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:

No label changes.

Label justifications:

  • P3: This is optional appearance customization with an unchanged default and limited operational impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

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:03.294Z sha 72afb4c :: needs maintainer review before merge. :: [P3] Describe the Mica-off exception in the High Contrast guidance
  • reviewed 2026-11-18T01:56:11.777Z sha f93261f :: needs maintainer review before merge. :: none
  • reviewed 2026-11-18T03:36:05.488Z sha d6f91d2 :: needs maintainer review before merge. :: none

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

@paulcam206
paulcam206 force-pushed the paulcam206-themes-03-mica branch from 72afb4c to f93261f 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-03-mica branch from f93261f to d6f91d2 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
General settings gains a "Mica backdrop" toggle. It governs the Windows
default look only: on shows the window's own Mica, off paints the opaque
Fluent canvas over it. Gateway themes stay opaque either way, as the
dashboard is, and High Contrast keeps the system backdrop. The change
applies to every open window and dialog live by painting the window root,
never by swapping backdrops (which faults inside WinUI across a theme
refresh), and each window logs its backdrop mode.
@paulcam206
paulcam206 force-pushed the paulcam206-themes-03-mica branch from d6f91d2 to f0ce273 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 and others added 4 commits November 25, 2026 09:34
Both Hanselman reviewers noted the picker test checked UseMica only on the
in-memory SettingsManager, so a missing UseMica write would pass.

Co-authored-by: Copilot App <[email protected]>
Merge parent 2fbed9a while preserving the existing layer-3 delta.

Co-authored-by: Copilot App <[email protected]>
@bkudiess
bkudiess merged commit 196528f into main Nov 26, 2026
33 checks passed
@bkudiess
bkudiess deleted the paulcam206-themes-03-mica 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: 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