Skip to content

Skip setup while setup is still changing the menu bar lets the change land after setup closes #497

Closed

Description

@M4n0x

What happens

Choosing Replace the menu bar (or Keep the menu bar, when the menu bar hides) asks System Events to hide or show the macOS menu bar. While that call is still running, Skip setup (or Esc) closes setup at once and restores the bar. The pending call then completes:

  • the macOS menu bar hides (or shows) after all, and stays that way;
  • setup records the placement, which previews it again, so the running bar shows the discarded preview until the configuration reloads.

The configuration file isn't changed.

Steps to reproduce

  1. Show the macOS menu bar (auto-hide off) and allow StableBar to control System Events.
  2. Open setup, and on its placement question choose Replace the menu bar.
  3. Press Skip setup, or Esc, before the menu bar hides.

The window is one System Events call, longer the first time.

Expected

Skip setup leaves the menu bar as it was before setup and the bar as its file describes, whatever setup was doing when it was skipped.

Environment

StableBar main at e6d4ea9, macOS 27.2.

Evidence

Found in review of #492 (CodeRabbit), from the code on main; not reproduced in a running app.

Diagnosis

  • SetupSession.place(_:) (Sources/StableBar/SetupWindow.swift:333) drops a stale request after the Automation question (placementRequest, line 341), but not after try await setMenuBarHidden(placement == .top) (line 349). It then sets preferences.placement, whose didSet runs preview() and pushes the session edits to the store again.
  • SetupSession.cancel() (line 416) restores store.sessionEdits, reloads, and starts Task { try await setMenuBarHidden(menuBarHidAtStart) } without waiting for, or invalidating, a placement in flight. That restore can run before the pending hide and see nothing to change.
  • Skip setup doesn't ask first in this state: hasChanges counts a placement only once preferences.placement or menuBarHides has changed, after the call returns.

A fix could serialize setup's menu bar changes, so the restore runs after a pending one, and make place(_:) drop a result that arrives after cancel().

Related

Triaged by Claude Code (Claude Opus 5.5).

Activity

  1. added
    bug
    on Nov 8, 2026
  2. added a commit that references this issue on Nov 8, 2026
    89d0113
  3. stablebar-releases commented on Nov 10, 2026

    @stablebar-releases

    🎉 This issue has been resolved in version 0.12.0 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

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

    bugreleased

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions