codeburn/mac/Tests/CodeBurnMenubarTests
ozymandiashh a08dfec842 fix(menubar): make the two-row height a fit contract, not an exact figure
CI's swift test on macos-latest measured the two-row title at 21pt where this
machine measures 20pt, so the exact-equality assertion failed 16 times. The
figure is release-dependent: SF Symbol metrics and line rounding move between
macOS versions. Nothing positions the rows off it — AppKit's button cell
centres whatever it measures inside the status item — so 21pt is centred just
as correctly as 20pt, and the requirement was always "fits a 22pt menu bar",
not "measures exactly 20pt". The test now asserts that band, and
twoRowMeasuredHeight is replaced by twoRowMaximumHeight (the bar) and
twoRowMinimumHeight (a floor, so a lost paragraph clamp or a dropped second
line is still caught rather than passing as "fits").

The 1pt delta does expose a real risk the constant was hiding: the first line's
height follows the flame image, and the image size for a point size is the
system's business. A release that renders it taller could push the title past
the bar. The two-row attachment box is now computed by
twoRowAttachmentBounds(imageSize:), which scales the image down to the clamped
line height — never up — so the first line cannot outgrow its clamp. Verified
by composing the real title with the flame forced to 11, 13, 16 and 24pt tall:
every combination still lays out at 20pt here. The single-row path keeps the
raw image size and its -3pt offset, so it stays byte-identical.
2026-09-12 06:37:46 -07:00
..
AgentTabProviderVisibilityTests.swift fix(menubar,app): absent hasUsage hid every provider with no period spend 2026-09-02 07:32:02 -07:00
AntigravityQuotaPresentationTests.swift feat(menubar): live Antigravity quota — local language-server probe, Settings pane, Plan tab 2026-08-24 09:40:04 -07:00
AntigravityQuotaTests.swift feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
AppStoreCopilotDisconnectTests.swift fix(mac): preserve explicit Copilot disconnect across refreshes 2026-09-09 16:17:15 +05:30
AppStoreRefreshConcurrencyTests.swift fix(menubar): a twice-contradicting scoped payload threw instead of being served 2026-09-02 07:54:55 -07:00
AppStoreRefreshRecoveryTests.swift fix(menubar): the selection fallback showed another provider's totals under the selected tab 2026-09-02 07:55:43 -07:00
AppVersionTests.swift Normalize menubar version display 2026-05-11 11:21:39 -07:00
CapacityDockConnectionActionTests.swift feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
CapacityDockGlanceTests.swift fix(mac): give the glance's staleness line a section of its own 2026-09-03 07:19:35 -07:00
CapacityDockInteractionStateTests.swift feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
CapacityDockMotionTests.swift feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
CapacityDockPlacementTests.swift fix(menubar): keep Capacity Dock hover alive after app deactivation (#1170) 2026-08-29 18:42:27 +02:00
CapacityDockPointerUpdateCoalescerTests.swift Fix Capacity Dock pointer coalescing and dismissal 2026-09-01 16:51:00 +05:30
CapacityDockPreferencesTests.swift test(menubar): default-scale expectation follows the 60 percent default 2026-08-31 10:57:35 -07:00
CapacityDockPresentationTests.swift Merge main into fix/dock-detail-integral-height 2026-09-03 06:36:15 -07:00
CapacityDockProviderQuotaServiceTests.swift feat(mac): add native Grok Build provider 2026-09-01 18:46:02 +05:30
CapacityDockTodayTests.swift fix(dock): a tile can stand for more than one provider row 2026-09-03 09:21:23 -07:00
CapacityEstimatorTests.swift feat(mac): native Swift menubar app + one-command install 2026-04-17 16:55:56 -07:00
ClaudeRateLimitTests.swift menubar: honor Retry-After on Claude quota 429s, back off failed refreshes (#702) 2026-07-16 14:52:47 -07:00
ClaudeSubscriptionParsingTests.swift fix(menubar): provider-correct plan tab copy; surface model-scoped weekly limits 2026-07-02 19:37:51 +02:00
CLIDevinConfigTests.swift feat: add devin provider (#444) 2026-06-09 21:58:31 +02:00
ClinePassQuotaTests.swift feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
CLIWatchdogTests.swift fix(menubar): no-output watchdog, lock signal cleanup, dead-pid takeover, serve orphan reaping 2026-08-23 05:35:17 -07:00
CodeBurnCacheDirectoryTests.swift perf(desktop): share cache state and eliminate duplicate cold hydration 2026-08-12 17:16:41 +03:00
CodeburnCLIPathTests.swift fix(mac): prefer the node beside the CLI over a version manager's default 2026-09-07 10:16:48 +08:00
CodexPlanParsingTests.swift feat(codex): show the credit limit on credit-metered ChatGPT workspaces 2026-07-27 08:19:59 -04:00
CodexQuotaSummaryTests.swift fix(codex): align credit/dollar footer formatting across desktop and menubar 2026-08-01 22:32:53 +02:00
CodexResetCreditsTests.swift menubar: surface Codex limit-reset credits (count and next expiry) in the Plan tab (#723) (#724) 2026-07-17 05:58:21 -07:00
CodexTerminalFailureTests.swift test(menubar): lock in Codex terminal-failure classification 2026-05-30 12:32:19 -07:00
ContributionHeatmapTests.swift fix(menubar-tests): add missing localModelSavings/savingsUSD args so swift tests compile (#465) 2026-06-09 21:56:13 +02:00
CopilotHostEndpointTests.swift fix(quota): reject a Copilot host carrying a URL delimiter 2026-09-12 06:14:26 -07:00
CopilotQuotaPresentationTests.swift fix(menubar): follow the credential's GitHub host for Copilot quota 2026-09-12 05:56:05 -07:00
CopilotQuotaTests.swift fix(menubar): follow the credential's GitHub host for Copilot quota 2026-09-12 05:56:05 -07:00
CredentialKeychainCacheRedTests.swift fix(menubar): migrate Claude/Codex caches to namespaced Keychain 2026-08-19 15:21:28 +05:30
CredentialKeychainContinuityTests.swift feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
CursorQuotaTests.swift fix(menubar): harden the Cursor quota adapter 2026-08-29 14:17:15 -07:00
DataClientProcessTests.swift fix(menubar): no-output watchdog, lock signal cleanup, dead-pid takeover, serve orphan reaping 2026-08-23 05:35:17 -07:00
GeminiQuotaTests.swift test(menubar): align Gemini retired-tier expectation with the em-dash-free message 2026-08-24 10:08:33 -07:00
GrokBuildSubscriptionServiceTests.swift fix(mac): treat omitted Grok credit percent as 0% in an active window 2026-09-02 15:06:17 -07:00
KimiQuotaPresentationTests.swift fix(menubar): keep showing Kimi quota when the login is idle, stamp stale data 2026-07-26 06:35:13 -07:00
KimiUsageParsingTests.swift menubar: add Kimi Code subscription quota tracking 2026-07-23 21:31:55 +02:00
LiveKeychainCredentialCacheTests.swift fix(menubar): never let a Keychain read raise UI on the refresh timer 2026-08-19 11:43:22 -07:00
MenubarPayloadCombinedTests.swift fix(usage): preserve project identity and qualify incomplete session counts 2026-09-07 22:02:54 +05:30
MenubarPeriodSettingsTests.swift fix(clients): display CLI-computed values verbatim, align period windows across app/dash/menubar 2026-07-20 06:26:15 -07:00
MenubarSecondRowTests.swift fix(menubar): make the two-row height a fit contract, not an exact figure 2026-09-12 06:37:46 -07:00
MenubarStatusCacheTests.swift feat(menubar): add Local/Combined usage toggle (#566) (#568) 2026-06-28 22:01:01 +02:00
ProviderConnectionCatalogTests.swift feat(mac): add native Grok Build provider 2026-09-01 18:46:02 +05:30
ProviderIconTests.swift feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
ProviderReconnectPresentationTests.swift fix menubar provider usage contracts 2026-09-02 16:17:28 +05:30
ProviderSettingsEditorStateTests.swift fix(mac): document the main-queue serialization and harden the deadlock test cleanup 2026-09-01 04:58:16 -07:00
ProviderStripPagingStateTests.swift harden provider period and cache contracts 2026-09-02 16:18:05 +05:30
QuotaPaceTests.swift menubar: linear pace on Codex quota windows — deficit/reserve, projection, run-out ETA (#726) (#728) 2026-07-20 05:21:43 -07:00
QuotaRefreshDecisionTests.swift fix(mac): keep dock quota fresh when the payload tick is skipped 2026-09-12 03:47:46 -07:00
QuotaSummaryHeadlineTests.swift feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
RefreshCadenceTests.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
ServeConnectionTests.swift prevent provider-scoped false zeros 2026-09-02 19:16:08 +05:30
SessionCountLabelTests.swift fix(usage): fold Windows case in spend identity, qualify --json counts, drop scratch tests 2026-09-07 14:56:32 -07:00
StatusItemContextMenuPolicyTests.swift test(mac): lock status-item context menu policy (#802) 2026-07-24 19:27:25 +07:00
StatusItemPlacementPolicyTests.swift fix(menubar): recover parked status item (#1161) 2026-08-28 13:20:48 -07:00
TerminalLauncherTests.swift feat(menubar): add preferred terminal setting with Terminal.app fallback 2026-08-04 00:19:00 +03:00
UpdateCheckerTests.swift fix(menubar): clarify update failure status 2026-07-26 15:20:13 +08:00
UpdateNotificationTests.swift feat(mac): notify when an update is available 2026-09-10 12:39:38 -07:00
UsageDataChangeGuardTests.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
ZaiQuotaTests.swift fix(mac): map Z.ai body auth errors 2026-08-31 13:51:46 -03:00