Repository navigation
Description
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
- Show the macOS menu bar (auto-hide off), with StableBar's Automation access to System Events turned off.
- Open setup and choose Replace the menu bar. Setup waits for Automation access.
- Allow StableBar under System Settings → Privacy & Security → Automation, then switch back to setup.
- 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) bumpsplacementRequestand starts the restore, but leavesplacementAwaitingAccessset.SetupSession.refreshAccess()(line 637), which runs ondidBecomeActiveNotification, starts aTaskthat awaitssystem.automationAccess(false), then doesguard 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 ownplacementRequestchecks pass, andsetMenuBarHidden(_:)(line 602) queues its change after the restore, so the hide lands last. It then setspreferences.placement, whosedidSetrunspreview().
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
- Skip setup while setup is still changing the menu bar lets the change land after setup closes #497 (fixed by fix: let Skip setup restore the menu bar when a change is still in flight #498, in 0.12.0) covers a menu bar change already in flight when Skip setup is pressed; this is the access check that comes before the change.
- refactor: keep decisions about state in pure state machines, starting with setup's placement #787 moves this logic into
SetupPlacement, where.skippedkeeps the same behavior on purpose; if refactor: keep decisions about state in pure state machines, starting with setup's placement #787 lands first, the fix fits there as a phase that ignores later events. - fix: ask before Skip setup throws away the choices made so far #470 asks before Skip setup throws choices away.
hasChangescounts the awaiting placement, so the confirmation shows, but it doesn't stop the check.
Triaged by Claude Code (Claude Opus 5.5).
Activity
fix: keep Skip setup from applying a placement once Automation access…
chore(release): 0.18.0 [skip ci]
stablebar-releases commentedon Nov 20, 2026
🎉 This issue has been resolved in version 0.18.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀