Skip to content

Distance Expense - Unable create expense stop/start row disappeared after enter start #99194

Closed

Description

@lanitochka17

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.58-0
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #97631
Email or phone of affected tester (no customers): rybkina+082026hh@gmail.com
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation (hyperlinked to channel name):

Action Performed:

Pre: Under Distance rates, add rates until there are at least 12 enabled rates. Give them names so the currently-selected one is not first alphabetically (e.g. many "A…" rates plus one "Zebra rate").

  1. Launch App
  2. Start a distance expense on that workspace > enter start
  3. Enter stop

Expected Result:

Start and stop row should be displayed

Actual Result:

Start and stop row disappared
Same for Manual expense: blank page after Category/Attendees select

Workaround:

Unknown

Platforms:

Select the officially supported platforms where the issue was reproduced:

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

Screenshots/Videos

Bug7238830_1787276827103.az_recorder_20260820_214410.mp4
Image

View all open jobs on GitHub

Activity

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

    @melvin-bot

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

  3. melvin-bot commented on Aug 21, 2026

    @melvin-bot

    @robertjchen @linhvovan29546 you have been assigned to this deploy blocker because you reviewed the offending PR: #97631

  4. melvin-bot commented on Aug 21, 2026

    @melvin-bot

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

  5. melvin-bot commented on Aug 21, 2026

    @melvin-bot

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

  6. github-actions commented on Aug 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.
  7. linhvovan29546 commented on Aug 21, 2026

    @linhvovan29546
    Contributor

    @marufsharifi I don't think our PR introduced this regression. Could you please confirm?

  8. MelvinBot commented on Aug 21, 2026

    @MelvinBot
    Contributor

    Issue Analysis

    ⚠️ Medium confidence — the offending PR is strongly implicated by the reproduction fingerprint, but I could not statically pin the exact throwing line, and this is reported only on Android: App. The decisive missing piece is a client JS error stack (see Next steps).

    Likely offending PR: Expensify/App#97631 — "Move selected distance rate to the top of the rate list" (merged 2026-08-20, in the 9.4.58 window).

    Why it's implicated: The repro precondition — 12+ enabled rates with the selected rate not first alphabetically — is a precise fingerprint of the reorder that PR #97631 added. moveInitialSelectionToTop only reorders when items.length >= CONST.STANDARD_LIST_ITEM_LIMIT, and STANDARD_LIST_ITEM_LIMIT is 12. No other setting cares about both "≥12 items" and "selected item not first." The issue's repro steps are also copied verbatim from this PR's test plan, i.e. QA was regression-testing #97631 when the app broke.

    Recommended resolution (deploy blocker): Revert Expensify/App#97631 and re-verify. If the blank pages persist after the revert, the fingerprint is misleading and the real cause is a confirmation/waypoint-page change — escalate with the error stack below.

    Investigation details & the open question

    What PR #97631 changed (only DynamicIOURequestStepDistanceRate.tsx + a test):

    The contradiction I couldn't close statically: This file is only the standalone rate-picker modal (route MONEY_REQUEST_STEP_DISTANCE_RATE, header "Rate"). It is not embedded in the confirmation page, and neither MoneyRequestConfirmationList nor the Category/Attendee pickers import these utils. So on a pure code-path reading, PR #97631 cannot directly blank the confirmation page ("Start/Stop rows disappeared") or a manual-expense page.

    Two ways to reconcile this, both needing runtime confirmation:

    1. The reported "manual expense" is likely a manual-distance expense, which opens this same rate picker — a render throw there shows as a blank page on Android. QA's symptom wording (the exact 12-rate precondition) points back at the rate list either way.
    2. An uncaught render error in the RHP rate picker can leave the Android modal/navigation blank on return, which QA may have described from the confirmation screen.

    I could not fetch a runtime stack (no Sentry access in this run) and the reordering util itself is pure/bounds-safe, so I can't name the throwing statement with confidence — hence Medium, not High.


    Next steps

    • To unblock now: revert Expensify/App#97631 and confirm the blank pages are gone.
    • To pin the exact fix: attach the JS error stack from an Android device/Sentry at the moment the page goes blank (it will name the throwing component — SelectionList/BaseSelectionList vs. a confirmation field), and confirm whether the "manual expense" in the repro is a manual-distance expense.
    • Reply with @MelvinBot <feedback> to refine, or @MelvinBot implement this to open a draft revert/fix PR.

    view run

  9. MelvinBot commented on Aug 21, 2026

    @MelvinBot
    Contributor

    🔍 Deploy-blocker investigation — correcting my earlier analysis

    Update: My earlier comment implicated Expensify/App#97631 at Medium confidence. A deeper pass refutes that (high confidence) — #97631 is not the cause, and reverting it will not fix this. This matches linhvovan29546's pushback above. Sorry for the earlier misdirection.

    Recommendation: Do not revert #97631. This needs an Android JS error stack to pin, but the code strongly points at a different, shared change. Keep DeployBlockerCash (frontend Android render bug, not reproducible in production).

    Why #97631 is not the cause

    1. Its only shipping file is a route the repro never opens. Move selected distance rate to the top of the rate list #97631 changed exactly one production file — the standalone rate-picker modal DynamicIOURequestStepDistanceRate.tsx — registered only as route DYNAMIC_STEP_DISTANCE_RATE, reachable only by tapping the Rate field. The repro flow (enter start → enter stop → blank; manual → Category/Attendees → blank) never taps Rate, so its moveInitialSelectionToTop/useInitialSelection/SelectionList changes never execute.
    2. It can't explain the manual-expense symptom at all. A manual (non-distance) expense has no rate picker, and the IOU Category/Attendees steps don't import those utils. A single root cause blanking both distance and manual confirmation must live in shared confirmation/step code that Move selected distance rate to the top of the rate list #97631 doesn't touch.
    3. The "12+ rates" precondition is incidental. It's copied verbatim from Move selected distance rate to the top of the rate list #97631's own QA steps — the tester was regression-testing Move selected distance rate to the top of the rate list #97631 and hit a different bug during setup. The reorder gate (items.length >= STANDARD_LIST_ITEM_LIMIT, =12) never runs in this path. Melvin auto-assigned Move selected distance rate to the top of the rate list #97631 only because the tester pasted its link.

    Where the bug actually is

    Both symptoms are a render blank on the distance waypoint page and on the confirmation page — Android-only, staging-only, not production, not web. The "Start/Stop rows" are the waypoint list on IOURequestStepDistanceMap.tsx:94-95; the manual symptom is the confirmation page blanking on return from an RHP sub-step.

    Leading candidate — Expensify/App#97883 ("Land Looking-Around users in Spend > Expenses…", merged 2026-08-20). It is the only in-window PR touching the shared distance + manual + confirmation surface at once: IOURequestStepConfirmation.tsx, DynamicIOURequestStepDistance.tsx, DynamicIOURequestStepDistanceManual.tsx, plus the submit/pre-mount orchestrators — a strong match for "distance and manual confirmation go blank."

    Other candidates & one ruled out (all Low confidence — need a runtime stack)
    • Expensify/App#98937 "Migrate money request participants step to a dynamic route" (merged 2026-08-20) — changes confirmation navigation / back-navigation from RHP sub-steps.
    • Expensify/App#96621 "Bump react-native-pager-view to 9.0.2" (merged 2026-08-20) — a native dep bump behind the Manual/Scan/Distance pager; fits Android-only + not-web. Notably it is already being reverted via Expensify/App#99188, so if the pager is the culprit this may already be resolved on the next build — worth re-testing.
    • Ruled out: the OXC/React-Compiler upgrade (oxc-transform-react) — OXC runs on web only; native uses Babel, and this bug is Android-native and not on web.

    Next steps to close this out

    1. Most useful: attach the Android JS error stack / Logcat at the moment the page blanks — it will name the throwing component and immediately disambiguate the leads above.
    2. Ask QA to confirm it still reproduces with fewer than 12 rates (my analysis predicts it will — confirming the precondition is incidental).
    3. Consider re-testing on a build that includes the fix: Bump react-native-pager-view to 9.0.2 #96621 revert, and re-pointing assignees from the Move selected distance rate to the top of the rate list #97631 team toward the Land Looking-Around users in Spend > Expenses and add "Send to someone" to a tracked expense's More menu #97883 author.

    Reply with @MelvinBot <feedback> to refine.


    view run

  10. Beamanator commented on Aug 21, 2026

    @Beamanator
    Contributor

    Asking for retest since we did CP'd some reverts that fixed related issues. Reverts were:

  11. IuliiaHerets commented on Aug 21, 2026

    @IuliiaHerets

    Issue fixed on build 9.4.58-2

    az_recorder_20260821_152843.mp4
  12. Beamanator commented on Aug 21, 2026

    @Beamanator
    Contributor

    boom! closing!

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

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions