Skip to content

iPhone Duo- "Expensify Cards offer built-in protection" modal overlaps with device status bar #106382

Open

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


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.
  1. Launch Expensify app.
  2. Go to workspace settings > Rules.
  3. Go to Card restrictions.
  4. 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.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

Bug7309135_1794236117417.ScreenRecording_11-09-2026_22-52-23_1.mp4
Image

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7309135

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 9, 2026
  2. melvin-bot commented on Nov 9, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #104988

  3. melvin-bot commented on Nov 9, 2026

    @melvin-bot

    @lakchote you have been assigned to this deploy blocker because you reviewed the offending PR: #104988

  4. melvin-bot commented on Nov 9, 2026

    @melvin-bot

    @war-in you have been assigned to this deploy blocker because you authored the offending PR: #104988

  5. melvin-bot commented on Nov 9, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  6. github-actions commented on Nov 9, 2026

    @github-actions
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  7. jponikarchuk commented on Nov 9, 2026

    @jponikarchuk

    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.

  8. MelvinBot commented on Nov 9, 2026

    @MelvinBot
    Contributor

    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:

    • 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.

    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:

    1. Compare production and staging on the same device and orientation, with and without recording.
    2. Capture window bounds, modal bounds, and all four native safe-area insets.
    3. 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.


    view run

  9. added and removed on Nov 9, 2026
  10. cocvn157 commented on Nov 15, 2026

    @cocvn157

    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 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?

    1. 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.
      • src/components/ConfirmModal.tsx:186 renders <Modal type={isSmallScreenWidth ? CONST.MODAL.MODAL_TYPE.BOTTOM_DOCKED : CONST.MODAL.MODAL_TYPE.CONFIRM} innerContainerStyle={styles.pv0} ...>.
      • 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):
        return {
            paddingTop: insets?.top ?? 0,
            paddingBottom: (insets?.bottom ?? 0) * insetsPercentage,
            paddingLeft: (insets?.left ?? 0) * insetsPercentage,
            paddingRight: (insets?.right ?? 0) * insetsPercentage,
        };
      • 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.
    2. BOTTOM_DOCKED modals without avoidKeyboard never set modalOverlapsWithTopSafeArea (src/components/Modal/BaseModal.tsx):

      • In src/components/Modal/BaseModal.tsx:232-240:
        if (type !== CONST.MODAL.MODAL_TYPE.BOTTOM_DOCKED || !canUseTouchScreen || !isSmallScreenWidth || !avoidKeyboard) {
            setModalOverlapsWithTopSafeArea(false);
            return;
        }
      • 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?

    1. 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:

      return {
          paddingTop: insets?.top ?? 0,
          paddingBottom: (insets?.bottom ?? 0) * insetsPercentage,
          paddingLeft: insetsPercentageProp != null ? (insets?.left ?? 0) * insetsPercentage : (insets?.left ?? 0),
          paddingRight: insetsPercentageProp != null ? (insets?.right ?? 0) * insetsPercentage : (insets?.right ?? 0),
      };

      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.

    2. 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_DOCKED maxHeight at windowHeight - paddings.paddingTop), it never overlaps the top status bar safe area.

    3. 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.
  11. lakchote commented on Nov 16, 2026

    @lakchote
    Contributor

    Not overdue.

  12. lakchote commented on Nov 17, 2026

    @lakchote
    Contributor

    @war-in can you take a look? Melvin linked this to your PR #104988, and there's a proposal above waiting for review.

  13. lakchote commented on Nov 18, 2026

    @lakchote
    Contributor

    Not overdue. #104730 added iPhone Duo support and war-in is going through these now, so I'm moving this to Weekly.

  14. added and removed on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.EngineeringWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions