Skip to content

Recover the status item when the menu bar parks it under the notch - #59

Merged
mstallone merged 78 commits into
mainfrom
perf/ui-06-notch-recovery
Aug 2, 2026
Merged

mstallone merged 78 commits into
mainfrom
perf/ui-06-notch-recovery

Conversation

@mstallone

Copy link
Copy Markdown
Owner

TL;DR — Port of upstream openusage#994 (open there, MIT): when a crowded menu bar pushes our status item under the notch, Runway now moves it back into view — or, failing that, shows a small surrogate pill beside the notch — instead of silently looking like it never launched.

What was happening

  • On notched MacBooks, macOS parks overflow status items under the notch. The item stays "alive" (button exists, logs look normal) but is invisible and unclickable. There is no API to reposition a status item directly.

What this changes

  • NotchGeometry (new, pure + unit-tested): notch rect from the auxiliary top areas, occlusion fraction, effective-hidden threshold (≥75%), panel anchor beside the notch, and a macOS ≤26 gate (27+ folds overflow behind a chevron natively, so the whole fallback is off there).
  • StatusItemOcclusionMonitor (new): watches via screen-parameters notifications plus a slow poll; on occlusion first asks the controller to rewrite the item's preferred-position default and re-add it (the ⌘-drag persistence key), and only if that doesn't stick shows a draggable, dismissable surrogate pill that opens the dashboard.
  • showPanel anchors the popover at the nearest visible notch edge while the item is hidden, so it never opens centered under the notch.
  • docs/menu-bar.md: "The notch" section.

Heads-up

  • The preferred-position defaults key is undocumented but long-stable; if a future macOS ignores it, the monitor's re-measure falls back to the pill on its own.
  • Adapted, not invented here: logic and thresholds match upstream's PR (real measurements from a notched 14" MBP); naming and integration follow our current controller.

Tests

  • NotchGeometryTests ports upstream's fixtures (measured occlusion cases, anchor math, macOS gate). Full suite passes (1540).

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1c2eb5a2bd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6e7fa5a8e0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@mstallone
mstallone changed the base branch from perf/ui-05-robustness to main August 2, 2026 08:01
@mstallone
mstallone merged commit f752361 into main Aug 2, 2026
2 checks passed
@mstallone
mstallone deleted the perf/ui-06-notch-recovery branch August 2, 2026 08:04
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