Repository navigation
[Repo Assist] fix(a2ui): apply CardBackground theme override to Card renderer - #380
Closed
github-actions[bot] wants to merge 1 commit into
Closed
github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
CardRenderer read the Fluent default brush but never consulted ctx.Theme.CardBackground. Any agent that pushed a theme with a colors.card value saw no effect — a silent contract violation. Fix: check ctx.Theme.CardBackground first and create a SolidColorBrush from it; fall back to the Fluent resource brush when not set. Pattern matches existing CornerRadius/Spacing theme handling in the same renderer. Add Theme_CardBackground_AppliesToCardBorderBackground UI test to lock in the fix. Fixes #343. Co-authored-by: Copilot <[email protected]>
23 tasks
30 tasks
Collaborator
30 tasks
shanselman
deleted the
repo-assist/fix-a2ui-card-background-343-b030fe61e9b1804e
branch
September 7, 2026 06:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This PR was created by Repo Assist, an automated AI assistant.
Problem
A2UIThemeparsescolors.cardintoCardBackgroundbutCardRenderernever consulted it — the FluentCardBackgroundFillColorDefaultBrushwas used unconditionally. Any agent that pushed abeginRendering.stylestheme with acolors.cardvalue saw no visual effect, a silent contract violation.Root Cause
CardRenderer.Renderonly checkedApplication.Current.Resources["CardBackgroundFillColorDefaultBrush"]and applied it toborder.Background. There was no code path that readctx.Theme.CardBackground.Fix
Check
ctx.Theme.CardBackgroundfirst; when present, create aSolidColorBrushfrom it. Fall back to the Fluent resource brush when not set. The pattern matches existingCornerRadiusandSpacingtheme handling in the same renderer.Test
Added
Theme_CardBackground_AppliesToCardBorderBackgroundinA2UIThemeTests— pushes a surface withcolors.card: "#2233FF"and asserts the renderedBorder.Backgroundis aSolidColorBrushwith R=0x22, G=0x33, B=0xFF.Test Status
dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj— 1541 passed, 7 pre-existing failures (unchanged baseline)dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj— 1124 passed, 7 pre-existing failures (unchanged baseline)OpenClaw.Tray.UITests) require a Windows WinUI host — cannot run on Linux runner; new test exercises the same code path covered by existingTheme_RadiusOverride_AppliesToCardBorderCornerRadiusbuild.ps1requires WindowsCloses #343.