Files
magpie/internal/settings
yetone 7ea1e6a4b3 usage: the tray panel and the TUI leave out what the Usage page hides
onkashiko on X: a provider whose allowance card was hidden in the main
window (Usage > Overview, "Hide from Overview") still showed in the menu
bar's panel. The panel's Allowances tab had only its own Arrange list
(panelUsageHidden) and read the full cards.

Now the panel leaves out a card whose cardHideKey is in usageCardsHidden
and the rows in usageWindowsHidden (withoutHiddenRows), as Overview does;
a menu bar cell's card still shows (panelPeek). A subscription whose
every card the page hides counts in the foot's "{n} hidden" and shows as
hidden in Arrange; Show there
also drops its keys from usageCardsHidden, since the panel follows the
page. All of it is panelPageCut in the Usage plugin's page.js, which every
window loads, so the core scripts get no bigger (TestCoreScriptBudget
unchanged). Hiding from the panel alone still leaves the page as it is. The
panel reads settings again each time it is shown (loadBack), so a hide or
unhide in the main window reaches it with no restart.

Siblings: magpie tui's Usage page leaves out the same cards and rows
(usageShown, read at every quota read). The menu bar's cells and tooltip
show only the cards picked in Settings, so they keep a hidden card as
before; routing, caps and counting are unchanged.

Run:
- panel-page-hidden.test.cjs (new): chromium + webkit, en/zh/zh-TW/ja/de,
  10/10 green; red on the old app.js/panelarrange.js (cards still drawn).
- TestUsagePageLeavesOutWhatTheAppHides (new): green; red on the old
  pages.go (balance, account and row still listed).
- GUI: the 128 files that read the panel, Usage or tray code, chromium +
  webkit, every language, on mote: 17 files red, rerun alone at
  concurrency 1 here 123/449 red and at origin/main 015860f2d 122/449,
  the same tests but tray-cell-click's chromium en, which is red alone on
  main too (#5215); the rest noted on #5475. tray-cell-click + panel-arrange +
  panel-page-hidden together before the last rebase (no GUI file changed
  in it): 21 of 22, the one red tray-cell-click's (#5215). At this head
  (after the move into page.js): panel-page-hidden, panel-arrange,
  panel-balance-order and i18n-keys green; the reds in key-balance-card
  (de), panel-fold, tray-cell-click (zh) and usage-cards-hide are each
  in the origin/main 015860f2d record above.
- Full suite (go test -tags nogui -count=1 -timeout 45m ./...) on mica
  under suite.lock at 734f06b64 (this change before the move into
  page.js): 97 packages ok; internal/gui red only on TestCoreScriptBudget
  (fixed by the move), internal/gateway red from "too many open files in
  system" at mica's load ~65. At this head on mote: internal/gateway,
  internal/gui, internal/tui, internal/settings and internal/redact (the
  one commit rebased over) ok; gofmt -l clean; go vet, GOOS=linux go vet
  -tags nogui and GOOS=windows go vet ./... clean; go build ok.
- Rebased onto origin/main 667ac8bd6 (5faed634d): internal/gui (budget
  included), internal/tui and internal/settings ok on mote;
  panel-page-hidden + panel-arrange 18 of 18.
Not tried: the real tray panel by hand on a live install.
2026-11-14 14:10:24 +08:00
..
tray: the menu bar shows several subscriptions' usage side by side (KevinXC on Discord) — Settings → Usage in the menu bar picked one card; its menu now ticks any number (kept open while ticking, saved once when it closes, Off unticks all, a ticked card that has gone stays listed to untick) and the pill says "3 subscriptions". settings.TrayUsages keeps them in order; a file with only the older trayUsage shows that one, and trayUsage is still written as the first for an older magpie. On the Mac the bird and a cell per card are drawn as one image by AppKit on the status item's button: the card's logo (a black glyph tinted in the menu bar's text colour, a coloured one as it is, the name's letter in a ring when there is none) and its two windows stacked, "42%" over "18%", in the bar's colour light or dark and sharp at any scale; the bird's flap goes through it. Arc flags run into numbers (Codex's logo) are spaced out for AppKit's SVG reader. A row longer than 10 characters (a plan's balance read from its page) is cut with an ellipsis in the bar and whole in the tooltip. Windows and Linux show the cards as text, " | " between them. TestTrayUsageCells, TestSVGArcFlags, TestTrayImage (darwin, renders 0-3 cards light and dark at 2x), TestTrayUsagesMigrate and tray-usages.test.cjs (Chromium, WebKit, en/zh) are new. go vet, go build (darwin GUI), go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./..., go test ./internal/gui pass; tray-usages, settings-groups, panel-*, click-scroll, old-webkit pass. Not seen in a live menu bar.
2026-09-30 19:45:44 +08:00