Credit-balance pen sets an absolute target (mint up / invalidate down)

FixSecurityService
Shipped
July 30, 2026 at 3:50 PM UTC
Author
Kamo
Commit
11103d6

The Manage-Credits pen edit only ever LOWERED a balance: updateAllotment routed creditBalance to invalidateCreditsToTarget, which no-ops when target >= current. And on a member/product with no allotment row yet, save() POSTs to createAllotment, which ignored the numeric balance entirely. So edits only "worked" when reducing an existing allotment — the cause of "works for some members/vendors, not others." Add **************** reconcile the available balance to the entered value in BOTH directions — mint the shortfall (createCredits) when raising, invalidate the excess (invalidateCreditsToTarget, oldest-first) when lowering, no-op when equal. updateAllotment now uses it; createAllotment mints the starting balance for a fresh row. The pen is now the single add/remove control.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing