Skip to content

Skip setup while setup waits for Automation access can still hide the menu bar afterwards #788

Closed

Description

@M4n0x

What happens

When the placement chosen in setup is waiting for Automation access (it needs System Events to hide or show the macOS menu bar, and access isn't allowed yet), setup checks access again each time StableBar becomes the active app. If Skip setup is confirmed while that check is still running, the check can come back allowed after setup has closed and apply the discarded placement anyway:

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

Steps to reproduce

  1. Show the macOS menu bar (auto-hide off), with StableBar's Automation access to System Events turned off.
  2. Open setup and choose Replace the menu bar. Setup waits for Automation access.
  3. Allow StableBar under System Settings → Privacy & Security → Automation, then switch back to setup.
  4. Right away, press Skip setup and confirm, while the access check is still running.

The window is one access check, up to about 2 seconds when System Events has to be launched first.

Expected

Skip setup leaves the macOS menu bar as it was before setup and the bar as its file describes, also when an access check is still running (the same promise as #497).

Environment

StableBar main at 8a78e88, macOS 27.2.

Evidence

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

Diagnosis

  • SetupSession.cancel() (Sources/StableBar/SetupWindow.swift:662) bumps placementRequest and starts the restore, but leaves placementAwaitingAccess set.
  • SetupSession.refreshAccess() (line 637), which runs on didBecomeActiveNotification, starts a Task that awaits system.automationAccess(false), then does guard access == .allowed, let placement = placementAwaitingAccess else { return }; await place(placement). Nothing there checks whether setup was skipped meanwhile.
  • place(_:) (line 553) starts a new request, so its own placementRequest checks pass, and setMenuBarHidden(_:) (line 602) queues its change after the restore, so the hide lands last. It then sets preferences.placement, whose didSet runs preview().

A fix could make Skip setup clear placementAwaitingAccess (or mark the session closed) so a late check does nothing, with a test that holds the access check open across cancel().

Related

Triaged by Claude Code (Claude Opus 5.5).

Activity

  1. added
    bug
    on Nov 17, 2026
  2. added a commit that references this issue on Nov 18, 2026
    28138bb
  3. stablebar-releases commented on Nov 20, 2026

    @stablebar-releases

    🎉 This issue has been resolved in version 0.18.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