Skip to content

[Due for payment 2026-10-28] Distance - Route list does not stay at the top when new route shows up #103261

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.5.4.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: #102258
Email or phone of affected tester (no customers): sodjinosdjiojiosjio@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Money Requests

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create a distance expense.
  4. Create another distance expense with different waypoints.
  5. While the second distance expense is being created, open + > Track distance > Map.
  6. Click Reuse route.
  7. Wait for the new route to show up.

Expected Result:

Route list will stay at the top when new route shows up.

Actual Result:

Route list does not stay at the top when new route shows up.
User will need to scroll up to see the latest route.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7279441_1791325836261.3.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Vincenzo Godoy
Bug ID: 7279441

Issue OwnerCurrent Issue Owner: @Pujan92

Activity

  1. added
    DeployBlockerCash
    Bug
    on Oct 6, 2026
  2. applause-bot commented on Oct 6, 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/42abb7853d294d1048b7156a814553731cf2b4f4cdc91a567bb59a5ca3e7fae0

  3. melvin-bot commented on Oct 6, 2026

    @melvin-bot

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

  4. melvin-bot commented on Oct 6, 2026

    @melvin-bot

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

  5. melvin-bot commented on Oct 6, 2026

    @melvin-bot

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

  6. melvin-bot commented on Oct 6, 2026

    @melvin-bot

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

  7. github-actions commented on Oct 6, 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.
  8. MelvinBot commented on Oct 6, 2026

    @MelvinBot
    Contributor

    Deploy Blocker Analysis

    Causing PR: [Payment due @Pujan92] Add Reuse route to the distance creation flow (high confidence). It added the Reuse route page, the only screen involved, and it is in the Deploy Checklist: New Expensify 2026-10-06.

    Root cause: The new page's SelectionList keeps FlashList's maintainVisibleContentPosition on (the default). When the fresh route arrives at index 0, the list shifts down to keep the old first card in place, so the new route sits just above the visible area.

    Recommendation: Fix forward instead of reverting the 42-file feature PR. Add disableMaintainingScrollPosition to the SelectionList in IOURequestStepReuseRoute.tsx:191-205. This bug is cosmetic and needs specific timing, so demoting it would also be reasonable.

    Investigation details
    1. Opening the Map tab calls fetchReusableDistanceRoutes() (IOURequestStepDistanceMap.tsx:195-200), which sends the OpenReuseRoutePage read (ReusableDistanceRoutes.ts:16-42).
    2. API.read waits for queued writes (API/index.ts:194-196). The second distance expense is still being created, so the response arrives late with the new route first.
    3. The skeleton only shows when routes.length === 0 (IOURequestStepReuseRoute.tsx:201). The user sees the cached list first, scrolled to the top.
    4. disableMaintainingScrollPosition defaults to false (BaseSelectionList.tsx:81) and feeds maintainVisibleContentPosition (BaseSelectionList.tsx:547). That is why the old first card stays put when the new item is added above it. Other pages already opt out for this reason, for example NewChatPage/index.tsx:444.

    If the list should also jump to the top after the user scrolls down, pass a ref and call scrollToIndex(0) when data[0]?.keyForList changes. The one-line prop covers the reported case.

    I confirmed this by reading the code. I did not reproduce it in a browser.


    Next Steps: Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this analysis.


    view run

  9. 4 remaining items

  10. ShridharGoel commented on Oct 11, 2026

    @ShridharGoel
    Contributor

    Fixed in #103654

  11. melvin-bot commented on Oct 14, 2026

    @melvin-bot

    @Pujan92, @Gonals, @ShridharGoel Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  12. added
    Reviewing
    on Oct 15, 2026
  13. ShridharGoel commented on Oct 15, 2026

    @ShridharGoel
    Contributor

    In review

  14. m-natarajan commented on Oct 20, 2026

    @m-natarajan

    Chrome / v9.5.15-1
    Passed

    bandicam.2026-10-20.23-04-37-614.mp4
  15. removed
    Reviewing
    on Oct 21, 2026
  16. changed the title [-]Distance - Route list does not stay at the top when new route shows up[/-] [+][Due for payment 2026-10-28] Distance - Route list does not stay at the top when new route shows up[/+] on Oct 21, 2026
  17. melvin-bot commented on Oct 21, 2026

    @melvin-bot

    @Pujan92

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.15-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-10-28. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

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