Repository navigation
Conversation
macOS 27 delivers a status item click at the middle of the item, with the release already sent while the button is still down. So a press on the end ring landed on the countdown and a hold never lasted. Read the pointer and button state ourselves, and draw the ring and pills in the label colour so they show on a light menu bar.
…d closes Only an event at the middle of the item's window is moved to the pointer, so an accurate click that sat in the queue keeps its place. The hold now checks that the button is still down when the ring closes, so a release just before the deadline can't still end the session. Tests for both.
|
Tested on macOS 27.0.1 (26A434): built main (db9085e) with this PR merged on top. Press-and-hold on the end ring now ends the session, and a quick click doesn't. Keyboard backlight is also restored after lid open on this build (it wasn't on v0.1.0). |
|
Tested this on macOS 27.0.1, MacBook Air M4 (Xcode 27.0), built from
The last one is the global mouse monitor in |
On macOS 27 a click on the status item also reaches the global mouse monitor, which collapsed the open pills before a pill could take the click. Ignore global clicks that land on the item's own window.
|
@BurakErdemci thanks for testing. The pill case was the global click monitor: I pushed a fix in a2cec5d that ignores global clicks landing on the item's own window. One question: does the 1–2 s delay when you click the countdown also happen on |
|
@robbopp thanks for testing as well. Good to know the hold works and a quick click doesn't on macOS 27.0.1 (26A434). |
|
Retested on a clean checkout of
On the 1–2 s delay: it isn't click latency. I logged mouse down/up and the status item's width (through accessibility, 50 Hz) over four sessions. The end ring appeared 4.6–4.8 s after the countdown did, every time, with or without a click on the countdown (one run had no click at all). That is the Not run: single click on the ring, light menu bar. |
Removes a build warning about reading the host view's frame off the main actor.
|
@greptileai review |
…7 and shows on a light bar
End-to-end test in a VM on macOS 27.0.1Hold-to-end works with this PR on macOS 27.0.1, and the ring now shows on a light menu bar. Holding the ring for 1.5 s ended the session in 6 of 6 tries, on a light and on a dark menu bar. On main the same hold ended it in 0 of 6. The press landed on the countdown and opened the duration pills instead, as the PR describes. On a light menu bar, main's white ring almost disappears; this PR draws it dark. SetupA Tart VM on the maintainer's Mac mini, macOS 27.0.1 (26A434) with Xcode 27.0. Each version was built from source and installed with Main (76e517d) against this PR's head (2ffa415). The scripts ( Results
On a light bar during a session, main on top and this PR below: On a dark bar, main on top and this PR below: 0.7 s into the hold, this PR (the ring pressed): After the hold on main (the pills opened): An earlier run that held 4 s after SleepDisabled turned 1, without waiting for the log line, gave 0 of 3 on main and 2 of 3 on this PR. Its first PR hold did not end the session, and the log doesn't say why. That run is in Not covered
The full logs are 🤖 Generated with Claude Code |
|
Thanks for this. Two things to fix before it can merge. Both are edge cases in the new click handling, where a click or a hold can do the wrong thing. 1. The macOS 27 correction can also move a real macOS 26 click
Fix: apply the correction only on the macOS 27 path that relays the click. Add a test with an accurate event at the middle of the window while the live pointer is somewhere else, and check that the event passes through unchanged. 2. Sliding off just before the ring closes can still end the sessionIn Fix: record the pointer position when the hold begins, and check the live distance from it before Push the fixes as new commits on this branch (no rebase or force-push). CI, Greptile and the Codex review then run again on the new head. My VM test above covered 🤖 Generated with Claude Code |
…he deadline cancels the hold On macOS 26 an event at the middle of the item is a real click, so the local monitor now exists on macOS 27 and later only. When the ring closes it also checks how far the pointer moved since the hold began, so a slide made after the last poll still cancels. Tests cover both, and the release checklist gets a macOS 26 line.
|
@krishhgg thanks. Both are fixed in e537b3a, as a new commit on this branch.
I also added a macOS 26 line to the Menu bar checklist in |






Refs #60. This overlaps with #76 and touches
StatusItemController.swifttoo, so the two will conflict. I'm putting it up as another way to fix it.On macOS 27 a click on the status item arrives as a mouseDown/mouseUp pair at the middle of the item, with the release already sent while the button is still down. So a press on the end ring hit the countdown, and a hold couldn't last.
A local event monitor now puts the click back at the real pointer (
NSEvent.mouseLocation) and holds the release back untilNSEvent.pressedMouseButtonssays the button is up, sending drags in between so sliding off cancels. Press-and-hold stays as it was. Where the system already reports the right position and release, events pass through untouched. The event has to be replaced before dispatch: SwiftUI reads the location from the window's current event, not from the one passed tomouseDown.I also switched the ring and pills to the label colour. They were fixed white and charcoal, so the ring was nearly invisible on a light menu bar.
Tests: event tests for hold, short tap, slide-off and the eye and countdown clicks (events sent at the item's centre with an instant release, like macOS 27), plus a light/dark ink check. I ran the UI tests locally and left the full suite to CI.
By hand on a MacBook Pro (M1), macOS 27.0.1, light menu bar: holding the ring ends the session. Not tried: macOS 26, a dark menu bar by hand, an external display. I added a line to the real-Mac checklist.


Confidence Score: 5/5
The PR appears safe to merge; no blocking issues remain.Summary
Fixes menu bar clicks and press-and-hold on macOS 27, and makes the ring and pills follow the label colour.
No new actionable issues found. AppKit tests and visual checks could not run in this Linux environment.
Reviews (7) · Last reviewed commit: "Menu bar: the click correction is macOS ..." · Reviewed by Greptile