Provider-switching shortcuts sometimes need several presses on macOS 27.2.1
I’m using CodexBar 0.85.0 with Merge Icons enabled. Provider-switching shortcuts sometimes take four or more presses to work. Waiting after a missed press doesn’t help. Clicking a tab works, and so does ⌘, to open Settings.
In a small test app using CodexBar’s shortcut listener, I caught a keypress already in the queue while the counter check told the listener not to look. Bypassing the check handled all 13 keypresses across two runs, though it used more CPU while hovering. I haven’t tested the bypass in the full app.
Would it make sense to bypass the counter check only while the merged menu is open on macOS 27, while keeping the existing safeguards against menu freezes?
Possibly related to #5074, though ⌘-number still worked for that reporter.
Codex review: this still needs some work.
Summary Keep this issue open: it reports a concrete shortcut failure in 0.85.0, but the proposed counter-gate bypass needs physical-input proof in the full app before a repair is justified.
Reproducibility: No high-confidence full-app reproduction is established: the reporter supplies a small-app observation without its harness or input method, and this read-only review ran no macOS session.
Next step Obtain the harness and a full-app physical-key trace showing a queued missed shortcut behind a closed gate, then establish a failing regression before choosing a repair.
Review details
Best possible solution:
Restore one-press switching on the affected setup while preserving tracking safeguards and acceptable hover CPU usage.
Do we have a high-confidence way to reproduce the issue?
No high-confidence full-app reproduction is established: the reporter supplies a small-app observation without its harness or input method, and this read-only review ran no macOS session.
Is this the best way to solve the issue?
A macOS-27-only bypass is a plausible experiment, but the safer repair choice depends on tracing physical input through the full app and measuring hover cost without changing the proven freeze safeguards.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
- The small-app experiment does not identify whether input was physical or synthetic or establish the same failure in CodexBar.
- The failing setup's exact OS build, shortcut mapping and Keyboard navigation setting remain unverified.
- Unconditional peeking could restore hover CPU overhead; changing tracking activation or peek mode could reintroduce menu freezes.
Codex review notes: model internal, reasoning medium; reviewed against a26ca57b5186.
Label changes
Label changes:
- add
P2: Intermittent keyboard navigation failure has limited scope and provider tabs remain clickable. - add
impact:ux-friction: Repeated shortcut presses make an existing menu interaction unreliable while in-product mouse navigation remains available. - add
issue-rating: 🦪 silver shellfish: Current issue advisory state selects this label. - add
clawsweeper:no-new-fix-pr: Current issue advisory state selects this label. - add
clawsweeper:needs-maintainer-review: Current issue advisory state selects this label.
Label justifications:
P2: Intermittent keyboard navigation failure has limited scope and provider tabs remain clickable.impact:ux-friction: Repeated shortcut presses make an existing menu interaction unreliable while in-product mouse navigation remains available.
Evidence reviewed
Acceptance criteria:
- Record a missed physical shortcut in the full app with matching counter, tracking, queue and callback observations.
- Establish a failing regression for the isolated delivery defect before implementing a repair.
- swift test --filter 'ProviderSwitcherEventPeekGateTests|StatusMenuSwitcherTrackingTests|StatusMenuSwitcherClickTests'
- make check
- Validate the freshly built bundle for repeated switching, key repeat, Escape, clicks, Settings, menu closure and hover CPU.
What I checked:
- Specific release report with limited experimental proof: The reporter identifies 0.85.0, Merge Icons, repeated missed shortcuts, working tab clicks and Command-comma, and a small-app experiment handling 13 keypresses with the gate bypassed; the bypass has not been tested in CodexBar.
- Current-main delivery boundary: The checkout matches the verified main SHA; the listener returns before inspecting the queue when shouldPeek is false, and unchanged counters eventually exhaust its two-empty-peek budget unless a key has already been observed as held. (
Sources/CodexBar/StatusItem/StatusItemController+ProviderSwitcher.swift:120, a26ca57b5186) - Designed shortcut behavior: Documentation defines left/right as previous/next and Command-number as visible-position selection, with configurable mappings; this is an existing menu capability. (
docs/configuration.md:441, a26ca57b5186) - Coverage does not establish OS delivery: Gate tests inject counters and explicitly expect suppression after empty peeks; the arrow navigation test invokes performKeyEquivalent directly rather than exercising physical input through the tracking observer. (
Tests/CodexBarTests/ProviderSwitcherEventPeekGateTests.swift:15, a26ca57b5186) - Related report supplies competing explanations: https://github.com/steipete/CodexBar/issues/5074 concerns arrow focus movement with working Command-number shortcuts. Lemelson reports successful physical arrows on another macOS 27.2 build and warns that CGEvent.postToPid does not advance the counters; steipete requests a failing trace and rejects speculative activation changes.
- Counter gate has measured performance motivation: Merged https://github.com/steipete/CodexBar/pull/1397 introduced the gate to avoid expensive nextEvent calls during mouse-hover passes, citing a live sample with 1,348 main-thread samples in that path. (
Sources/CodexBar/StatusItemController+ProviderSwitcher.swift, eda747ba6d42)
How this review workflow works
- ClawSweeper keeps one durable marker-backed review comment per issue or PR.
- Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
- A fresh review can be triggered by eligible
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch. - PR/issue authors and users with repository write access can comment
@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only. - Maintainers can also comment
@clawsweeper reviewto request a fresh review only. - Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge; those execution lanes are retired.
- Maintainers can comment
@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.
Reviewed November 29, 2026, 5:46 PM ET / 22:46 UTC.