Skip to content

Android - Expense - Report auto scrolls to bottom after opening report field #101799

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.91-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: github.com//pull/100735
Email or phone of affected tester (no customers): sjodjoijsonjoinj@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Samsung Galaxy S25 FE / Android 16
App Component: Money Requests

Action Performed:

Precondition:

  • Create text report field.
  1. Launch Expensify app.
  2. Go to workspace chat.
  3. Create an expense.
  4. Open the expense.
  5. Tap on the text report field.

Expected Result:

Report will not auto scroll down after tapping on the report field.

Actual Result:

Report auto scrolls down after tapping on the report field.
It also scrolls down when typing on text report field.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7265680_1790019365775.7.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Svetlana Lazutkina
Bug ID: 7265680

Activity

  1. applause-bot commented on Sep 21, 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/09c43f2df8496b919cd80b6c0163331daae517b9526e0905dd9628d033cafcf2

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

    @melvin-bot

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

  4. melvin-bot commented on Sep 21, 2026

    @melvin-bot

    @Gonals @daledah you have been assigned to this deploy blocker because you reviewed the offending PR: #100735

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

    @melvin-bot

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

  7. MelvinBot commented on Sep 21, 2026

    @MelvinBot
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: Show up to three report fields per row and edit them inline (Expensify/App#100735) by @MelvinBot (High confidence)
    Related Issues: None found — no other PR in 9.4.91-0 touches report field rendering, report list scrolling or keyboard handling.

    Recommendation: REVERT

    The PR turned report fields from rows that navigate to the report field editor page into focusable inputs rendered inside the report feed itself, which is what makes tapping a field open the keyboard and move the list; the revert is clean because every commit touching the new files belongs to this branch, so nothing merged after it depends on the change.

    Assigned: @Gonals and @daledah (approving reviewers of the causing PR) — already assigned by melvin-bot. The PR author is a bot, so no author assignment was added.
    Labels: No changes. DeployBlockerCash stays (App-side fix), DeployBlocker was never applied.

    📋 Detailed Analysis

    Evidence

    • Staging only, not production — consistent with a PR first shipped in 9.4.91-0. PR Show up to three report fields per row and edit them inline #100735 merged 2026-09-21T09:40:47Z and is item 14 in the checklist's chronological list for this release (Deploy Checklist: New Expensify 2026-09-21).
    • Before the PR, tapping a report field could not scroll the report at all: the field was a MenuItemWithTopDescription whose onPress ran Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.EDIT_REPORT_FIELD...)), i.e. it pushed the editor page. That code was deleted in this PR in both call sites (MoneyRequestViewReportFields.tsx and MoneyReportView.tsx) and replaced with the new ReportFieldInlineInput, which renders a real TextInput for text/formula fields.
    • The reported repro is a one-expense report. shouldDisplayReportTableView returns false for a single-transaction report, so that report renders the chat-style feed — an InvertedFlashList — and the report fields are drawn inside it by MoneyReportView as part of the CREATED action content.
    • So after this PR the report feed contains a keyboard-opening input for the first time in this flow. On Android (android:windowSoftInputMode="adjustResize") focusing it resizes the window and the list viewport while the list is inverted and bottom-anchored, which is exactly the "jumps to the newest message" symptom, and it repeats as the content re-lays out on each keystroke.

    Verification

    Files that own the reported behavior, and their presence in the PR:

    File Role In PR #100735
    src/components/ReportActionItem/MoneyReportView.tsx Renders the fields for the one-expense report inside the inverted feed ✅ +19 / -64
    src/components/MoneyRequestReportView/ReportFieldInlineInput.tsx New TextInput / DatePicker / dropdown field control ✅ new file, +246
    src/components/MoneyRequestReportView/MoneyRequestViewReportFields.tsx Field grid, now rendering the inline inputs ✅ +75 / -36

    Every commit that has ever touched ReportFieldInlineInput.tsx and every commit touching MoneyRequestViewReportFields.tsx since 2026-09-09 belongs to this PR's branch, so no later PR builds on the change — the revert should not conflict.

    Ruled out: refactor: extract useMoneyRequestReportColumns and useMoneyRequestReportLayout (columns/layout only, no scroll or keyboard code) and Fix invoice fields collision, downgrade, and copy root causes (workspace-side report field utils only, nothing rendered in the report feed).

    Root Cause

    Report fields used to be navigation rows, so editing one left the report screen entirely. This PR made them inline inputs and reused the same component for the one-expense report, where the surrounding list is the inverted, bottom-anchored report action feed (ReportActionsList). Focusing an input inside that list makes the Android soft keyboard resize the viewport, and the inverted list resolves the resize by ending up at its newest-message end; subsequent layout changes while typing re-trigger it. Note the PR's own checklist has the Android native test boxes unchecked and its description states browser verification could not be completed, so this path was never exercised before merge.

    Targeted alternative (if a revert is not wanted): keep the inline grid only where it was designed for — the multi-expense report table view — and restore the navigate-to-editor MenuItemWithTopDescription in MoneyReportView.tsx so nothing focusable lives inside the inverted feed. That is a much smaller diff than the revert, but it leaves the same inline inputs inside the non-inverted MoneyRequestReportUnifiedList header on Android, which should be re-tested on device before shipping.

    💡 Suggested AI code review rule

    This 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 put focusable inputs inside the report action feed
    • Condition: Flag a change that renders a TextInput, DatePicker, FormProvider or any other keyboard-opening control inside a component that is drawn by the report action feed (anything under src/components/ReportActionItem/**, src/pages/inbox/report/*ContentCreated*, or a ListHeaderComponent of the report lists). Edit those values on a page, in the RHP, or in a popover instead.
    • Why: That feed is an inverted, bottom-anchored virtualized list; opening the soft keyboard resizes the viewport under adjustResize and the list resolves the resize at its newest-message end, so the report jumps away from the field the user is editing — the mechanism behind this deploy blocker.
    • Search pattern: grep -rln "TextInput\|DatePicker\|FormProvider" src/components/ReportActionItem src/pages/inbox/report, plus any component passed as ListHeaderComponent to InvertedFlashList / MoneyRequestReportFlashList.
    • Offending code (❌):
      {shouldDisplayReportFields &&
      (!isCombinedReport || !isOnlyTitleFieldEnabled) && (
      // One-expense reports edit their fields in place like the report view does, instead of
      // opening the report field editor page. They stay one field per row though: this screen
      // reads as a single expense rather than a table, so the fields stack vertically here.
      <MoneyRequestViewReportFields
      report={report}
      policy={policy}
      pendingAction={pendingAction}
      style={styles.mt5}
      shouldUseSingleColumn
      />
      )}
    • Fix (✅): the MenuItemWithTopDescription that navigates to the editor page, as it was before Show up to three report fields per row and edit them inline #100735

    The full rule file, with the ❌/✅ code inline in the App 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.

  8. melvin-bot commented on Sep 21, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  9. melvin-bot commented on Sep 21, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  10. melvin-bot commented on Sep 21, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  11. melvin-bot commented on Sep 22, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  12. Gonals commented on Sep 22, 2026

    @Gonals
    Contributor

    PR Reverted

  13. IuliiaHerets commented on Sep 22, 2026

    @IuliiaHerets

    Xiaomi Redmi Note 10 / Android 12
    9.4.91-1
    Not repro

    Screenrecorder-2026-09-22-14-19-11-993.mp4
  14. melvin-bot commented on Oct 13, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

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

Metadata

Metadata

Assignees

Labels

BugSomething is broken. Auto assigns a BugZero manager.EngineeringReviewingHas a PR in review

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions