Repository navigation
test(hidden-bar): require geometry and cover panel lifecycle - #982
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Menu-bar frame and guard contract Sources/OmniWM/UI/HiddenBar/MenuBarItemService.swift, Sources/OmniWM/UI/HiddenBar/HiddenBarMenuGuard.swift, Tests/OmniWMTests/HiddenBarMenuGuardTests.swift |
isMenuOpen(ownerPIDs:) uses menuBarFrame to calculate menu-bar rectangles. The helper uses the maximum of status-bar thickness, safe-area top inset, and frame-to-visible-frame top difference. The guard requires explicit window bounds and menu-bar frames. Tests cover frame calculations and status-window bounds. |
Lifecycle test updates
| Layer / File(s) | Summary |
|---|---|
Controller release check Tests/OmniWMTests/HiddenBarLifecyclePolicyTests.swift |
The sleeper closure captures the controller weakly and checks temporary-reveal state only if the controller remains available. Teardown asserts that the controller was released. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Other
Possibly related PRs
- OmniNull/OmniWM#978: Introduced the status-level native-panel detection inputs and geometry that this change makes explicit, extracts, and tests.
Suggested reviewers: barutsrb
Merge Risk: 
Minimal · up to e3028
-
No actionable merge-blocking risk is identified.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed -
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.
Comment @coderabbitai help to get the list of available commands.
71e6dd2 to
17797d2
Compare
|
@dappermint I just rebased on the latest main (after #987 is merged) |
|
@BarutSRB Please take a look. |
|
Thanks for rebasing this and adding the coverage. I've reviewed the current head: the explicit geometry requirements, unchanged production frame calculation and lifecycle release check look good. CI is green, and this is ready to merge independently of #977. |
Problem
Hidden Bar's native-panel guard accepts default window bounds and menu-bar frames that silently disable status-level panel detection when a caller omits them. The original status-layer test relies on those defaults rather than checking the actual exclusion rule. The native-panel lifecycle fixture also retains its controller, and the production menu-bar strip calculation is not directly tested.
Addresses the three optional follow-ups in #978 (review).
Result
WindowInfo.boundsandisMenuOpen(menuBarFrames:)at every call site. Popup-only tests explicitly supply empty geometry; the status-window test supplies a menu-bar strip and independently checks empty bounds and status items contained within that strip.Verification
make verify: passed. Its 13 lint warnings are in files outside this PR.swift test: 7,079 tests executed, 42 skipped, 0 failures.boundsormenuBarFramescompiles before the change and is rejected afterward.Summary by CodeRabbit