Skip to content

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

@codemonkeychris

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions