Files
magpie/docs
yetone 34606000da gui: the tray panel's Usage tab ends in a heatmap of recent weeks (eiyuuzaki2333 on X)
Asked for "a heatmap like GitHub's / Codex's, also in the tray". The
window already has one (Usage › Requests, 53 weeks, #1369), so no second
copy goes on the Overview, which counts gateway calls only while the
heatmap counts session-file calls too. The tray panel had none.

The panel's Usage tab now ends in a card of the recent weeks, one cell a
day, Monday on top, as many weeks as the card fits (8 to 53: about 25 at
the panel's 440, 17 at 320). It goes after the chart and ranking, so
nothing above it moves. Its shades are the existing monochrome accent
ramp (.l0 to .l4) and follow the tab's own Tokens / Cost / Requests
switch, with no new read; a provider or computer picked above narrows it.
A tooltip says the day and its tokens, requests and cost. Weeks with no
call show no card. No animation.

It reads the existing cached /api/usage/heatmap, at most once a minute
and again when a pick changes; the tab's own 10 s reads don't wait for
it, and no endpoint was added. The card, its reads and tooltip live in
plugins/usage/page.js, which shares its grid (heatGridOf, taken out of
drawLedHeat as it was) and tooltip (ledHeatTip, now told the metric and
provider) with the Requests tab. app.js keeps one guarded call in
renderPanelUse: the ledger read can come back before page.js has run, so
page.js draws the tab again when it loads. Both script budgets hold it
at this base with no raise. The card
is .pu-heat, not .pu-card, so the chart's card stays the tab's one
.pu-card. The panel's light pills are its card's white, so a quiet day
there is a 7% shade of the text over the card.

Run (rebased on origin/main 2896e82cc):
- panel-heatmap.test.cjs (new), Chromium and WebKit, en zh zh-TW ja de,
  440 light and 320 dark: 12 of 12, 3 runs on mote. Red 12 of 12 with
  MAGPIE_ASSETS at origin/main's assets.
- Affected files (usage-heatmap, panel-usage, panel-usage-models,
  panel-usage-first-account, panel-currency-provider, panel-units-follow,
  number-units, usage-chart-axis, usage-head-steady, usage-phone-head,
  i18n-keys, phone-no-sideways) and TestCoreScriptBudget: green but
  phone-no-sideways de 375, the same with origin/main's assets (#5869).
- At 2896e82cc again: panel-heatmap, panel-usage, panel-usage-models,
  usage-heatmap, panel-usage-first-account green; i18n-keys red on a
  routing-plugin phrase 2896e82cc's claude_image_budget_test.go added,
  red on origin/main alone (#6877).
- Whole GUI suite on mica at 91b3af847 (concurrency 4): not finished.
  The runner exited 7 with no message twice (after ~2231 and ~2371
  tests); the third part, grip-inset on, is still running, ~10,900
  tests in. None of the red files is touched by this change. Under the
  whole-suite load (#6709, #6782), with their issues:
  agent-details-ready #6369 #6373, agent-switch-accounts #5925,
  claude-quota-onboarding #6179, bark #6543, api-key-theme #6444,
  aside-native #6212, agent-menu-label #6371, allow-ips #4959,
  account-refresh-holds #6003, account-arrange #6010, desktop-tiers
  #6475, quota-refresh-order #6180, provider-max-output and
  provider-many-keys #6209, rest-try-now and key-switch #6232,
  provider-fetch-again, provider-typed, provider-picks-stay,
  provider-models-rest and menu-scroll #6532, omp-roles #6432,
  recovered-file #4320, quota-bars-alike #6700, login-export #6628,
  gateway-key-arrange #6268, first-untick #6660, editor-hints #6156,
  connect-address-kept #6755, recent-call-bodies #6665, quota-credits
  #6807, models-works-only #4391, codex-memories-settings #6372,
  panel-options-fold #6794, reset-providers #6196, quota-curve #6789,
  model-copy-id #4621, modal-backdrop #6663, loop-guard-setting #6662,
  lightweight #6340, keychain-retry #6661, key-replace #3476,
  key-balance-card #6414, gateway-pause #6684, duplicate-pause and
  key-box-once #6424, codex-async-compact #6658, name-suffix-remote
  #5147, menu-input-scroll #3402, rollup-short #6560, remote-magpie
  #6099, plugin-signin-no-url #5938, plugin-signed-out-account #5998,
  plugin-page-foreign-error #6117, plugin-option-placement #6559,
  phone-no-sideways #5869, partners #6664, panel-fold #5796, omarchy
  #4624, old-webkit #6030, model-api-preset #5838, mobile-web #6790,
  library-open-again #6751, key-import #6416, grip-inset #6293,
  fast-ultra and fast-pick #6201, ctx-session-line #5801, context-cap
  #6514, codex-auto-reset #6232, panel-usage-first-account #6181
  (green alone at this head), lan-join #6353, icon-tile #6759,
  model-chip-steady, header-centre, last-page, nav-timeout,
  plugin-card-update #6709. With no issue before, filed as #6876:
  data-folder, plugin-move-unserved, name-suffix-where-named,
  group-editor-selected, found-skill-pick-remove, quota-count-wrap,
  nav-sub-fold, model-suffix-own, account-models,
  account-models-available.
- Looked at screenshots of the panel at 440 and 320, light and dark, en
  zh de ja, with the tooltip shown.

Not tried: the real app's tray panel on macOS, Windows or Linux
webviews, real accounts' usage.
2026-11-16 20:58:35 +08:00
..