Skip to content

Fix macOS menu bar label render loop - #12

Merged
skuznetsov merged 1 commit into
mainfrom
codex/fix-menubar-label-refresh
Aug 4, 2026
Merged

Fix macOS menu bar label render loop#12
skuznetsov merged 1 commit into
mainfrom
codex/fix-menubar-label-refresh

Conversation

@skuznetsov-clickhouse

Copy link
Copy Markdown
Collaborator

Summary

  • replace TimelineView in the MenuBarExtra label with one app-owned minute clock
  • share the same clock with quota countdowns in the popover
  • add a deterministic publisher-driven clock test

Root-cause validation

  • merged main release: 100.0% CPU after 9 seconds
  • stable fresh TimelineView anchor variant: 100.0% CPU after 11 seconds
  • timer-based release: 0.0% CPU after 7 seconds and again after 1 minute 17 seconds

The stable-anchor result refutes the narrower claim that a changing .now schedule identity is required. The failure is the self-updating TimelineView inside the MenuBarExtra label; removing that combination fixes the spin.

Verification

  • Swift tests with warnings-as-errors: 38 passed, 0 failed
  • Swift release build with warnings-as-errors: passed
  • runtime before/after CPU probe: passed

Skipped gate

  • no screenshot-based visual confirmation of the status item; screen capture was intentionally not used because it could expose unrelated menu-bar information.

A TimelineView embedded in the MenuBarExtra label kept the status item rendering continuously at 100% CPU, even with a stable schedule anchor. Replace it with one app-owned minute clock shared by the label and quota popover.\n\nVerified with 38 Swift tests under warnings-as-errors, a release build, and runtime CPU samples before and after the first minute tick.
@skuznetsov
skuznetsov merged commit 23284ef into main Aug 4, 2026
1 check passed
@skuznetsov
skuznetsov deleted the codex/fix-menubar-label-refresh branch August 4, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants