fe(payg): show the usage-limit modal when the limit is hit (direct + policy) (#6626)

This commit is contained in:
ConnorYoh
2026-06-11 21:28:44 +01:00
committed by GitHub
parent 6f1c19c179
commit 22379fd5ab
14 changed files with 398 additions and 91 deletions
@@ -299,6 +299,10 @@ public class EntitlementGuard implements HandlerInterceptor {
deniedDegradedCounter.increment();
Map<String, Object> body = new LinkedHashMap<>();
body.put("error", "FEATURE_DEGRADED");
// subscribed tells the client which usage-limit modal to show: a subscribed team is over
// its spending cap; an un-subscribed one has spent its free allowance. (PAYG_LIMIT_REACHED
// already carries this; mirror it here so the JWT/web path can pick the right modal too.)
body.put("subscribed", snapshot.subscribed());
body.put("missingGates", missingGates(required, snapshot.enabledGates()));
body.put("state", snapshot.state().name());
body.put(