Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(site): refresh group member budgets after overrides - #27553

Merged
EhabY merged 3 commits into
mainfrom
fix/site-cost-control-ui
Jul 29, 2026
Merged

fix(site): refresh group member budgets after overrides#27553
EhabY merged 3 commits into
mainfrom
fix/site-cost-control-ui

Conversation

@EhabY

@EhabY EhabY commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Group member budget rows remained stale after saving or deleting a user override because the cached member-spend query was not refreshed.

Invalidate the affected user's override query and only cached group-member spend queries whose user ID list contains that user. This refreshes relevant rows without invalidating unrelated groups.

Diff: production code +29/-6; tests and stories +178/-1.

Reference: https://app.notion.com/p/coderhq/Cost-Control-Bugs-3aad579be592802eab06ce723929a2ed

Implementation notes
  • Preserve the existing group-member spend query key.
  • Match cached member-spend queries by the affected user ID.
  • Cover save and delete interactions with focused stories and predicate logic with a unit test.

Generated by Coder Agents for @EhabY.

@EhabY
EhabY force-pushed the fix/site-cost-control-ui branch 2 times, most recently from 2bd5794 to 7af5783 Compare July 28, 2026 13:29
@EhabY EhabY changed the title fix(site): correct cost control budgets on groups pages fix(site): refresh group member budgets after overrides Jul 28, 2026
@EhabY
EhabY marked this pull request as ready for review July 29, 2026 12:57
@EhabY
EhabY force-pushed the fix/site-cost-control-ui branch from 7af5783 to 018f91b Compare July 29, 2026 12:57
@EhabY
EhabY requested a review from ssncferreira July 29, 2026 12:58

@ssncferreira ssncferreira left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :shipit:

@EhabY
EhabY merged commit e3a5a69 into main Jul 29, 2026
25 of 26 checks passed
@EhabY
EhabY deleted the fix/site-cost-control-ui branch July 29, 2026 14:09
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants