Skip to content

Status screen layout for iPhone Duo's inner display - #2627

Open
ps2 wants to merge 3 commits into
devfrom
feature/iphone-duo-layout-dev
Open

ps2 wants to merge 3 commits into
devfrom
feature/iphone-duo-layout-dev

Conversation

@ps2

@ps2 ps2 commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

The dev version of #2606: fixes the status screen on iPhone Duo's unfolded inner display (951×669 pt in landscape, regular size classes, vertical status bar on the trailing edge).

Before and after on the unfolded Duo

What was wrong

  • Summary bar and status row disappeared after folding and unfolding. Landscape mode (charts only) was chosen when the screen was wider than tall. The inner display is wider than tall but full height, so a fold/unfold switched it into the phone-landscape layout.
  • Charts ran off the screen. Chart rows were sized from the longer screen dimension (951 pt) on a 669 pt display, so only about two of the four fit.
  • First row clipped by the display corner. With the status bar vertical there is no top safe area, and the corners are about 57 pt.
  • Summary bar stretched across the display. The HUD row filled about 900 pt, and the CGM pill's corner sat against the display's much larger corner curve.
  • White box beside the time and Wi-Fi status. The HUD view is grey but stops at the safe area, while the HUD cell's default white background spans the full width, so it showed in the trailing status bar column.

Changes

  • Landscape mode keys off compact vertical size class (an iPhone in landscape) instead of aspect ratio.

  • Chart heights use the table height, except in phone landscape, where they keep using the longer dimension.

  • When there is no top status bar, the table is inset by the corner-adapted safe area (edgeInsets(for: .safeArea(cornerAdaptation: .vertical)), iOS 26): 16 pt on the Duo, 0 on other iPhones. It is updated when the safe area changes (so it survives a fold/unfold) and keeps the table scrolled to the top. The warning banners instead run to the top edge, so the display corners round them, with their content inset by the same amount.

  • The HUD row is capped at 500 pt and centered. Every iPhone in portrait is narrower than that, so phones are unchanged.

  • The HUD cell's background matches the HUD view (secondarySystemBackground).

Unlike next-dev, dev's action bar is a system toolbar, which already moves to the trailing vertical bar on the Duo, so it needs no change. dev also has no status bar background view.

Testing

Built with Xcode 27.1 and run in the simulator:

  • iPhone Duo (iOS 27.1), unfolded landscape: at launch, after repeated folds, unfolds and rotations, and with the muted-alerts banner. The screenshots use a simulated day of meals, boluses and temp basals, with closed loop on.
  • iPhone 17: portrait unchanged, including after rotating to landscape and back.

Not checked by screenshot: an iPhone held in landscape (charts only); the code path is the standard compact-height case.

Landscape mode (charts only, no HUD or status row) was keyed to the screen
being wider than tall. The unfolded inner display is wider than tall but
has regular height, so after a fold/unfold the HUD and status row
disappeared. Key it to compact vertical size class instead.

Chart row heights were sized from the longer screen dimension, which only
makes sense in phone landscape; elsewhere use the table height so the
charts fit the inner display.

In inner landscape the status bar is vertical, so there is no top safe
area and the first row met the display corners. The table is now inset by
the corner-adapted safe area, updated when the safe area changes and
scrolled back to the top if it was there. The warning banners instead run
to the top edge (the display corners round them) with their content inset
by that amount.

dev's toolbar is a system toolbar, which already moves to the vertical
bar on the trailing edge, so it needs no change.
ps2 added 2 commits October 29, 2026 00:17
The HUD view uses secondarySystemBackground but stops at the safe area,
while the cell's default white background spans the full table width. On
iPhone Duo's inner display the status bar is a trailing column, so the
white cell background showed as a box beside the time and Wi-Fi status.
On iPhone Duo's inner display the HUD stack view stretched across about
900 pt, and the CGM pill's corner sat against the display's much larger
corner curve. Limit the row to 500 pt, centered; every iPhone in portrait
is narrower than that, so phones are unchanged.
@ps2
ps2 requested review from Camji55 and marionbarker October 29, 2026 14:42
ps2 added a commit that referenced this pull request Oct 29, 2026
…2628)

The next-dev counterpart of the fixes in #2627 that #2606 didn't have.

- The status table now extends under the leading and trailing safe areas, as it did before it was hosted in SwiftUI, so the HUD row's grey fills the vertical status bar column beside the time instead of leaving a white box. Cell content still stays within the safe area.
- The HUD cell's background matches the HUD view, so the cell is grey where it extends past the HUD.
- The HUD row is capped at 500 pt and centered, so on the unfolded Duo it no longer stretches across the display with the CGM pill against the display corner. Every iPhone in portrait is narrower, so phones are unchanged.
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.

2 participants