A second click on the Control Center widget doesn't close Control Center

Open Beginner friendly
#998 0 comments 0 reactions 0 assignees View on GitHub

@MaHofseth is already working on this.

Since Dec 4, 2026.

  • #999 by @MaHofseth — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
macos, swift
Domain
backend, desktop

Research direction

Start in Sources/StableBar/MenuBar/AppMenu.swift, reading openControlCenter() and its showsPanel check alongside issue #311. Reproduce by adding the controlCenter widget, then clicking it twice on macOS; the second click should close Control Center. Check the behavior on macOS 26 and earlier as well, since the issue says those versions have not been tested.

Written by the indexing model from the issue text.

Description

needs-triage

What happens

A click on the controlCenter widget opens macOS Control Center. A second click on the widget does nothing: the panel stays open until a click lands somewhere else.

Steps to reproduce

  1. Add a controlCenter widget to the bar.
  2. Click it. Control Center opens.
  3. Click it again.

Expected

The second click closes Control Center, as a click on Control Center's own menu bar item does. #311 lists this in its checks: "Clicking the ellipsis or the Control Center button again closes what it opened."

Environment

  • StableBar 0.20.0, and a build of main at e3b72d9
  • macOS 27.2.1
  • One display, AeroSpace running

Evidence

Probes on macOS 27.2.1:

  • A click on the bar while Control Center's panel shows reaches the bar and leaves the panel open. macOS does not treat it as a click outside the panel.
  • A second press of the Control Center menu bar item closes the panel.
  • A press during the panel's fade-out, about 300 ms, is ignored.

Diagnosis

AppMenu.openControlCenter() in Sources/StableBar/MenuBar/AppMenu.swift returns early when showsPanel finds Control Center's panel on screen. #311 added that guard so that the click that closes the panel doesn't reopen it, which assumes macOS closes the panel on that click. On macOS 27.2.1 it doesn't, so the guard swallows the second click and nothing closes the panel.

Removing the guard, so every click presses the menu bar item, makes the widget a toggle on macOS 27.2.1. Not checked on macOS 26 and earlier, where the click on the bar may still close the panel by itself.

Related

  • #311 added the widget and the guard.
  • #620 and #622 are about the native menu bar showing when Control Center opens, a different problem.
  • pressUnlessOpen in the same file has the same "already open, do nothing" check for Menu bar items; not checked here.

Triaged by Claude Code (Claude Fable 5.2).

Dominant language
Swift
Stars
184
Forks
12
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Seb-GRAF/StableBar

All issues in Seb-GRAF/StableBar

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.