Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d8d146e7b4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
|
||
| // The trimmed side insets suit an iPhone's notch, which leaves room beside it. On a foldable iPhone the side inset is the | ||
| // vertical bar, which the status bar and bar items fill, so anything less than the whole inset puts content under them. | ||
| const sideInsetsPercentage = hasVerticalBar() ? 1 : insetsPercentage; |
There was a problem hiding this comment.
Subscribe to bar-state changes before deriving side padding
If the native module's first window read completes after the initial render, or verticalBarEdge changes without new insets, consumers such as BaseModal and useSafeAreaPaddings are not notified to recompute this value. modules/ExpensifyNitroUtils/ios/windowbars/HybridWindowBarsModule.swift:80–87,114–119 explicitly handles both situations through listeners, but this path only reads its cached snapshot. With the auto-memoization documented in AGENTS.md, even unrelated renders can retain the old 70% side padding, leaving content under the bar. Subscribe to the native state, as useIsTabBarVertical already does, and make its snapshot an explicit input to the padding calculation.
AGENTS.md reference: AGENTS.md:L70-L70
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed. The vertical bar state is now an explicit input: getPlatformSafeAreaPadding takes hasVerticalBar as an option instead of reading the native module, and the callers that use side padding subscribe through useHasVerticalBar (useSyncExternalStore), so they recompute when the native state changes even if the insets stay the same. Added a test for that case in useSafeAreaPaddingsTest.
|
@Expensify/design should take a look though. 👍 |
|
👀 I agree now looking at it we can skip safe area inside modals when unfolded as most modals will cover the vertical bar with controls anyway (only status bar is always on top) so I will take a closer look at it in a moment |
|
Since we have a max-width on desktop anyways it might be just ensuring that this also applies in unfolded mode as well |
|
Can we continue this discussion on #108221 where I'm updating the logic to treat unfolded landscape on iphone duo as landscape on tablets like ipad? This PR only fixes the problem where safe area is not applied correctly on iphone duo because we have 0.7 multiplier that only makes sense on normal phones so we can just merge this one and continue working on modal layouts on that other PR that will change them anyway in unfolded landscape. This way we won't duplicate our work. On that PR I can change layout of unfolded landscape modals to something like this:
in portrait we can stay with full width no safe area insets as we do not have high enough bottom docked modal to overlap status ring I believe. Or we can set some max-width, depends what you prefer:
I'm wondering though if we want to do something with unfolded landscape onboarding flow as it will look like this (the same as on ipads currently in landscape mode):
|
Thanks, I missed that the logic for deciding whether header buttons are displayed in separate row or not checks if the device is in landscape mode and #108221 would change it from true to false, but fixing it to keep the header buttons in the same row will not be hard so will do that, I just wanted to show you how modals can look after this change |
|
Anyway, if you are ok with this, I would allow C+ to review this PR so we can merge it quickly and I will work on modal layouts and safe area inside modals here #108221 |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: mWeb SafariMacOS: Chrome / Safari |
| insets: EdgeInsets; | ||
|
|
||
| /** Whether the side inset is a foldable iPhone's vertical bar, read with useHasVerticalBar. The whole side inset is kept then. */ | ||
| hasVerticalBar?: boolean; |
There was a problem hiding this comment.
NAB:
It's optional and defaults to false, so a new caller of getModalPaddingStyles could leave it out and bring back the Duo overlap without a type error.
Both current callers already pass it. So should we make it required?
|
🚧 lakchote has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/lakchote in version: 9.5.57-0 🚀
|
|
No help site update needed — this PR fixes content overlapping the iPhone Duo’s vertical bar, restoring expected layout without adding a feature, changing workflows, or making existing article instructions incorrect. |
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.5.57-3 🚀
Bundle Size Analysis (Sentry): |








Explanation of Change
On iOS,
getPlatformSafeAreaPaddingtrims side insets to 70%, which suits a notch but not the iPhone Duo's vertical bar (status ring, camera, tab items), so modals put content up to 25pt under it.getPlatformSafeAreaPaddingandgetModalPaddingStylesnow take ahasVerticalBaroption and keep the full side inset when it is set.The callers that use side padding (
useSafeAreaPaddings,BaseModal,PopoverWithoutOverlay, the nativeEmojiPickerMenu,AttachmentCameraand the nativeUpdateRequiredView) read it from the newuseHasVerticalBarhook. The hook subscribes toWindowBarsNitroModulewithuseSyncExternalStore, so the padding is recomputed when the native bar state changes, even if the insets stay the same. It replacesuseIsTabBarVertical, which read the same native state for the tab bar.Fixed Issues
$ #106382
$ #106386
PROPOSAL: N/A
Tests
#106382:
Precondition:
#106386:
Precondition:
Offline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
Screen.Recording.2026-11-27.at.15.07.55.mov
Screen.Recording.2026-11-27.at.15.09.32.mov
iOS: mWeb Safari
MacOS: Chrome / Safari