Skip to content

Fix reset credits propagation: lift to parent instead of digging into child cards#707

Merged
rygel merged 1 commit into
developfrom
fix/reset-credits-propagation
Jul 4, 2026
Merged

Fix reset credits propagation: lift to parent instead of digging into child cards#707
rygel merged 1 commit into
developfrom
fix/reset-credits-propagation

Conversation

@rygel

@rygel rygel commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Problem

The previous fix (PR #706) added a ResolveResetCredits method that dug into WindowCards to find the burst card's ResetCreditsAvailable. This is the exact same pattern of parent-reaching-into-child we've explicitly been told to avoid.

Fix

Root cause: GroupedUsageDisplayAdapter.Expand creates a WindowedProviderUsage but never propagates ResetCreditsAvailable from the child burst card to the parent.

Solution: Set ResetCreditsAvailable on the WindowedProviderUsage parent at construction time in the adapter. The tooltip code now just checks usage.ResetCreditsAvailable like every other provider — no child-digging needed.

Changed files:

  • GroupedUsageDisplayAdapter.cs: Propagate burst card's ResetCreditsAvailable to parent WindowedProviderUsage
  • MainWindowRuntimeLogic.cs: Revert ResolveResetCredits, go back to simple usage is QuotaProviderUsage qReset check

@rygel
rygel merged commit f97517a into develop Jul 4, 2026
17 checks passed
@rygel
rygel deleted the fix/reset-credits-propagation branch July 4, 2026 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants