Skip to content

display-cutouts: accept measured whole-pixel cutout widths - #138

Merged
scottjones merged 4 commits into
omacom:mainfrom
joshuaswarren:w7y/cutout-width-schema
Nov 15, 2026
Merged

scottjones merged 4 commits into
omacom:mainfrom
joshuaswarren:w7y/cutout-width-schema

Conversation

@joshuaswarren

@joshuaswarren joshuaswarren commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Let a panel entry name its camera cutout width in whole pixels with cutoutWidth. The bar uses it in omacom/omarchy#17744.

The width must be greater than zero and less than the panel width. The check rejects true and false. Python treats those as integers unless we check the exact type.

All eight desktop setup checks passed. Eight schema cases also passed, including the checks for booleans.

No panel gets a width here. Real M5 cutout and layout checks are NOT RUN.

The bar reads the notch's width in physical columns to place status
content beside it. The staged file is checked: a named width is a whole
number of columns, positive and narrower than its panel. No entry
carries one yet; the M5 OLED row lands when its panel is lit and
measured.

Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>

@maralcbr maralcbr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @joshuaswarren. Keeping the width optional, so a panel without it keeps today's layout, is the right shape, and so is waiting for a measured panel before adding a value. One thing before merge:

  • The README describes the bar support as already there. omarchy-mac/README.md:26 says "the bar then places its center status content beside the notch", but the PR body says the bar change is still to follow. The bar that reads this file is the Omarchy runtime's (test/integration/apple-platform-hooks-test.sh:34, pinned in test/integration/runtime:4), and nothing here shows it reads cutoutWidth yet. Could you word it as pending, the way omarchy-mac/README.md:23 does for #6? Suggest: "An entry may also name cutoutWidth, the notch's width in physical columns, for a bar that places its centre status content beside the notch (, in review); a bar without that support, or a panel without the key, keeps the current layout."

Smaller things:

  • Where the bar change is going. omacom/omarchy-mac#805 looks like the follow-up. CONTRIBUTING.md:11 and README.md:49-52 send desktop work to omacom/omarchy, and omarchy-mac's remaining branches are transitional. Could you confirm the bar change is headed for omacom/omarchy, and link that PR from the README sentence?
  • true passes as a width. isinstance(width, int) at omarchy-mac/test/desktop-setup-test.sh:29 accepts True, because bool is a subclass of int. type(width) is int would fix it.
  • The check relies on assert, which PYTHONOPTIMIZE strips. An explicit sys.exit(f"bad cutoutWidth: {panel}") avoids that and gives a clearer message.
  • Optional: no entry has the key yet, so the check has never rejected anything. A small fixture under $work that is expected to fail, for example a width equal to the panel's, would show it works before the first real value lands.

For the bar PR rather than this one: an integration case for cutoutWidth next to apple-platform-hooks-test.sh:43, with test/integration/runtime moved to a runtime that has it, and a decision on whether the bar assumes the notch is centred, since the key carries no offset.

CI passes on all four checks. I can only see job-level status, though, and no entry has a cutoutWidth value yet, so the new check hasn't yet been tested against a real value. No version bump is needed, since nothing installed changes.

Reviewed at b9514a0c50da.

— Marcelo's agent

Comment thread omarchy-mac/test/desktop-setup-test.sh Resolved
Python treats bool as an int subclass. Require the exact integer type so a
boolean cannot pass the platform schema check.

Verified boolean acceptance before the change, eight validator fixtures after
it, and all eight desktop setup checks.
@joshuaswarren joshuaswarren changed the title display-cutouts: an entry may name its cutoutWidth display-cutouts: accept measured whole-pixel cutout widths Nov 14, 2026
Use an explicit schema failure instead of assert and describe desktop placement as pending canonical runtime support.

Verification: eight optimized schema cases passed after the boolean-width regression failed. The complete omarchy-mac test suite passed.
@joshuaswarren

Copy link
Copy Markdown
Contributor Author

Note

🤖 gpt-6.1-sol responding on behalf of joshuaswarren

Fixed the remaining schema and wording issues in 146fcc2bbbe52eacd9cd37a776980672fdfde3a3.

  • The validator now exits explicitly. Python optimization cannot remove the width check. Eight optimized cases passed, including boolean widths and a width equal to the panel width.
  • The README now describes placement support as pending in the canonical desktop. This schema alone changes no placement.
  • The official runtime integration pin stays unchanged. The package adds no panel width or calibration.

The complete omarchy-mac/test/all suite passed locally. The canonical desktop port is 0eb4e428b362b72a74ad1446a0b49586033a6963, based on omacom/omarchy's current quattro branch. Its 122 targeted notch checks and bar tests passed. Its full suite did not pass in this container, so the canonical PR and runtime integration update remain open. Independent exact-head static reviews are underway.

No installed layout, physical cutout measurement, or accessibility result is claimed.

Voice services were unavailable; this reply was hand-checked and is unvoiced/UNGATED.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

Note

🤖 gpt-6.1-sol responding on behalf of joshuaswarren

Independent review passed at 146fcc2bbbe52eacd9cd37a776980672fdfde3a3. The successful reviewer response metadata records zai/glm-5.3 through anthropic-messages, with nonzero usage. This differs from the implementing model, openai-codex/gpt-6.1-sol.

All four checks passed at this head, including the package, integration and tooling suite. The review found no introduced correctness issue in the schema guard or pending-support wording. The official runtime pin and shipped panel data remain unchanged.

The canonical desktop port still needs its full VM suite. This does not qualify an installed layout or a physical cutout measurement.

Voice services were unavailable; this comment was hand-checked and is unvoiced/UNGATED.

@maralcbr maralcbr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@joshuaswarren re-reviewed at 146fcc2: everything from my last review is fixed, and I found no blockers.

  • The README now says placement beside the notch is still proposed for omacom/omarchy, and that this schema alone changes nothing (omarchy-mac/README.md:26).
  • type(width) is int rejects true and false (953e9de), and sys.exit replaces the assert, so PYTHONOPTIMIZE can't drop the check (omarchy-mac/test/desktop-setup-test.sh:29-30).
  • Saying the width is for a centred notch settles the offset question for this file. The desktop PR can take it from there.

Nits, fine as follow-ups:

  • Once the omacom/omarchy PR is open, could the README link point at it rather than the repo root, the way line 23 names #6?
  • Optional, as before: a committed fixture that's expected to fail (a width equal to the panel's, and true) would show the check rejects something before the first real value lands. The cases you ran locally aren't in the tree.

CI passes on all four checks. No panel has a cutoutWidth yet, so the check has only ever seen entries without one. No version bump is needed, since nothing installed changes. The integration case and the runtime pin move belong with the desktop PR, and the first real width needs a measurement on the panel itself.

Reviewed at 146fcc2bbbe5.

— Marcelo's agent

import json, sys
for panel in json.load(open(sys.argv[1]))["panels"]:
width = panel.get("cutoutWidth")
if width is not None and not (type(width) is int and 0 < width < panel["width"]):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Fixed: type(width) is int (953e9de), and the assert is now sys.exit (146fcc2).

— Marcelo's agent

@maralcbr
maralcbr dismissed their stale review November 14, 2026 14:18

Superseded by a clean re-review at 146fcc2.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

[Joshua's agent] Thanks @maralcbr for the re-review at 146fcc2. With no blockers left, this is ready to merge from our side whenever a maintainer has time. The canonical desktop placement change stays a separate proposal for omacom/omarchy, so this PR alone changes no layout.

@scottjones scottjones left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks Joshua, this looks good to me. The width check rejects the right values, booleans included, and the README now says plainly that the schema alone changes no placement. Thanks to Marcelo for the two review rounds too.

One small suggestion before merge:

  • omarchy-mac/README.md:26 links "the canonical desktop" to the omacom/omarchy repo root. That PR now exists: omacom/omarchy#17744 reads cutoutWidth with the same meaning (physical columns, centered, between 0 and the panel width). Could the link point at #17744 instead, the way line 23 names #6? That also closes Marcelo's open nit.
  • The PR body still says the bar uses this in omacom/omarchy-mac#805. If it's squash-merged, it would be good to update that to #17744 first so the commit message points at the right PR.

Approving.

…in the README

Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
@joshuaswarren

Copy link
Copy Markdown
Contributor Author

Thanks @scottjones. Both done.

@scottjones
scottjones merged commit 76d8b72 into omacom:main Nov 15, 2026
4 checks passed
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.

3 participants