Skip to content

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

Closed
paulcam206 wants to merge 3 commits into
openclaw:mainfrom
paulcam206:paulcam206-themes-03-mica
Closed

paulcam206 wants to merge 3 commits into
openclaw:mainfrom
paulcam206:paulcam206-themes-03-mica

Conversation

@paulcam206

@paulcam206 paulcam206 commented Nov 17, 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 the system backdrop.

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 10 in the Companion themes stack. Each PR targets main and carries the commits below it; review only this PR's own commit, 078b9c40 feat(themes): add a Mica backdrop setting for the Windows default look. It depends on #2256 (applying themes).

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 (#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: the backdrop of every open window and dialog changes live; proven with native UI tests and window logs on an interactive Windows guest.

Validation

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 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 clawsweeper:intake:feature Preliminary submission classification; full source review pending. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. 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: blocked before merge.

What this changes

Adds a persistent Mica backdrop toggle together with the prerequisite dashboard-theme model and application layers.

Example: In Settings, select Windows default and turn Mica backdrop off.

  • Before: Windows retain their system backdrop with no Companion setting to request solid backgrounds.
  • After: Open windows and dialogs immediately paint the opaque Fluent canvas, and the preference survives restart.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The implementation has credible runtime and upgrade evidence with no confirmed blocking defect, while product adoption remains undecided.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (logs): The contributor exercised Settings through UI Automation in an isolated Windows 11 Companion run; inspected captures and runtime logs show live Mica transitions and themed opacity, with native regressions covering dialogs and node-owned canvases. Visible GPU wallpaper bleed remains explicitly unverified because the guest uses software composition.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Preference · Worth it: Needs a maintainer decision · Fix scope: Complete
User problem: People who prefer solid window backgrounds cannot disable the wallpaper-tinted Mica appearance in Companion settings.
Reason: The control provides a coherent optional benefit, but adopting the new preference requires an owner decision.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep open: current main lacks this preference, and no blocking implementation defect was confirmed; adopting the optional appearance setting needs a maintainer decision.

Priority: P3
Reviewed head: 078b9c401d8f45d26c279b2b76719c97dcf91403
Owner decision: Required. See Decision needed.

Decision needed

  • Question: Should Companion expose a persistent Mica backdrop toggle for Windows default within the proposed theme stack?
  • Recommendation: Approve the optional setting: Accept the default-on control and consider this draft alongside its prerequisite theme layers.
  • Why: This adds an optional appearance preference and persisted configuration to designed behavior, and no inspected maintainer discussion approves that direction.

Before merge

  • Await maintainer action - Approve or decline the persistent Mica preference within the proposed theme stack.

Findings

None.

Agent review details

How this fits together

The settings store persists appearance choices, App resolves them, and the theme applicator and backdrop policy update WinUI resources and open surfaces.

flowchart LR
A[General settings] --> B[Settings view model]
B --> C[Settings store]
C --> D[App appearance application]
D --> E[Theme resources]
D --> F[Backdrop policy]
E --> G[Windows and dialogs]
F --> G
Loading

Technical review

Best possible solution:

If approved, land the prerequisite theme layers and retain the default-on preference through the existing settings and backdrop owners.

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

This is a capability request: current-main source confirms the missing preference, and supplied runtime diagnostics demonstrate the proposed transitions.

Is this the best way to solve the issue?

The invariant is live appearance changes without replacing backdrop objects; extending the settings store and one backdrop policy is a coherent implementation with no smaller complete alternative established.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Windows Mica backdrops changes intended behavior with a stated reason (09c952b: Added Mica and acrylic to Windows surfaces for the native Windows appearance; this proposal retains that default and offers an explicit opaque choice.)
  • App theme preference and Settings ownership keeps the original intent (1fb28ee: Added System, Light and Dark selection; the later Settings extraction retained the settings-store boundary.)
  • Fluent window and chat presentation changes intended behavior with a stated reason (improve(ui): align window chrome, Settings, Usage and chat composer with the Fluent design system #2131: Aligned window chrome, content layers, Settings and chat with Fluent presentation; the proposal explains its optional dashboard-themed alternative.)
  • Chat typography and Markdown styling changes intended behavior with a stated reason (243f9cf: Aligned native conversations with web chat; the carried theme layer changes selected fonts while preserving prose and code roles.)
  • Window lifetime ownership keeps the original intent (3a097bc: Transferred concrete surface lifetimes to WindowManager while keeping App as the composition root.)

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:131 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)
  • 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:

No label changes.

Label justifications:

  • P3: Optional appearance customization preserves the existing default and addresses no urgent broken workflow.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster 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.

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-17T01:46:35.372Z sha 02bad37 :: needs real behavior proof before merge. :: [P2] [P2] Register node-owned canvas windows with the backdrop policy
  • reviewed 2026-11-17T06:47:41.724Z sha 078b9c4 :: blocked before merge. :: none
  • reviewed 2026-11-17T06:54:03.233Z sha 078b9c4 :: blocked before merge. :: none

Reviewed November 17, 2026, 3:16 AM ET / 08:16 UTC (Revision 4).

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.
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 02bad37 to 078b9c4 Compare November 17, 2026 06:40
@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: 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