Repository navigation
Fix the Notifications freeze on the iPhone Duo's outer screen - #26341
Merged
Merged
Conversation
Contributor
🤖 Build Failure AnalysisThis build has failures. Claude has analyzed them - check the build annotations for details. |
The push prompt in the Notifications header centred its buttons in the full width, so at accessibility text sizes they reached into the side strip on the Duo's outer screen. The button row took its margins from the safe area, which changed as the row moved, and layout never settled. Keep the prompt's text and buttons inside its safe area, stop the button row from taking margins from the safe area, and stack the buttons when they don't fit inside the safe area.
The sheet covers the side strip, so its content no longer stops at the strip's safe area. Only the horizontal inset both sides share is kept, which leaves iPhone landscape unchanged.
Pad the text 20 pt from the safe area, like the section titles, instead of 37 pt. Measure the buttons' titles on one line when choosing the axis: a button that has already wrapped reports its wrapped width, so the row stayed side by side with a wrapped title.
jkmassel
force-pushed
the
jkmassel/cmm-2759-notifications-duo-freeze
branch
from
November 5, 2026 20:43
56fd4e7 to
f5d8588
Compare
Stacked buttons now span the same width as the text above them and get taller padding, instead of hugging their titles.
The text needs the room more than the decoration does, especially on small screens such as the iPhone Duo's outer screen. Without the illustration, the sheet fits its text and buttons instead of keeping its half-screen minimum.
jkmassel
force-pushed
the
jkmassel/cmm-2759-notifications-duo-freeze
branch
from
November 5, 2026 23:34
f99ded7 to
22d59c5
Compare
At accessibility text sizes the text is left-aligned, and a button title that wraps stays centered.
crazytonyli
approved these changes
Nov 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a freeze in the Notifications tab on the iPhone Duo's outer screen at accessibility text sizes, and tidies the two notification prompts on that screen. Fixes CMM-2759 / #26340.
Root Cause
The Notifications table header holds the inline push prompt (
AppFeedbackPromptView). It centred its buttons across the full width, ignoring the safe area. At AX1 the button row reaches into the 84 pt strip on the right of the Duo's outer screen.The row also took its margins from the safe area (
isLayoutMarginsRelativeArrangement). As the row moved, its safe-area inset changed, which moved the row again. Layout never settled, and the main thread stayed at 100%.Fix
1. The freeze (
AppFeedbackPromptView)insetsLayoutMarginsFromSafeArea = false).safeAreaLayoutGuide. This matches what Keep filter tab bars inside the side safe area #26209 did for the filter tabs on the same screen.The first change alone stops the freeze, but leaves the text and Not now under the strip.
2. The inline prompt's layout
intrinsicContentSize. A button that has already wrapped its title reports the wrapped width, so the row could stay side by side with Allow notifications on two lines. It now usessizeThatFitswith no width limit.RoundedButton, whose only user is this prompt).3. The permission sheet (
AlertView)The sheet covers the side strip, but its content still kept clear of it, which left an empty band on the right.
AlertViewnow keeps only the horizontal safe-area inset that both sides share, so the content fills the sheet with even margins. iPhone landscape is unchanged: both sides have the same 62 pt inset there. The sheet's height detent measures at the same width.At accessibility text sizes,
AlertViewalso leaves out its illustration (the bell here) to give the text room. All fiveAlertViewsheets use that slot for a decorative image, so this applies to each of them. Without the illustration, the sheet drops its half-screen minimum and fits the text and buttons, with the title at the top.Screenshots
iPhone Duo simulator, outer screen, AX1 text size.
The second-visit row is from the app, built from trunk and from this PR, signed in with the fake account from the UI-test fixtures in #26339. A frozen app looks like a working one in a still, so the caption under each image gives the CPU use. On trunk, the screenshot was taken after tapping My Site, which the app ignored. The "before" sheet is from the app too.
The other three images come from a temporary unit test that shows the real views in the test host app on the same Duo simulator. That test is not committed. Sign-in through the fixtures timed out when these were taken, with the old build as well as the new one. The test sets the window's tint to the app's green, as
WordPressAppDelegatedoes; the test host skips that, so without it the sheet's button comes out system blue.iPhone 18 Pro, portrait, test host:
Every
AlertViewsheetThe
AlertViewchange reaches all five sheets that use it, so each one was rendered on both simulators at the default text size and AX1. Click an image for the full size.The notifications sheet comes from its real factory. The other four are built in private methods that need a real post or site, so the test rebuilds them from the same SwiftUI code and English text.
On every sheet, the content spans the Duo's outer screen with even margins, the illustration shows at the default size and is left out at AX1, and nothing is cut off. The title and description start at slightly different distances from the left edge from sheet to sheet, because the text is centred at the width of its longest line. Trunk does the same; this PR doesn't change how that text is laid out.
Test plan
sampleshowsviewDidLayoutSubviews→layoutHeaderView, My Site tap ignored. This PR's first commit: ~1% CPU, the permission sheet appears, and tab switching works.AlertViewsheet: all five sheets rendered on the Duo and the iPhone 18 Pro, at the default text size and AX1 (test host, see the table above). Each fills the width with even margins, shows its illustration at the default size and leaves it out at AX1, and nothing is cut off.AppFeedbackPromptViewTests(Swift Testing, 84 pt right inset):Test run with 3 tests in 1 suite passed. Against trunk's view, the tests hang instead of failing — the test host ran for 36 minutes until xcodebuild restarted it. The hang wasn't sampled, so it's likely but not proven to be the same loop.swift formatandmake lintpass on the changed files.No release note added, matching the other iPhone Duo fixes (#26207–#26222).