Skip to content

Auto-hide menu bar items obscured by the notch#941

Open
defer2xn wants to merge 2 commits into
jordanbaird:mainfrom
defer2xn:fix/auto-hide-notch-obscured-items
Open

Auto-hide menu bar items obscured by the notch#941
defer2xn wants to merge 2 commits into
jordanbaird:mainfrom
defer2xn:fix/auto-hide-notch-obscured-items

Conversation

@defer2xn
Copy link
Copy Markdown

@defer2xn defer2xn commented May 5, 2026

Problem

On MacBooks with a notch (camera housing), when there are too many visible menu bar items, some items extend past the right edge of the notch and get clipped — they become completely invisible and inaccessible to the user.

notch-obscured

Solution

Added a relocateNotchObscuredItems() method in MenuBarItemManager that:

  • Runs every 5 seconds (piggybacks on the existing item cache timer)
  • Detects visible-section items whose frame.minX falls within the notch region (left of auxiliaryTopRightArea.minX)
  • Automatically moves them to the hidden section via the existing move() API, so they remain accessible through the Ice Bar
  • Preserves relative item ordering when relocating multiple items

Safety guards

The method skips execution when:

  • The screen has no notch (non-notched Macs completely unaffected)
  • An item is currently being moved / mouse is active
  • Items are temporarily shown (tempShowItem flow)
  • The Ice Bar panel is open
  • The hidden section is expanded (showing items)

Test plan

  • Verified build succeeds (Release configuration)
  • Tested on a notched MacBook — items behind the notch are relocated to hidden section within 5 seconds
  • Verified no interference on non-notched Mac / external display
  • Verified no conflict with temp-show, Ice Bar, and manual item rearrangement

🤖 Generated with Claude Code

lixiaoning and others added 2 commits May 5, 2026 23:59
On MacBooks with a notch, when there are too many visible menu bar items,
some get clipped behind the notch and become inaccessible. This adds a
periodic check that detects obscured items and automatically relocates
them to the hidden section, so they remain accessible via the Ice Bar.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Force IceBar mode on notched screens so hidden items appear in a
  floating panel instead of overflowing behind the notch
- Guard ControlItem.windowID against negative windowNumber values that
  cause UInt32 overflow crashes
- Adapt sendAction trigger to use leftMouseDown on notched screens,
  matching the existing IceBar behavior

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
emindeniz99 pushed a commit to emindeniz99/Ice that referenced this pull request May 13, 2026
…a11y amber)

* Updates.swift — when Sparkle wants to show a scheduled update
  prompt while Ice is in the background, activate the app with a
  regular policy and return `true` so the dialog comes up in front
  with key focus. Previously we returned `false` and Sparkle put the
  dialog up anyway, with Ice still .accessory — on macOS 26 the
  window then refused to accept clicks, which is the cluster of
  reports in jordanbaird#912 / jordanbaird#926 / jordanbaird#931 / jordanbaird#932 / jordanbaird#937. Same fix is applied
  to `standardUserDriverWillHandleShowingUpdate` for the
  user-initiated path. (Adapted from arifim's PR jordanbaird#945.)

* PermissionsView.swift — replace plain `.yellow` on the
  "Continue in Limited Mode" button with a darker amber
  (sRGB 0.75/0.45/0). The original failed accessibility contrast
  against the light button background. (Adapted from aramb-dev's
  PR jordanbaird#942 — the asset-catalog refinement in later commits of that
  PR is deferred since the current Xcode-26 sync of the project
  doesn't include the new colorset directory.)

Skipped this round:

* PR jordanbaird#940 (lilaflo) is an 80-commit re-application of
  jordanbaird/macos-26 onto another branch — same commits we
  already carry, nothing new.

* PR jordanbaird#944 (aathanwwt) targets CompactSlider 2.x's removed
  `gestureOptions:` parameter. Package.resolved locks us at 1.2.1
  with the upper bound at <2.0, so the parameter still exists in
  the version we ship.

* PR jordanbaird#941 (lixiaoning) notch-auto-hide. The diff references
  `MenuBarItem.info`, `MenuBarItemTag.iceIcon`,
  `controlItem.state == .hideItems`, and several private flags
  (`isMovingItem`, `isMouseButtonDown`, `tempShownItemContexts`,
  `itemMoveCount`) that don't exist in the macos-26 refactor of
  MenuBarItemManager. Adapting it would mean rewriting the helper
  against a different cache architecture, which I shouldn't do
  without a notched display to verify against. The negative
  windowNumber guard in the same PR is a no-op for us because we
  don't read `NSWindow.windowNumber` anywhere in the macos-26
  branch.
pdurlej added a commit to pdurlej/Ice that referenced this pull request May 24, 2026
ROADMAP.md is the working engineering plan for the fork. Five phases:
foundation (CI + Sparkle decision), Tahoe stability cherry-picks,
upstream 0.12.0 merge, feature PRs (jordanbaird#612, jordanbaird#795, jordanbaird#941, jordanbaird#667), rebrand
with UserDefaults migration, original heavy-user features. Each phase
broken into sprints with concrete file:line targets, decision points,
risk register, and a Gantt-style summary.

docs/ICON_BRIEF.md is the design brief for the eventual Fire app icon
(Balerion-inspired dragon eye on obsidian black with ember gradient,
mirroring the existing Ice icon's squircle geometry in inverted
temperature). Includes ready-to-use Midjourney and DALL-E prompts,
required AppIcon.appiconset sizes, and rejection criteria.

Also add .codegraph/ to .gitignore — the local symbol index database
should not be committed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant