@@ -536,9 +555,17 @@ function PoolWindowCard({
>
) : null}
@@ -557,17 +584,24 @@ function PoolSection({
pool,
windows,
now,
- providerKeys,
layout,
onChange,
}: {
readonly pool: LimitPool;
readonly windows: readonly LimitPoolWindow[];
readonly now: number;
- readonly providerKeys: readonly string[];
readonly layout: UsageLimitLayout;
readonly onChange: (update: (current: UsageLimitLayout) => UsageLimitLayout) => void;
}) {
+ const {
+ attributes,
+ listeners,
+ setNodeRef,
+ setActivatorNodeRef,
+ transform,
+ transition,
+ isDragging,
+ } = useSortable({ id: pool.driver });
const color = barColor(pool.driver);
const label = providerClients.get(pool.driver)?.label ?? String(pool.driver);
const hidden = layout.hiddenProviders.includes(pool.driver);
@@ -583,7 +617,19 @@ function PoolSection({
: [...current.collapsedProviders, pool.driver],
}))
}
- render={
}
+ render={
+
+ }
>
@@ -601,20 +647,11 @@ function PoolSection({
- onChange((current) => ({
- ...current,
- providerOrder: moveLimitItem(
- current.providerOrder,
- providerKeys,
- pool.driver,
- direction,
- ),
- }))
- }
onToggleVisibility={() =>
onChange((current) => ({
...current,
@@ -641,53 +678,50 @@ function PoolSection({
-
- {windows.map((window, index) => {
- const details =
- pool.driver === "cursor" ? cursorUsageWindowDetails(window.id, pool) : undefined;
- const key = limitWindowKey(pool.driver, window);
- const windowHidden = layout.hiddenWindows.includes(key);
- const controls = (
-
- onChange((current) => ({
- ...current,
- windowOrder: moveLimitItem(
- current.windowOrder,
- windows.map((item) => limitWindowKey(pool.driver, item)),
- key,
- direction,
- ),
- }))
- }
- onToggleVisibility={() =>
- onChange((current) => ({
- ...current,
- hiddenWindows: windowHidden
- ? current.hiddenWindows.filter((id) => id !== key)
- : [...current.hiddenWindows, key],
- }))
- }
- />
- );
- return (
-
- );
- })}
-
+ limitWindowKey(pool.driver, window))}
+ onReorder={(active, over) =>
+ onChange((current) => ({
+ ...current,
+ windowOrder: moveLimitItem(
+ current.windowOrder,
+ windows.map((window) => limitWindowKey(pool.driver, window)),
+ active,
+ over,
+ ),
+ }))
+ }
+ >
+
+ {windows.map((window) => {
+ const details =
+ pool.driver === "cursor" ? cursorUsageWindowDetails(window.id, pool) : undefined;
+ const key = limitWindowKey(pool.driver, window);
+ const windowHidden = layout.hiddenWindows.includes(key);
+ return (
+
+ onChange((current) => ({
+ ...current,
+ hiddenWindows: windowHidden
+ ? current.hiddenWindows.filter((id) => id !== key)
+ : [...current.hiddenWindows, key],
+ }))
+ }
+ />
+ );
+ })}
+
+
);
@@ -759,21 +793,36 @@ export function UsageLimitsPooled({
) : null}
- {shownPools.map(({ pool, windows }) => (
-
- item.driver)}
- layout={layout}
- onChange={(update) => {
- focusedBeforeChange.current = document.activeElement;
- setLayout(update);
- }}
- />
-
- ))}
+ pool.driver)}
+ onReorder={(active, over) =>
+ setLayout((current) => ({
+ ...current,
+ providerOrder: moveLimitItem(
+ current.providerOrder,
+ pools.map((pool) => pool.driver),
+ active,
+ over,
+ ),
+ }))
+ }
+ >
+
+ {shownPools.map(({ pool, windows }) => (
+
{
+ focusedBeforeChange.current = document.activeElement;
+ setLayout(update);
+ }}
+ />
+ ))}
+
+
{hasLayout || showHidden ? (
diff --git a/apps/web/src/components/usage/usageLimitLayout.test.ts b/apps/web/src/components/usage/usageLimitLayout.test.ts
index 66db8ce73ae35..25019502284fa 100644
--- a/apps/web/src/components/usage/usageLimitLayout.test.ts
+++ b/apps/web/src/components/usage/usageLimitLayout.test.ts
@@ -39,7 +39,7 @@ describe("usage limit layout", () => {
it("moves available cards without forgetting temporarily unavailable preferences", () => {
const saved = ["offline", "weekly", "session"];
- const moved = moveLimitItem(saved, ["weekly", "session", "new"], "session", -1);
+ const moved = moveLimitItem(saved, ["weekly", "session", "new"], "session", "weekly");
expect(moved).toEqual(["session", "weekly", "new", "offline"]);
expect(orderLimitItems(["offline", "new", "weekly", "session"], moved, (id) => id)).toEqual([
"session",
@@ -47,7 +47,13 @@ describe("usage limit layout", () => {
"new",
"offline",
]);
- expect(moveLimitItem(saved, ["weekly", "session"], "weekly", -1)).toBe(saved);
- expect(moveLimitItem(saved, ["weekly", "session"], "session", 1)).toBe(saved);
+ expect(moveLimitItem(saved, ["weekly", "session", "new"], "new", "weekly")).toEqual([
+ "new",
+ "weekly",
+ "session",
+ "offline",
+ ]);
+ expect(moveLimitItem(saved, ["weekly", "session"], "weekly", "weekly")).toBe(saved);
+ expect(moveLimitItem(saved, ["weekly", "session"], "session", "missing")).toBe(saved);
});
});
diff --git a/apps/web/src/components/usage/usageLimitLayout.ts b/apps/web/src/components/usage/usageLimitLayout.ts
index f7e8b45cc92e7..02edc45a9955e 100644
--- a/apps/web/src/components/usage/usageLimitLayout.ts
+++ b/apps/web/src/components/usage/usageLimitLayout.ts
@@ -40,13 +40,14 @@ export function moveLimitItem(
savedOrder: readonly string[],
currentKeys: readonly string[],
key: string,
- direction: -1 | 1,
+ over: string,
) {
const keys = [...currentKeys];
const index = keys.indexOf(key);
- const destination = index + direction;
- if (index < 0 || destination < 0 || destination >= keys.length) return savedOrder;
- [keys[index], keys[destination]] = [keys[destination]!, keys[index]!];
+ const destination = keys.indexOf(over);
+ if (index < 0 || destination < 0 || index === destination) return savedOrder;
+ keys.splice(index, 1);
+ keys.splice(destination, 0, key);
const available = new Set(keys);
return [...keys, ...savedOrder.filter((id) => !available.has(id))];
}
diff --git a/docs/user/usage.md b/docs/user/usage.md
index c5d36d0d061f4..91c87b129f2ba 100644
--- a/docs/user/usage.md
+++ b/docs/user/usage.md
@@ -122,14 +122,15 @@ part of a segment is what that reset restores. Tap a segment or account row for
where it is signed in, and its reset time. On web, you can hover too. Codex and Claude accounts
with banked reset credits show a ticket count and the **Use reset** action in the account details.
Claude resets are not available when the server runs on macOS, where Claude keeps its login in the
-Keychain. On narrow screens, numbered rows below
-the bar show each account's quota, countdown, and credits. Tap a row to open its details.
+Keychain. Account details remain inside the bar at narrow widths too.
The same account signed in on more than one environment, or reported by a hub as well, counts once.
Filter with the environment dropdown to see what a single machine has.
On web and desktop, use the arrow beside a provider heading to collapse or expand its limits.
Hover over a provider or window, or focus it with the keyboard, to reveal hide and reorder
-controls. Touch devices always show these controls. Choose **Show hidden limits** below the
+controls. Drag the handle to reorder providers or windows. With the handle focused, press
+Space to pick it up, use the arrow keys to move, and press Space to drop or Escape to cancel.
+Touch devices always show these controls. Choose **Show hidden limits** below the
list to restore hidden items, or **Reset layout** to restore defaults. These preferences are
saved on this device.
From 79fe8cfcce74be2e13d4dd298dda188948c7182f Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Mon, 16 Nov 2026 20:56:52 +1100
Subject: [PATCH 04/10] fix(web): hidden usage limits collapse to a slim row
Co-Authored-By: Claude Opus 5.5
---
.../usage/UsageLimitLayoutControls.tsx | 2 +-
.../components/usage/UsageLimitsPooled.tsx | 112 +++++++++---------
2 files changed, 58 insertions(+), 56 deletions(-)
diff --git a/apps/web/src/components/usage/UsageLimitLayoutControls.tsx b/apps/web/src/components/usage/UsageLimitLayoutControls.tsx
index bf0c58c0aa72b..7e816e2c20f24 100644
--- a/apps/web/src/components/usage/UsageLimitLayoutControls.tsx
+++ b/apps/web/src/components/usage/UsageLimitLayoutControls.tsx
@@ -92,7 +92,7 @@ export function UsageLimitLayoutControls({