Skip to content

[deep-review] C3: A2UI CardBackground theme override is parsed but never applied #343

Closed

Description

@codemonkeychris

Summary

A2UITheme parses a CardBackground value from the theme JSON, but CardRenderer never applies it to the rendered control. As a result, an agent that pushes a theme override expecting cards to use a custom background sees no effect.

Where

  • Theme parse: src/OpenClaw.Tray.WinUI/A2UI/Theming/ (look for the CardBackground member of the theme record).
  • Apply site that's missing it: src/OpenClaw.Tray.WinUI/A2UI/Rendering/Renderers/ContainerRenderers.cs (CardRenderer).

Why it matters

A2UI theme overrides are a contract with agent authors. Silently dropping one of the documented theme fields makes the documented contract a lie, and the failure mode is visual — the agent doesn't know it didn't work.

Proposed fix

In CardRenderer, read the active theme's CardBackground; if present, assign it to the rendered card's Background brush. Fall back to the existing default when null.

Add a UI test: push a theme with a non-default CardBackground and a card, assert the rendered card's Background is the expected brush.

Severity

Bug — theming contract violation.

Activity

  1. added
    bug
    on May 14, 2026
  2. added a commit that references this issue on May 14, 2026
    a3684c9
  3. linked a pull request that will close this issueApply A2UI CardBackground theme override #391on May 14, 2026
  4. shanselman commented on May 18, 2026

    @shanselman
    Collaborator

    Closing during the post-refactor deep-review cleanup. CardBackground remains captured in the #372 tracker, but the old generated PRs were stale and this can be re-opened as a fresh focused bug if it resurfaces. This keeps the signal while reducing stale one-off issue noise.

  5. locked as resolved and limited conversation to collaborators on May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bug

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions