Repository navigation
display-cutouts: accept measured whole-pixel cutout widths - #138
Conversation
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
left a comment
There was a problem hiding this comment.
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:26says "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 intest/integration/runtime:4), and nothing here shows it readscutoutWidthyet. Could you word it as pending, the wayomarchy-mac/README.md:23does for #6? Suggest: "An entry may also namecutoutWidth, 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:11andREADME.md:49-52send 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? truepasses as a width.isinstance(width, int)atomarchy-mac/test/desktop-setup-test.sh:29acceptsTrue, becauseboolis a subclass ofint.type(width) is intwould fix it.- The check relies on
assert, whichPYTHONOPTIMIZEstrips. An explicitsys.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
$workthat 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
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.
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.
|
Note 🤖 gpt-6.1-sol responding on behalf of joshuaswarren Fixed the remaining schema and wording issues in
The complete No installed layout, physical cutout measurement, or accessibility result is claimed. Voice services were unavailable; this reply was hand-checked and is unvoiced/UNGATED. |
|
Note 🤖 gpt-6.1-sol responding on behalf of joshuaswarren Independent review passed at 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
left a comment
There was a problem hiding this comment.
@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 intrejectstrueandfalse(953e9de), andsys.exitreplaces theassert, soPYTHONOPTIMIZEcan'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"]): |
Superseded by a clean re-review at 146fcc2.
scottjones
left a comment
There was a problem hiding this comment.
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:26links "the canonical desktop" to the omacom/omarchy repo root. That PR now exists: omacom/omarchy#17744 readscutoutWidthwith 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>
|
Thanks @scottjones. Both done.
|
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
trueandfalse. 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.