mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-10-21 05:23:19 +00:00
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 |
||
|---|---|---|
| .. | ||
| Data | ||
| Resources/ProviderIcons | ||
| Security | ||
| Theme | ||
| Views | ||
| AppStore.swift | ||
| AppVersion.swift | ||
| CapacityDockController.swift | ||
| CapacityDockMotion.swift | ||
| CapacityDockPlacement.swift | ||
| CapacityDockPointerUpdateCoalescer.swift | ||
| CodeBurnApp.swift | ||
| CurrencyState.swift | ||
| MenubarScope.swift | ||
| MenubarSecondRow.swift | ||
| ProviderIcon.swift | ||
| QuotaRefreshDecision.swift | ||
| RefreshCadence.swift | ||
| SessionCountLabel.swift | ||
| StatusItemContextMenuPolicy.swift | ||
| StatusItemPlacementPolicy.swift | ||