Skip to content

iOS - Submit reports modal cannot be scrolled to the bottom when list is long in landscape #101278

Closed

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.4.80-0
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #99995
Email or phone of affected tester (no customers): jsdoijnodsdisojo@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: iPhone 15 Pro Max / iOS 27.0
App Component: Search

Action Performed:

Precondition:

  • Have 30 reports with an expense each and each expense is held.
  1. Launch Expensify app.
  2. Go to Spend > Reports.
  3. Bulk select all reports.
  4. Tap dropdown button > Submit.
  5. Rotate device to landscape.
  6. Scroll Submit reports modal to the bottom.

Expected Result:

Submit reports modal can be scrolled down with Got it button at the bottom in landscape mode.

Actual Result:

Submit reports modal cannot be scrolled to the bottom when the list is long in landscape mode.

On Android, user can scroll to the bottom with Got it button, but the list cannot be scrolled down.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7260771_1789519068644.1.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7260771

Activity

  1. added
    DeployBlockerCash
    Bug
    on Sep 16, 2026
  2. applause-bot commented on Sep 16, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/ed762d2754b5cbdb8ed12ab700e47dac553f677cb0ac564e8ab0e54bbe4cfa6c

  3. melvin-bot commented on Sep 16, 2026

    @melvin-bot

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

  4. github-actions commented on Sep 16, 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.
  5. melvin-bot commented on Sep 16, 2026

    @melvin-bot

    @trjExpensify @NikkiWines @huult you have been assigned to this deploy blocker because you reviewed the offending PR: #99995

  6. melvin-bot commented on Sep 16, 2026

    @melvin-bot

    @c3024 you have been assigned to this deploy blocker because you authored the offending PR: #99995

  7. melvin-bot commented on Sep 16, 2026

    @melvin-bot

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

  8. MelvinBot commented on Sep 16, 2026

    @MelvinBot
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: Warn about blocked reports when bulk submitting a mixed selection (Expensify/App#99995) by @c3024 (High confidence)
    Related Issues: Deploy Checklist: New Expensify 2026-09-15 (Expensify/App#101255)

    Recommendation: ROLL FORWARD

    The causing PR only added a new entry point to a pre-existing layout defect in ConfirmContent — the same broken modal is already reachable in production through the bulk Export flow, so a revert would remove a legitimate correctness fix without eliminating the bug. The fix is small and localized to ConfirmModal/ConfirmContent.

    Assigned: @c3024 (PR author), @huult, @NikkiWines, @trjExpensify (approving reviewers) from the highest-confidence causing PR — all already assigned, no changes made.
    Labels: No changes. DeployBlockerCash is kept (App-side fix). DeployBlocker was not present, so nothing was removed.

    📋 Detailed Analysis

    Evidence

    PR #99995 is on the current staging checklist (#101255, item 30) and merged 2026-09-15T19:51Z, ~8 hours before this was reported.

    It replaced the all-or-nothing held-expense check in the bulk submit flow with a per-report check, and added a new confirm modal that lists every blocked report by name:

    • Production src/hooks/useSearchBulkActions.ts:2401 → showHeldExpensesBlockModal(...), a fixed two-sentence modal with no list.
    • Staging src/hooks/useSearchBulkActions.ts#L2470-L2491 → a new showConfirmModalAfterMoreMenuDismiss call with prompt built from blockedReportNames and shouldEnablePromptScroll: true.

    The reproduction (30 held reports → Submit) produces a 30-line prompt, which is exactly the new code path. The Submit reports / Mark reports as done titles come from the iou.error.reportsNotSubmittedTitle / reportsNotMarkedAsDoneTitle keys that the same PR added, which do not exist on production. That matches "N/A - new feature, doesn't exist in prod".

    Important nuance: the layout defect itself is not new. shouldEnablePromptScroll and the scrollable prompt already exist on production (ConfirmContent.tsx:212), and the bulk Export flow already uses it with a report-name list at useSearchBulkActions.ts:2014 and :2047 on production. Landscape + a long export block list should reproduce the identical symptom today in production.

    Verification

    Affected files (all present on the production branch, i.e. not modified by #99995):

    Files modified by #99995: src/hooks/useSearchBulkActions.ts, src/languages/*.ts, and two unit test files. So the PR did not touch the broken layout code — it supplied the long, user-data-driven prompt that makes the pre-existing defect visible in the Submit flow.

    Root Cause

    Two vertical scrollers end up nested inside a container that is too short, and the container clips instead of scrolling.

    1. On native, useResponsiveLayout hard-codes isSmallScreenWidth = true (index.native.ts:37), so ConfirmModal always uses MODAL_TYPE.BOTTOM_DOCKED (ConfirmModal.tsx:182), even in landscape.
    2. In landscape, BaseModal caps the sheet at windowHeight * 0.75 (BaseModal.tsx:402) — roughly 322pt on an iPhone 15 Pro Max — and the container is overflow: 'hidden' (ModalStyleUtils.ts:243).
    3. shouldWrapModalChildrenInScrollViewIfBottomDockedInLandscapeMode defaults to true (BaseModal.tsx:88) and ConfirmModal never overrides it, so in landscape the whole ConfirmContent is wrapped in an outer ScrollView (BaseModal.tsx:420).
    4. ConfirmContent then renders an inner ScrollView with a hard-coded maxHeight: 300 for the prompt.

    So the inner prompt scroller (300pt) on its own nearly fills the entire 322pt sheet. Add the m5 margins (40pt), the title (~28pt), the 2–3 line subtitle (~60pt) and the Got it button plus mt4 (~68pt), and the content is ~490pt inside a 322pt clipped box. The button sits ~170pt below the clip line.

    That also explains the platform split reported in the issue:

    • iOS: the inner ScrollView covers most of the sheet and wins the pan gesture, so the outer wrapper never scrolls → the Got it button is unreachable.
    • Android: RN's inner ScrollView does not scroll when nested inside another ScrollView unless nestedScrollEnabled is set, and src/components/ScrollView.tsx never sets it. So the outer wrapper scrolls (you reach Got it) but the report list does not — exactly the reported Android behaviour.

    Recommended fix

    Stop nesting the two scrollers and size the prompt relative to the viewport instead of a fixed 300pt. FeatureTrainingModal already does exactly this and can be copied:

    • In ConfirmModal.tsx, pass shouldWrapModalChildrenInScrollViewIfBottomDockedInLandscapeMode={!shouldEnablePromptScroll} so BaseModal does not add a competing outer ScrollView when ConfirmContent owns one (compare FeatureTrainingModal.tsx:113).
    • In ConfirmContent.tsx:212, replace the fixed maxHeight: 300 with a window-relative cap, e.g. Math.min(300, windowHeight * CONST.MODAL_MAX_HEIGHT_TO_WINDOW_HEIGHT_RATIO_LANDSCAPE_MODE - <chrome>), or give the scroller flexShrink: 1 / minHeight: 0 and let its ancestors shrink so the title and the Got it button always stay on screen. useScrollableWrapper.ts:52 is the reference implementation.

    Because the fix is in shared ConfirmContent/ConfirmModal code, it also fixes the bulk Export variant of this modal.

    Why not revert

    • Reverting Warn about blocked reports when bulk submitting a mixed selection #99995 restores showHeldExpensesBlockModal, which silently drops blocked reports from a mixed selection with no per-report feedback — a worse behaviour than a landscape layout glitch.
    • It does not fix the bug class: the identical modal is still reachable in landscape via bulk Export on production.
    • A portrait rotation is a complete workaround, and the bug needs ~8+ blocked reports in one selection to appear. A DEMOTE is arguably defensible on those grounds, but I've left DeployBlockerCash in place since the assignees are better placed to make that call.

    💡 Suggested AI code review rule

    This bug looks like a recurring, mechanically detectable pattern, so it may be worth a coding-standards rule so the AI reviewer catches the next one. Proposed for Expensify/App:

    • Rule: UI-4 Don't nest a ScrollView inside modal content, and never cap it with a fixed pixel height
    • Condition: When a component rendered as a child of Modal renders its own ScrollView/FlatList, flag it unless the Modal sets shouldWrapModalChildrenInScrollViewIfBottomDockedInLandscapeMode={false}; and flag any hard-coded pixel maxHeight on that scroller — derive the height from windowHeight (e.g. CONST.MODAL_MAX_HEIGHT_TO_WINDOW_HEIGHT_RATIO_LANDSCAPE_MODE) instead.
    • Why: BaseModal caps bottom-docked sheets at 75% of windowHeight in landscape and wraps children in its own ScrollView by default, so an inner scroller with a fixed cap larger than the sheet leaves the action buttons clipped by overflow: 'hidden' (iOS) or makes the inner list unscrollable for lack of nestedScrollEnabled (Android). Motivated by this issue.
    • Search pattern: rg -l '<ScrollView|<FlatList' src/components intersected with components rendered inside <Modal, then rg 'shouldWrapModalChildrenInScrollViewIfBottomDockedInLandscapeMode' <file>; plus rg 'maxHeight: \d+' src/styles/index.ts src/components.
    • Offending code (❌): ConfirmContent.tsx#L212 + styles/index.ts#L3014-L3017, rendered by ConfirmModal.tsx#L174-L189
    • Fix (✅): the existing correct pattern at FeatureTrainingModal.tsx#L113 and useScrollableWrapper.ts#L44-L53

    The full rule file, with the ❌/✅ code inline in Expensify/App's app-coding-standards format, would go in Expensify/App itself. If it's worth adding, a maintainer can open it there as a draft PR.

  9. c3024 commented on Sep 16, 2026

    @c3024
    Contributor

    This modal and scrolling were not implemented in the PR. It reuses the existing export modal, so this should also happen in production for the export modal. Moreover, this is an iOS landscape-mode-specific bug. I don't think this needs to be a deploy blocker.

  10. added
    Daily
    and removed
    DeployBlockerCash
    Hourly
    on Sep 16, 2026
  11. NikkiWines commented on Sep 16, 2026

    @NikkiWines
    Contributor

    Yeah, agreed that this isn't specific to the changes from this PR and thus doesn't need to be a blocker. We should have a separate issue to fix the scrolling bug, though

  12. NikkiWines commented on Sep 16, 2026

    @NikkiWines
    Contributor

    Created #101333 to handle this more generally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugDailyEngineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions