codeburn/mac/Sources/CodeBurnMenubar
ozymandiashh 016b8edaef feat(menubar): optional second row in the macOS menu bar item
The menu bar item could show one figure, so seeing subscription quota and
today's local usage at the same time meant opening the popover. This adds an
optional second line, off by default, configured from the existing
Settings > General > Display section: a "Second row" toggle plus a picker for
what it shows. All four metrics are figures the app already computes for the
popover, so nothing here adds a fetch or a refresh cadence: quota remaining
with its reset countdown for whichever connected provider is nearest its limit
(the same provider the flame already tints for), today's all-provider cost,
today's total tokens, or running sessions.

The rows are one attributed title. A paragraph style clamps text line height
but not an attachment, so the inline flame at the text's own point size dragged
the title to 24pt and AppKit clipped the second line away; the flame is
requested at 8pt and seated back inside the line, which puts every row
combination at exactly 20pt inside the standard 22pt menu bar, centred with 1pt
of slack above and below. Measured with NSAttributedString.boundingRect and
asserted in the tests, since those four numbers only work together.

With the setting off, or whenever the chosen metric has no data yet (no
connected provider with a quota window, no today payload, a CLI that predates
the liveSessions block), the title falls back to the previous single-row
composition unchanged: same font, same attributes, no paragraph style. The row
formatting is a pure type over the row settings and a plain-value payload
snapshot, so it is covered without an AppStore or a status item.

This is a deliberately reduced slice of the request. Not included: the layout
editor, presets, live preview, a third row, multiple items or aligned columns
per row, per-item provider/period/scope, optional labels, decimal precision,
reordering and text size. Keeping the formatter pure leaves room for those
later without touching the rendering path.

Closes #1252
2026-09-12 06:37:46 -07:00
..
Data fix(quota): reject a Copilot host carrying a URL delimiter 2026-09-12 06:14:26 -07:00
Resources/ProviderIcons feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
Security fix(mac): prefer the node beside the CLI over a version manager's default 2026-09-07 10:16:48 +08:00
Theme Harden menubar: fix refresh loop, concurrency, data sync, and edge cases 2026-05-01 08:01:25 -07:00
Views feat(menubar): optional second row in the macOS menu bar item 2026-09-12 06:37:46 -07:00
AppStore.swift feat(menubar): optional second row in the macOS menu bar item 2026-09-12 06:37:46 -07:00
AppVersion.swift Normalize menubar version display 2026-05-11 11:21:39 -07:00
CapacityDockController.swift fix(dock): scope the glance Today row to the hovered provider 2026-09-03 08:32:20 -07:00
CapacityDockMotion.swift feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
CapacityDockPlacement.swift fix(menubar): keep Capacity Dock hover alive after app deactivation (#1170) 2026-08-29 18:42:27 +02:00
CapacityDockPointerUpdateCoalescer.swift Fix Capacity Dock pointer coalescing and dismissal 2026-09-01 16:51:00 +05:30
CodeBurnApp.swift feat(menubar): optional second row in the macOS menu bar item 2026-09-12 06:37:46 -07:00
CurrencyState.swift perf(desktop): share cache state and eliminate duplicate cold hydration 2026-08-12 17:16:41 +03:00
MenubarScope.swift feat(menubar): add Local/Combined usage toggle (#566) (#568) 2026-06-28 22:01:01 +02:00
MenubarSecondRow.swift feat(menubar): optional second row in the macOS menu bar item 2026-09-12 06:37:46 -07:00
ProviderIcon.swift feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
QuotaRefreshDecision.swift fix(mac): keep dock quota fresh when the payload tick is skipped 2026-09-12 03:47:46 -07:00
RefreshCadence.swift menubar: skip unchanged background refreshes, 120s AC idle cadence, utility QoS for tick spawns (#703) (#704) 2026-07-16 15:11:25 -07:00
SessionCountLabel.swift fix(usage): fold Windows case in spend identity, qualify --json counts, drop scratch tests 2026-09-07 14:56:32 -07:00
StatusItemContextMenuPolicy.swift test(mac): lock status-item context menu policy (#802) 2026-07-24 19:27:25 +07:00
StatusItemPlacementPolicy.swift fix(menubar): recover parked status item (#1161) 2026-08-28 13:20:48 -07:00