From e2a6180883966a1789c01670183d4d2fb45eae29 Mon Sep 17 00:00:00 2001
From: Chris Coveney
Date: Mon, 9 Nov 2026 12:16:28 -0800
Subject: [PATCH] DEV-423: Say when open sessions hold the rest of the credits
GET /v1/chat/status now reports quota_reserved when open cloud sessions
hold what is left. Show that instead of the paused-until-reset copy,
which only fits a spent or nearly spent allowance.
---
src/app/cloud-models/shared.ts | 5 +++--
src/app/cloud-models/usage-section.tsx | 9 ++++++---
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/app/cloud-models/shared.ts b/src/app/cloud-models/shared.ts
index 5075008..5cd5c10 100644
--- a/src/app/cloud-models/shared.ts
+++ b/src/app/cloud-models/shared.ts
@@ -39,8 +39,9 @@ export interface CloudQuota {
plan: 'free' | 'paid' | 'admin';
}
-/** Why cloud models can't run right now, from GET /v1/chat/status. */
-export type CloudStatusReason = 'plan_required' | 'unconfigured' | 'quota_exceeded' | 'quota_low';
+/** Why cloud models can't run right now, from GET /v1/chat/status.
+ * quota_reserved: open sessions hold what is left; it comes back as they end. */
+export type CloudStatusReason = 'plan_required' | 'unconfigured' | 'quota_exceeded' | 'quota_low' | 'quota_reserved';
export interface CloudStatus {
enabled: boolean;
diff --git a/src/app/cloud-models/usage-section.tsx b/src/app/cloud-models/usage-section.tsx
index 1fd1ab8..51c5c81 100644
--- a/src/app/cloud-models/usage-section.tsx
+++ b/src/app/cloud-models/usage-section.tsx
@@ -111,8 +111,9 @@ function CreditsRow({ status }: { status: CloudStatus }) {
const held = Math.max(0, 100 - quota.percent_available - used);
const spent = reason === 'quota_exceeded';
const low = reason === 'quota_low';
+ const reserved = reason === 'quota_reserved';
// Same scale as Web Search: amber before the wall, red at it.
- const barColor = spent ? 'bg-danger' : low || used >= 80 ? 'bg-warn' : 'bg-accent-strong';
+ const barColor = spent ? 'bg-danger' : low || reserved || used >= 80 ? 'bg-warn' : 'bg-accent-strong';
// Counts when the API sends them; percentages until it does for everyone.
const counted = quota.limit !== null && quota.used !== null && quota.remaining !== null;
@@ -156,11 +157,13 @@ function CreditsRow({ status }: { status: CloudStatus }) {
was used is charged, and the rest comes back.
)}
- {(spent || low) && (
+ {(spent || low || reserved) && (
{spent
? 'Cloud models are paused until the reset.'
- : 'There are too few credits left for another cloud session, so cloud models are paused until the reset.'}{' '}
+ : reserved
+ ? "Your open cloud sessions are holding the rest of your credits, so a new one can't start until they end."
+ : 'There are too few credits left for another cloud session, so cloud models are paused until the reset.'}{' '}
Everything that runs on your device keeps working.
)}