You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: keep the bar above the menu bar strip when a full-screen window sits at the menu bar level - #730
On macOS 27 with a notched display and the menu bar hidden, a window that another app keeps at the main menu level over the whole display (here, one screencaptureui left behind) counted as a shown menu bar. The bar then stayed at .floating, below MenuBarAgent's reveal strip, so clicks on its top 33 pt showed the macOS menu bar instead of reaching widgets.
MenuBarStripState counts a window at the main menu level as a shown menu bar only when it is menu-bar sized (less than a quarter of the display's height), the same limit the strip check already uses. The real menu bar, shown or sliding in, still counts, so a revealed menu bar still covers the bar.
Testing
Added menuBarStripRaisesTheBarAboveAFullScreenWindowAtTheMenuBarLevel: a full-screen screencaptureui window at layer 24 beside a hidden menu bar leaves the bar raised.
My local Xcode (26.1.1) can't build current main (unrelated type-check errors in FeltPen.swift and SetupTour.swift), so I couldn't run swift test. I compiled MenuBarStripState on its own with the new case and the existing shown, sliding and hidden cases: the new case failed before the change and all pass after it. CI runs the full suite.
On the affected Mac, removing the stray screencaptureui window made the running bar rise to layer 26 and take clicks again, which confirms the cause.
…sits at the menu bar level
A window at the main menu level that covers the whole display, such as one screencaptureui
left behind, counted as a shown menu bar. The bar then stayed below MenuBarAgent's strip on a
notched display, and clicks on its top half showed the menu bar instead of reaching widgets.
Count only a window of the menu bar's size as a shown menu bar, as the strip check already does.
Fixesstablebox#728
No actionable comments were generated in the recent review.
Walkthrough
Menu bar detection now applies a display-height limit to windows considered visible menu bars. A test checks that a full-display Screenshot window does not prevent the bar from being raised when the menu bar is hidden.
Menu bar and strip detection now require a window to be shorter than one quarter of the display height. A test verifies that a full-display screencaptureui window does not prevent the bar from being raised.
Severity of issue fixed: Medium
Merge Risk: Minimal · up to 3f069
This change stops a full-screen non-menu-bar window at the menu bar's level from being treated as a visible menu bar. That lets clicks reach the bar's widgets again when the menu bar is hidden. A real menu bar, including one sliding into view, is still detected. No concrete merge-blocking risk was found.
Pre-merge checks: 3
Check name
Status
Explanation
Description check
The description follows the repository template. It has Problem, Changes, Testing, and Merging sections, and it ends with the model and harness line. The Problem section states the bug and links Fixes…
Linked Issues check
Issue #728 requires that a full-screen non-menu-bar window at layer 24 not count as a shown menu bar, while a real visible menu bar still keeps the bar below it. At head, MenuBarStripState.init (Sou…
Out of Scope Changes check
The whole-PR diff (merge base 095b059 to head 3f069d5) changes only Sources/StableBar/MenuBarStrip.swift (+4/-2) and adds one test in Tests/StableBar/MenuBarStripTests.swift (+9). The source change ad…
Full details: Description check
Explanation
The description follows the repository template. It has Problem, Changes, Testing, and Merging sections, and it ends with the model and harness line. The Problem section states the bug and links Fixes #728. The Changes section explains the menu-bar-sized limit and why the real menu bar still counts. The Testing section names the new test, gives the reason swift test could not run, reports a manual check on the affected Mac, and reports commitlint. The Merging section says one commit and any merge method works. Minor gap: the Testing section does not include a screens bot image or scene update, and the template asks for one when a visible change exists. This change alters window detection logic, not visible UI, so the gap is not critical.
Full details: Linked Issues check
Explanation
Issue #728 requires that a full-screen non-menu-bar window at layer 24 not count as a shown menu bar, while a real visible menu bar still keeps the bar below it. At head, MenuBarStripState.init (Sources/StableBar/MenuBarStrip.swift) adds let barSized = bounds.height < display.height / 4 and requires barSized before inserting into shownMenuBars at menuBarLevel. The stray screencaptureui window spans the full display height (982 pt on a 982 pt display), so it fails barSized and no longer raises a shown menu bar. The real menu bar is about 33 to 40 pt high, which passes the check, so a visible or sliding-in menu bar still counts. The bar therefore gets .aboveMenuBarStrip when a MenuBarAgent strip exists and the menu bar is hidden, which is the expected behavior in the issue. The issue names a height limit as an acceptable approach. The PR adds test menuBarStripRaisesTheBarAboveAFullScreenWindowAtTheMenuBarLevel for this case. I read the test through the summary only, not the file. Residual risk: a small non-menu-bar window at layer 24 touching the top edge, under a quarter of display height, would still count. The issue does not require excluding that case. The MenuBarAgent strip check now uses the same barSized condition with the same threshold, so its behavior is unchanged.
Full details: Out of Scope Changes check
Explanation
The whole-PR diff (merge base 095b059 to head 3f069d5) changes only Sources/StableBar/MenuBarStrip.swift (+4/-2) and adds one test in Tests/StableBar/MenuBarStripTests.swift (+9). The source change adds the barSized condition to the menu-bar detection and reuses it for the existing strip check, which is the change described in issue #728. The test covers the same scenario. No unrelated files or behavior changes appear in the summaries or in the source diff I read.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Reviewing files that changed from the base of the PR and between 10eb8dd and 3f069d5.
Files selected for processing: 2
Sources/StableBar/MenuBarStrip.swift
Tests/StableBarTests/MenuBarStripTests.swift
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On macOS 27 with a notched display and the menu bar hidden, a window that another app keeps at the main menu level over the whole display (here, one
screencaptureuileft behind) counted as a shown menu bar. The bar then stayed at.floating, below MenuBarAgent's reveal strip, so clicks on its top 33 pt showed the macOS menu bar instead of reaching widgets.Fixes #728
Changes
MenuBarStripStatecounts a window at the main menu level as a shown menu bar only when it is menu-bar sized (less than a quarter of the display's height), the same limit the strip check already uses. The real menu bar, shown or sliding in, still counts, so a revealed menu bar still covers the bar.Testing
menuBarStripRaisesTheBarAboveAFullScreenWindowAtTheMenuBarLevel: a full-screenscreencaptureuiwindow at layer 24 beside a hidden menu bar leaves the bar raised.main(unrelated type-check errors inFeltPen.swiftandSetupTour.swift), so I couldn't runswift test. I compiledMenuBarStripStateon its own with the new case and the existing shown, sliding and hidden cases: the new case failed before the change and all pass after it. CI runs the full suite.screencaptureuiwindow made the running bar rise to layer 26 and take clicks again, which confirms the cause.npx commitlint --from origin/mainpasses.Merging
One commit; any merge method works.
Claude Opus 5.5 via Claude Code