Skip to content

macOS 26.6.2: normal quit leaves blank menu-bar slots in CodexBar 0.67.0; autosaveName reset reproduces it #4021

Description

@mymatejackson

Summary

Normally quitting CodexBar can leave its old ControlCenter-hosted status-item window behind as a blank Item-0. Relaunch creates a new working icon beside it. Repeated cycles accumulate gaps and displace other menu-bar icons toward the notch.

Confirmed on official CodexBar 0.67.0 (158): the first newly measured normal quit/relaunch cycle left the exact previous window behind. The app exited normally, but window 1360 changed from codexbar-merged to blank Item-0; relaunch created working window 1515 beside it. Visible hosted slots increased from 15 to 16. Previously, three of four tested 0.66.0 (156) cycles and both tested 0.65.0 (154) cycles failed.

A separate minimal AppKit app isolates the trigger: clear the status item's autosaveName, remove it, and immediately terminate. Keeping the name intact in otherwise equivalent controls leaves no blank slot. This also reproduces inside applicationWillTerminate.

Environment

  • macOS 26.6.2 (25G83), MacBook Pro; merged icons enabled, percentage display.
  • 0.67.0 positive: built-in display, 2056 logical points wide, 2× scale. Earlier positives also occurred on an external LED Cinema display at 2560×1440, 1× scale.
  • No Bartender, Ice, or Hidden Bar installed/running. No custom global menu-bar spacing/padding setting found. CodexBar's menu-bar preferences were normal; no preference correction was made.
  • Latest official release checked 26 September 2026: 0.67.0 (158). The installed bundle has Peter Steinberger's Developer ID signature, a stapled notarization ticket, and passes Gatekeeper assessment.

Reproduction

  1. With CodexBar running, record its codexbar-merged window ID using CGWindowListCopyWindowInfo (ControlCenter, layer 25).
  2. Request ordinary termination using NSRunningApplication.terminate() and confirm the app exits. No force kill is needed.
  3. In failing cycles, the same window ID remains as blank Item-0. Relaunch adds a new working codexbar-merged window; repeat to see accumulation.

Expected: the old host disappears after normal quit, and the new launch preserves placement without adding a blank slot.

Official release/cycle Old window After normal quit and relaunch New working window
0.67.0 cycle 1 1360 Retained blank Item-0 1515
0.66.0 cycle 1 7463 Removed correctly 7469
0.66.0 cycle 2 7469 Retained blank Item-0 7498
0.66.0 cycle 3 7498 Retained blank Item-0 7507
0.66.0 cycle 4 7507 Retained blank Item-0 7541

The outcome follows the exact old window ID; generic names and total window counts alone are insufficient because other system items change independently.

0.67.0 lifecycle evidence

At 17:39:32 local time on 26 September, AppKit approved normal termination, ControlCenter changed host identity from com.steipete.codexbar-codexbar-merged-44914 to com.steipete.codexbar-Item-0-44914, CodexBar completed termination, and ControlCenter then stopped tracking the renamed host. No matching ephemeral-displayable removal followed. The exact old window 1360 remained through relaunch as blank Item-0.

Source correlation

PR #3723 introduced clearing autosaveName before removal to preserve saved placement. That is the native sequence isolated here. The 0.67.0 removal helper is reached by shutdown from applicationWillTerminate.

Between 0.66.0 and 0.67.0, these relevant files changed only by two unrelated credential-notification cleanup calls in cancelShutdownTasks; the item-removal helper and identity-reset sequence are unchanged. Current main adds opt-in startup hosting diagnostics in PR #4012 for the different never-hosted-at-startup report #3377. That PR explicitly makes no runtime hosting fix and does not change this shutdown removal path. A fresh bounded issue search found no exact retained-after-exit duplicate.

Please investigate preserving host identity during actual termination without regressing saved icon positions. A regression check needs both successful old-window removal and preserved placement on relaunch. Preference-only tests miss this failure. A locally tested candidate source patch is included in the evidence archive, but the installed app remains the official build.

Attachments prepared

  • Minimal AppKit reproducer and Info.plist
  • Sanitized 0.67.0 and 0.66.0 per-cycle results
  • Focused AppKit/ControlCenter lifecycle logs
  • Native saved-position controls
  • Candidate source patch and isolated validation results

No account identifiers, credentials, home-directory paths, or full-desktop screenshot are needed to reproduce or explain this report.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal priority bug or improvement with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions