From 10e78065201c8387494b8aafabb987da87183b3a Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Wed, 14 Oct 2026 17:04:35 +0900 Subject: feat(account-usage): sidebar Usage view with Claude/Codex quota bars + on-track pace markers Consumes GET /usage (transport-contract 0.25.0). DaisyUI progress bars per quota window with a dot at the elapsed fraction of the window (the 'on track' level), ahead/under-pace labels, reset countdowns, stale/unavailable/not-configured states. --- .../account-usage/ui/AccountUsageView.svelte | 127 +++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 src/features/account-usage/ui/AccountUsageView.svelte (limited to 'src/features/account-usage/ui/AccountUsageView.svelte') diff --git a/src/features/account-usage/ui/AccountUsageView.svelte b/src/features/account-usage/ui/AccountUsageView.svelte new file mode 100644 index 0000000..c1af2a7 --- /dev/null +++ b/src/features/account-usage/ui/AccountUsageView.svelte @@ -0,0 +1,127 @@ + + +
+
+

Subscription usage

+ +
+ + {#if error} +

{error}

+ {/if} + + {#if usage === null && error === null} +

Loading…

+ {/if} + + {#each cards as card (card.provider)} +
+
+
+ {card.label} + {#if card.subtitle} + {card.subtitle} + {/if} +
+
+ {#if card.stateBadge} + {card.stateBadge} + {/if} + {#if card.ageLabel} + updated {card.ageLabel} + {/if} +
+
+ + {#if card.message} +

{card.message}

+ {/if} + {#if card.creditNote} +

{card.creditNote}

+ {/if} + + {#each card.bars as bar (bar.id)} + + {/each} +
+ {/each} + + {#if cards.some((c) => c.bars.some((b) => b.pacePercent !== null))} +

+ + on-track pace — usage that would exactly use the allowance by its reset +

+ {/if} +
-- cgit v1.2.3