You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
iPhone Duo- "Expensify Cards offer built-in protection" modal overlaps with device status bar #106382
Version Number: 9.5.34-0 Reproducible in staging?: Yes Reproducible in production?: No If this was caught during regression testing, add the test name, ID and link from BrowserStack:#104988 Email or phone of affected tester (no customers):jnosidjodsjojo@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: iPhone Duo / iOS 27.2 App Component: Workspace Settings
Action Performed:
Precondition:
Create a Control workspace.
Enable Rules.
Launch Expensify app.
Go to workspace settings > Rules.
Go to Card restrictions.
Tap All cards.
Expected Result:
"Expensify Cards offer built-in protection" modal will not overlap with device status bar.
Actual Result:
"Expensify Cards offer built-in protection" modal overlaps with device status bar.
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
It updates CI/toolchain configuration, including Xcode 26.6 → 27.1, not modal layout code.
The staging build includes that change; production does not.
The affected Rules tab, shared modal geometry, and safe-area utilities are unchanged between production and staging.
The screenshot appears to show overlap with a right-edge system-status/camera region, not simply a horizontal top status bar. Adding top padding would therefore be premature.
Root-cause confidence: low. A new SDK could expose an existing inset assumption, but stale orientation-dependent insets or an OS/recording overlay could also explain the screenshot. The reporter has not obtained a second reproduction.
The decisive next checks are:
Compare production and staging on the same device and orientation, with and without recording.
Capture window bounds, modal bounds, and all four native safe-area insets.
If reproducible, compare otherwise identical builds using the old and new toolchains.
No verified fix is established. Avoid device-specific constants or a blanket revert until those checks isolate the cause. Web testing cannot validate this native iOS behavior, so no tester was run.
The issue’s DeployBlockerCash label had already been removed during this investigation. No code or issue changes were made.
Please re-state the problem that we are trying to solve in this issue.
On iPhone Duo (iOS 27.2), navigating to Workspace settings > Rules > Card restrictions and tapping All cards opens the "Expensify Cards offer built-in protection" modal (ConfirmModal), which overlaps with the device's system status bar / camera cutout area instead of staying inside the safe-area bounds.
What is the root cause of that problem?
ConfirmModal uses BOTTOM_DOCKED when isSmallScreenWidth is true, and getPlatformSafeAreaPadding scales down horizontal safe-area insets (insets.left / insets.right) by 0.7 (src/styles/utils/index.ts):
In src/pages/workspace/rules/tabs/RulesCardRestrictionsTab.tsx:47-61, tapping the default card restriction rule calls showConfirmModal(...) with image: illustrations.ExpensifyCardProtectionIllustration, imageStyles: [styles.w100], and shouldFitImageToContainer: true.
On iPhone Duo, when isSmallScreenWidth is true, Modal renders as a width: '100%'BOTTOM_DOCKED sheet (src/styles/utils/generators/ModalStyleUtils.ts:244-278) and applies modalPaddingStyles from StyleUtils.getModalPaddingStyles (src/styles/utils/index.ts:739-760).
In src/styles/utils/index.ts:436-459, getPlatformSafeAreaPadding(insets) scales insets.left and insets.right by variables.iosSafeAreaInsetsPercentage = 0.7 (src/styles/variables.ts:167):
Whereas paddingTop keeps 100% of insets.top (insets?.top ?? 0), multiplying insets.right / insets.left by 0.7 removes 30% of the lateral safe-area inset where the iPhone Duo's vertical status bar / camera cutout sits (the same root cause seen in #106384). Furthermore, because ConfirmModal passes innerContainerStyle={styles.pv0} (paddingTop: 0, paddingBottom: 0) and ConfirmContent (src/components/ConfirmContent.tsx:176-187) renders <View style={imageStyles}><ImageSVG width="100%" ... /></View> edge-to-edge at the top of the sheet, the banner image and modal container bleed directly into the right-edge status bar region.
BOTTOM_DOCKED modals without avoidKeyboard never set modalOverlapsWithTopSafeArea (src/components/Modal/BaseModal.tsx):
Because ConfirmModal does not pass avoidKeyboard={true}, modalOverlapsWithTopSafeArea is unconditionally false, and maxHeight on BaseModal.tsx:421-422 (windowHeight * CONST.MODAL_MAX_HEIGHT_TO_WINDOW_HEIGHT_RATIO_LANDSCAPE_MODE) is only applied when isBottomDockedModalInLandscapeMode is true. If a tall BOTTOM_DOCKED modal (such as the Built-in Protection modal with its 140px header illustration + H1 title + description + Confirm button) reaches windowHeight - paddingTop, shouldAddTopSafeAreaMargin remains false, allowing the top of the sheet to overlap insets.top as well.
What changes do you think we should make in order to solve the problem?
Use full insets.left and insets.right in getPlatformSafeAreaPadding (src/styles/utils/index.ts:453-458):
Just like paddingTop: insets?.top ?? 0, do not multiply insets.left and insets.right by iosSafeAreaInsetsPercentage (0.7) by default, because horizontal safe-area insets on iOS correspond to physical sensor housing / vertical status-bar regions:
And for BOTTOM_DOCKED modals in getModalPaddingStyles (src/styles/utils/index.ts:739-760), apply safeAreaPaddingLeft and safeAreaPaddingRight as marginLeft / marginRight on the modal container (or constrain the BOTTOM_DOCKED container width to the safe area) when innerContainerStyle uses paddingVertical: 0 with a full-bleed image, so the modal's own background and borderTopRightRadius do not extend into insets.right.
Check modalHeight against windowHeight - paddingTop for tall BOTTOM_DOCKED modals even when avoidKeyboard is false (src/components/Modal/BaseModal.tsx:232-240):
Update the modalOverlapsWithTopSafeArea effect in BaseModal.tsx so that if a BOTTOM_DOCKED modal's measured modalHeight exceeds windowHeight - paddingTop (or cap BOTTOM_DOCKEDmaxHeight at windowHeight - paddings.paddingTop), it never overlaps the top status bar safe area.
Exclude unfolded tablet-sized viewports from isInLandscapeMode in src/libs/isInLandscapeMode/index.native.ts:
When iPhone Duo is unfolded (Math.min(windowWidth, windowHeight) > variables.mobileResponsiveWidthBreakpoint), isInLandscapeMode should return false so isSmallScreenWidth is false and ConfirmModal renders as a centered CONFIRM dialog (width: variables.sideBarWidth) rather than a full-width BOTTOM_DOCKED sheet.
What alternative solutions did you explore? (Optional)
Adding top/right padding only inside RulesCardRestrictionsTab.tsx: rejected because showConfirmModal is a shared global modal and the safe-area overlap comes from getPlatformSafeAreaPadding (0.7 horizontal inset scaling) and BaseModal / ModalStyleUtils.
Activity
applause-bot commentedon Nov 9, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/4bef230d5b4775e42064f3455cefc7205647344538459d6fc892a73df725b53c
https://platform.applause.com/services/links/v1/external/3699c5462d1d1e69520ef85fe9b3df8bbe2b26c7ea00b29a9fd5200e923e9a47
melvin-bot commentedon Nov 9, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #104988
melvin-bot commentedon Nov 9, 2026
@lakchote you have been assigned to this deploy blocker because you reviewed the offending PR: #104988
melvin-bot commentedon Nov 9, 2026
@war-in you have been assigned to this deploy blocker because you authored the offending PR: #104988
melvin-bot commentedon Nov 9, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Nov 9, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
jponikarchuk commentedon Nov 9, 2026
We couldn't reproduce this issue a second time because it is device-specific, and the iPhone Duo is the only one in the team.
MelvinBot commentedon Nov 9, 2026
Deploy-blocker investigation
Recommendation: investigate further; do not revert yet. The causing PR is not confirmed.
Findings
“chore: update macos runners to xcode 27” is a plausible trigger, but automated assignment is not proof:
The screenshot appears to show overlap with a right-edge system-status/camera region, not simply a horizontal top status bar. Adding top padding would therefore be premature.
Code evidence
What remains unverified
Root-cause confidence: low. A new SDK could expose an existing inset assumption, but stale orientation-dependent insets or an OS/recording overlay could also explain the screenshot. The reporter has not obtained a second reproduction.
The decisive next checks are:
No verified fix is established. Avoid device-specific constants or a blanket revert until those checks isolate the cause. Web testing cannot validate this native iOS behavior, so no tester was run.
The issue’s
DeployBlockerCashlabel had already been removed during this investigation. No code or issue changes were made.view run
cocvn157 commentedon Nov 15, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
On iPhone Duo (iOS 27.2), navigating to
Workspace settings > Rules > Card restrictionsand tappingAll cardsopens the"Expensify Cards offer built-in protection"modal (ConfirmModal), which overlaps with the device's system status bar / camera cutout area instead of staying inside the safe-area bounds.What is the root cause of that problem?
ConfirmModalusesBOTTOM_DOCKEDwhenisSmallScreenWidthistrue, andgetPlatformSafeAreaPaddingscales down horizontal safe-area insets (insets.left/insets.right) by0.7(src/styles/utils/index.ts):src/pages/workspace/rules/tabs/RulesCardRestrictionsTab.tsx:47-61, tapping the default card restriction rule callsshowConfirmModal(...)withimage: illustrations.ExpensifyCardProtectionIllustration,imageStyles: [styles.w100], andshouldFitImageToContainer: true.src/components/ConfirmModal.tsx:186renders<Modal type={isSmallScreenWidth ? CONST.MODAL.MODAL_TYPE.BOTTOM_DOCKED : CONST.MODAL.MODAL_TYPE.CONFIRM} innerContainerStyle={styles.pv0} ...>.isSmallScreenWidthistrue,Modalrenders as awidth: '100%'BOTTOM_DOCKEDsheet (src/styles/utils/generators/ModalStyleUtils.ts:244-278) and appliesmodalPaddingStylesfromStyleUtils.getModalPaddingStyles(src/styles/utils/index.ts:739-760).src/styles/utils/index.ts:436-459,getPlatformSafeAreaPadding(insets)scalesinsets.leftandinsets.rightbyvariables.iosSafeAreaInsetsPercentage = 0.7(src/styles/variables.ts:167):paddingTopkeeps100%ofinsets.top(insets?.top ?? 0), multiplyinginsets.right/insets.leftby0.7removes 30% of the lateral safe-area inset where the iPhone Duo's vertical status bar / camera cutout sits (the same root cause seen in#106384). Furthermore, becauseConfirmModalpassesinnerContainerStyle={styles.pv0}(paddingTop: 0, paddingBottom: 0) andConfirmContent(src/components/ConfirmContent.tsx:176-187) renders<View style={imageStyles}><ImageSVG width="100%" ... /></View>edge-to-edge at the top of the sheet, the banner image and modal container bleed directly into the right-edge status bar region.BOTTOM_DOCKEDmodals withoutavoidKeyboardnever setmodalOverlapsWithTopSafeArea(src/components/Modal/BaseModal.tsx):src/components/Modal/BaseModal.tsx:232-240:ConfirmModaldoes not passavoidKeyboard={true},modalOverlapsWithTopSafeAreais unconditionallyfalse, andmaxHeightonBaseModal.tsx:421-422(windowHeight * CONST.MODAL_MAX_HEIGHT_TO_WINDOW_HEIGHT_RATIO_LANDSCAPE_MODE) is only applied whenisBottomDockedModalInLandscapeModeistrue. If a tallBOTTOM_DOCKEDmodal (such as the Built-in Protection modal with its 140px header illustration + H1 title + description + Confirm button) reacheswindowHeight - paddingTop,shouldAddTopSafeAreaMarginremainsfalse, allowing the top of the sheet to overlapinsets.topas well.What changes do you think we should make in order to solve the problem?
Use full
insets.leftandinsets.rightingetPlatformSafeAreaPadding(src/styles/utils/index.ts:453-458):Just like
paddingTop: insets?.top ?? 0, do not multiplyinsets.leftandinsets.rightbyiosSafeAreaInsetsPercentage(0.7) by default, because horizontal safe-area insets on iOS correspond to physical sensor housing / vertical status-bar regions:And for
BOTTOM_DOCKEDmodals ingetModalPaddingStyles(src/styles/utils/index.ts:739-760), applysafeAreaPaddingLeftandsafeAreaPaddingRightasmarginLeft/marginRighton the modal container (or constrain theBOTTOM_DOCKEDcontainer width to the safe area) wheninnerContainerStyleusespaddingVertical: 0with a full-bleedimage, so the modal's own background andborderTopRightRadiusdo not extend intoinsets.right.Check
modalHeightagainstwindowHeight - paddingTopfor tallBOTTOM_DOCKEDmodals even whenavoidKeyboardisfalse(src/components/Modal/BaseModal.tsx:232-240):Update the
modalOverlapsWithTopSafeAreaeffect inBaseModal.tsxso that if aBOTTOM_DOCKEDmodal's measuredmodalHeightexceedswindowHeight - paddingTop(or capBOTTOM_DOCKEDmaxHeightatwindowHeight - paddings.paddingTop), it never overlaps the top status bar safe area.Exclude unfolded tablet-sized viewports from
isInLandscapeModeinsrc/libs/isInLandscapeMode/index.native.ts:When iPhone Duo is unfolded (
Math.min(windowWidth, windowHeight) > variables.mobileResponsiveWidthBreakpoint),isInLandscapeModeshould returnfalsesoisSmallScreenWidthisfalseandConfirmModalrenders as a centeredCONFIRMdialog (width: variables.sideBarWidth) rather than a full-widthBOTTOM_DOCKEDsheet.What alternative solutions did you explore? (Optional)
RulesCardRestrictionsTab.tsx: rejected becauseshowConfirmModalis a shared global modal and the safe-area overlap comes fromgetPlatformSafeAreaPadding(0.7horizontal inset scaling) andBaseModal/ModalStyleUtils.lakchote commentedon Nov 16, 2026
Not overdue.
lakchote commentedon Nov 17, 2026
@war-in can you take a look? Melvin linked this to your PR #104988, and there's a proposal above waiting for review.
lakchote commentedon Nov 18, 2026
Not overdue. #104730 added iPhone Duo support and war-in is going through these now, so I'm moving this to Weekly.