Skip to content

feat(themes): draw the theme's background artwork in chat - #2297

Merged
bkudiess merged 9 commits into
paulcam206-themes-06-accentfrom
paulcam206-themes-07-backgrounds
Nov 26, 2026
Merged

bkudiess merged 9 commits into
paulcam206-themes-06-accentfrom
paulcam206-themes-07-backgrounds

Conversation

@paulcam206

@paulcam206 paulcam206 commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Gateway themes now bring the dashboard's background artwork into chat. Each built-in theme has light and dark line art (contour lines, frames, glyphs) that the dashboard draws faintly behind the new-chat page and conversations. The Companion draws the same artwork, bundled from the pinned release, behind its new-chat surface and conversations, using the dashboard's own background model: Faded or Full bleed, a strength, and the two placement toggles. Plugin and imported themes get the dashboard's neutral artwork pair.

With Follow Gateway theme on, the Companion reads the person's dashboard choice (ui.background from users.prefs.get, the same read as the accent) and follows it live. Otherwise Settings › General offers the Companion's own style (None, Faded, Full bleed) and strength. Windows default, Windows High Contrast and Windows transparency effects off show no artwork, matching the dashboard's forced-colors and reduced-transparency rules. A custom image uploaded in the dashboard isn't fetched yet: it needs an authenticated HTTP read of the person's asset, which is a follow-up. Until then a custom choice shows the plain theme canvas, as the dashboard does when the image is unavailable.

This is part 7 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, 64a0303f feat(themes): draw the theme's background artwork in chat. It depends on #2296 (dashboard accent).

This commit is 964823a5 rebased onto main 1af25869, and git range-diff shows the same patch. Evidence and validation below name the heads they ran on; in this stack 964823a5 is now 8fa5aeed, 783b9ed7 is now 3f14cc1f and 2e98953a is now 3c4cacae.

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

Themes architecture

Layer 7 of 11 in the Companion themes stack. This layer draws the theme's bundled background artwork behind chat, using the dashboard's background model and, while following, the person's ui.background choice. 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 ART,ARTA layer
Loading

What Problem This Solves

Fixes: the Companion's chat lacks the faint theme artwork the dashboard draws behind its chat, so the two still look different under the same theme.

User Impact

User impact: under a Gateway theme, chat shows the theme's artwork like the dashboard, at the strength and placement the person chose. They can turn it off in Settings, and it never appears under Windows default or High Contrast.

Why This Change Was Made

  • The artwork comes from the dashboard's own assets (ui/src/assets/themes/<family>-<mode>.webp at the pinned release, MIT). scripts/Update-ThemeBackgrounds.ps1 re-encodes them losslessly as PNG, because the upstream SVG sources use <mask>, which WinUI's SVG renderer doesn't support.
  • Strength follows upstream session-background.tsx: full bleed is visibility × 0.7; faded is min(1, visibility / 0.5), with the upstream fade mask on the new-chat surface (drawn as a gradient in the shell color, which is equivalent over the opaque themed canvas).
  • The layer sits on the opaque theme shell, so the Mica setting never changes it. It's hit-test invisible and raw in the accessibility tree.
  • The artwork host declares no Reactor child: a declared empty child mounts after the setter that paints the artwork and would clear it until the next update.
  • Windows transparency effects can be turned off while a chat is open; the artwork layer then re-renders without the artwork (and with it again when they're turned back on), matching the dashboard's reduced-transparency rule.
  • ui.background is validated as upstream does; a custom asset id must match in full, so a trailing newline is rejected.

Evidence

Manuscript dark on the earlier stack top (955d82c1), guest, fixture Gateway. The artwork is the faint contour lines at bottom left and the frame at right; the amplified difference against "None" shows exactly where it draws:

Faded Full bleed, strength 100% None Faded minus None, amplified ×12
Faded Full bleed None Amplified difference
Windows High Contrast (no artwork) High Contrast off again
High Contrast After High Contrast

Following the dashboard's background, built and run at this PR's head (964823a5) on a Windows 11 guest (Crabbox Hyper-V, build 29683) in light mode with the App theme Dark, OpenClaw.GatewayFixtureHost --scenario gateway-themes and its new background console command, Follow on with Manuscript. The chat runs dark while the app's own mode is light, the case where the artwork must take the chat's mode rather than the app's. The Companion saved "FollowedBackground":{"source":{"kind":"theme"},"presentation":"full-bleed",…,"visibility":1}, then {"source":{"kind":"none"},…}:

Theme default (faded) Dashboard background full bleed, strength 1 Dashboard background none
Faded Followed full bleed Followed none

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: chat draws new artwork and Settings gains a background card; proven with native UI tests and screenshots 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 964823a5:

  • ./build.ps1: all builds succeeded.
  • dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore --filter "FullyQualifiedName~Theme|FullyQualifiedName~Appearance": 86 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": 2578 passed, 0 failed.
  • dotnet test ./tests/OpenClaw.Tray.UITests/OpenClaw.Tray.UITests.csproj -r win-x64 --filter "FullyQualifiedName~GatewayTheme" (developer machine, Windows dark mode): 23 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 gateway-themes.
  • PR head or commit tested: 964823a5 for the build, unit tests, the native background-follow run and GatewayThemeBackgroundTests on the guest (2 passed); 955d82c1 for the style screenshots; 016f6e1b for the guest UI tests in both Windows modes.
  • Exact steps or command run: a guest script picks Manuscript, then sets the background style to Faded, Full bleed (strength 100) and None through Settings' UI Automation, capturing chat after each; then High Contrast on and off.
  • Evidence after fix: GatewayThemeBackgroundTests.ArtworkPaintsOnFirstMountAndYieldsToWindowsDefaultAndHighContrast (with the chat in the mode opposite the app's, first mount paints the theme's artwork for the chat's mode at full bleed's 0.7 and the faded new-chat overlay fades to that mode's shell; it failed before the artwork repainted on Loaded; Windows default and High Contrast draw nothing); GatewayThemeTests background parsing and strength; GatewayThemeSettingsTests live follow of ui.background; GatewayThemeCatalogWireTests follows ui.background through the real fixture socket; GatewayThemeBackgroundTests.TransparencyEffectsChangesReRenderOpenChats (turning Windows transparency effects off or on re-renders open chats without, then with, the artwork); the screenshots above.
  • Observed result: faded and full-bleed artwork appear behind chat at the dashboard's strengths; None, High Contrast and Windows default show none.
  • Screenshot or artifact links verified? (Yes/No/N/A) Yes
  • Not verified or blocked: a custom uploaded image (not fetched; follow-up).

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. The artwork is bundled; ui.background comes from the same users.prefs.get read the accent PR adds.

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. With no background choice saved, a theme shows the dashboard's default (theme artwork, faded, 50%).

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 P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: sufficient Contributor real behavior proof is sufficient. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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. 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 bundled theme artwork behind chat, local style and strength controls, and live following of dashboard background preferences.

Example: Select Manuscript and Full bleed with artwork strength 100%.

  • Before: Chat shows the plain Manuscript canvas.
  • After: Chat shows Manuscript artwork at the dashboard's maximum full-bleed opacity of 0.7.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Native visual evidence, verified rebase continuity, upgrade evidence and successful exact-head CI support the focused implementation.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected Windows fixture-app captures showing local styles, followed Full bleed and None preferences, and High Contrast suppression and restoration; the core files match the native-proof build, while the linked latest-stable upgrade record and tolerant optional settings fields establish compatibility.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Companion chat omits the artwork and background choices visible under the same Gateway theme in the dashboard.
Reason: The collaborator-authored direction delivers a bounded visual feature using bundled assets, existing preferences and native accessibility behavior.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-directed feature is absent from main, and the reviewed patch has no actionable findings.

Priority: P3
Reviewed head: 64a0303fa3a5a6de3795c4d07eb99ef37349b736

Before merge

None.

Findings

None.

Agent review details

How this fits together

Gateway preferences and local Appearance settings select bundled artwork, which the Reactor chat root renders beneath conversation content while honoring Windows accessibility settings.

flowchart TD
  Gateway[Gateway preferences] --> Catalog[Existing theme catalog]
  Catalog --> Appearance[Appearance settings]
  Settings[Local Settings controls] --> Appearance
  Appearance --> Artwork[Chat artwork renderer]
  Assets[Bundled artwork] --> Artwork
  Windows[Windows accessibility settings] --> Artwork
  Artwork --> Chat[Native chat surface]
Loading

Technical review

Best possible solution:

Land the bundled-artwork layer in theme-stack order, leaving authenticated custom-image retrieval to its documented follow-up.

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

This is a feature addition; native screenshots establish the resulting artwork behavior without requiring a bug reproduction.

Is this the best way to solve the issue?

The change uses the existing preference and rendering owners, with focused shared policy and a native artwork renderer forming the smallest complete implementation of the stated scope.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Dashboard preference parsing and following keeps the original intent (75208d6: The preceding accent layer reads personal dashboard appearance without writing to the Gateway and retains the last followed value when preferences are unknown.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

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

Root-cause cluster

Relationship: canonical
Canonical: #2297
Summary: This PR carries forward the earlier artwork contribution as a scoped theme-stack layer.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: Optional visual polish with local controls and accessibility exclusions; no broken core workflow is established.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster 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.
  • 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 (3 earlier review cycles)
  • reviewed 2026-11-18T00:17:33.442Z sha 62666a1 :: needs maintainer review before merge. :: none
  • reviewed 2026-11-18T01:56:03.071Z sha 48b99b1 :: needs maintainer review before merge. :: none
  • reviewed 2026-11-18T03:20:55.795Z sha 8fa5aee :: needs maintainer review before merge. :: none

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

@paulcam206
paulcam206 force-pushed the paulcam206-themes-07-backgrounds branch from 62666a1 to 48b99b1 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-07-backgrounds branch from 48b99b1 to 8fa5aee 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:

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Nov 18, 2026
@paulcam206
paulcam206 marked this pull request as ready for review November 18, 2026 03:38
Bundle the Control UI's light and dark artwork for each built-in theme
(and its neutral pair for plugin and imported themes), re-encoded as PNG
from the pinned release's lossless WebP by
scripts/Update-ThemeBackgrounds.ps1. Chat draws it behind the new-chat
surface and conversations with the dashboard's ui.background model:
faded or full-bleed, visibility and the two placement toggles. While
following, the person's dashboard choice is read with users.prefs.get
and followed live; otherwise Settings offers the Companion's own style
and strength. Windows default, High Contrast and transparency effects
off show no artwork. A custom dashboard image is not fetched yet.
@paulcam206
paulcam206 force-pushed the paulcam206-themes-07-backgrounds branch from 8fa5aee to 64a0303 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 5 commits November 25, 2026 12:19
Include the element's effective light or dark mode in the last paint and use the same reuse check on Reactor renders, Loaded, and ActualThemeChanged. Exercise an actual mode switch and same-mode reload without delaying the first-mount identity check.

Co-authored-by: Copilot App <[email protected]>
@bkudiess
bkudiess merged commit 7854723 into main Nov 26, 2026
32 checks passed
@bkudiess
bkudiess deleted the paulcam206-themes-07-backgrounds 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: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦞 diamond lobster Very strong PR readiness with only minor 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