+
{showAccountName ? (
-
+
+ {accountLabel(account)}
+
) : null}
{remaining}%
{/* Countdown and badge get their own plate: fill and hatching run under them otherwise. */}
@@ -307,7 +305,7 @@ function PoolSegment({
-
+
{account.redeem ? (
}
className="min-w-0 @2xl/pool:hidden"
>
-
-
- Segment
- {index}
-
-
+
+ {accountLabel(account)}{remaining}%
{resetsIn?.replace("resets in ", "↻ ") ?? ""}
@@ -445,9 +433,9 @@ function RedeemableSegmentPopup({
* the share of that account's quota still open. Equal widths are honest: every
* account contributes the same share of the pool, whatever its plan.
*
- * Wide, each segment carries its own label. Narrow, the bar is a bare strip
- * and a legend below lists the accounts in the same order; both open the
- * same popover.
+ * Wide, each segment carries its own avatar and label. Narrow, the segment
+ * shows the avatar alone and a legend below repeats it with the label; both
+ * open the same popover.
*/
function PoolBar({
pool,
diff --git a/packages/shared/src/usageLimits.test.ts b/packages/shared/src/usageLimits.test.ts
index b2bef55cb108..ebe9f3d75f02 100644
--- a/packages/shared/src/usageLimits.test.ts
+++ b/packages/shared/src/usageLimits.test.ts
@@ -536,6 +536,18 @@ describe("pools", () => {
expect(accounts[0]?.displayName).toBe("claude-team-seat");
});
+ it("normalizes a hub account whose stripped id is empty to no display name", () => {
+ const hub = {
+ ...source,
+ accounts: [{ id: ".json", driver: claude, usageLimits: { checkedAt, windows: [window] } }],
+ };
+ const input = new Map([
+ [EnvironmentId.make("env-a"), { ...laptop, serverConfig: { usageLimitSources: [hub] } }],
+ ]);
+ const accounts = collectLimitAccounts(input);
+ expect(accounts[0]?.displayName ?? null).toBeNull();
+ });
+
it("pools windows by id across accounts and orders resets by when they land", () => {
const input = new Map([
[
diff --git a/packages/shared/src/usageLimits.ts b/packages/shared/src/usageLimits.ts
index b1211bffd54d..2ce3f141d24f 100644
--- a/packages/shared/src/usageLimits.ts
+++ b/packages/shared/src/usageLimits.ts
@@ -261,7 +261,7 @@ export function collectLimitAccounts(presentations: LimitPresentations): readonl
{
key: `${source.id}:${account.id}`,
driver: account.driver,
- displayName: account.email ? null : account.id.replace(/\.json$/i, ""),
+ displayName: account.email ? null : account.id.replace(/\.json$/i, "") || null,
email: account.email,
plan: account.plan,
accentColor: undefined,