Skip to content

usage popup

Kazushi Kamegawa edited this page Jul 20, 2026 · 2 revisions

Remaining Usage Flyout

Date: 2026-07-20
Tracking: Issue #87; sub-issues #99, #100, #101
Status: Approved for implementation in PR #91

Corrected design

  • Display remaining percentage as clamp(100 - usedPercent). Missing usedPercent is unavailable, not zero usage.
  • Treat resetsAt as Unix seconds. Label 300-minute and 10,080-minute windows explicitly and use a safe generic fallback.
  • Prefer the canonical rateLimits; use rateLimitsByLimitId only when it has exactly one entry.
  • Fetch once per signed-in connection generation and refresh when opening a snapshot older than 60 seconds. Busy-to-Ready transitions do not refetch.
  • Use connection generation and push version counters so an older read cannot overwrite a newer push. Invalidate data on sign-out, disconnect, reconnect, and disposal.
  • Usage and History flyouts are mutually exclusive and support keyboard navigation, Escape, automation names, focus visuals, and VS themes.
  • Provide Open usage dashboard and Learn more through fixed HTTPS URIs represented here as <USAGE_DASHBOARD_URL> and <LEARN_MORE_URL>. The opener validates an exact host/path allowlist and never logs the full URI.

Verification

  • Cover percentage clamping, windows, reset range, credits sanitation, zero/one/multiple limit maps, connection generations, TTL, read/push races, lifecycle invalidation, URI rejection, XAML bindings, accessibility, themes, and fake app-server read/push data.

Clone this wiki locally