You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-10-28] Distance - Route list does not stay at the top when new route shows up #103261
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:
Go to staging.new.expensify.com
Go to workspace chat.
Create a distance expense.
Create another distance expense with different waypoints.
While the second distance expense is being created, open + > Track distance > Map.
Click Reuse route.
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.
👋 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:
Identify the pull request that introduced this issue and revert it.
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.
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.
The skeleton only shows when routes.length === 0 (IOURequestStepReuseRoute.tsx:201). The user sees the cached list first, scrolled to the top.
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.
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
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]
Activity
applause-bot commentedon Oct 6, 2026
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
melvin-bot commentedon Oct 6, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #102258
melvin-bot commentedon Oct 6, 2026
@Gonals @Pujan92 you have been assigned to this deploy blocker because you reviewed the offending PR: #102258
melvin-bot commentedon Oct 6, 2026
@ShridharGoel you have been assigned to this deploy blocker because you authored the offending PR: #102258
melvin-bot commentedon Oct 6, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Oct 6, 2026
👋 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:
MelvinBot commentedon Oct 6, 2026
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
SelectionListkeeps FlashList'smaintainVisibleContentPositionon (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
disableMaintainingScrollPositionto theSelectionListinIOURequestStepReuseRoute.tsx:191-205. This bug is cosmetic and needs specific timing, so demoting it would also be reasonable.Investigation details
fetchReusableDistanceRoutes()(IOURequestStepDistanceMap.tsx:195-200), which sends theOpenReuseRoutePageread (ReusableDistanceRoutes.ts:16-42).API.readwaits 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.routes.length === 0(IOURequestStepReuseRoute.tsx:201). The user sees the cached list first, scrolled to the top.disableMaintainingScrollPositiondefaults tofalse(BaseSelectionList.tsx:81) and feedsmaintainVisibleContentPosition(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 exampleNewChatPage/index.tsx:444.If the list should also jump to the top after the user scrolls down, pass a
refand callscrollToIndex(0)whendata[0]?.keyForListchanges. 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 thisto create a draft PR, or@MelvinBot <your feedback>to refine this analysis.view run
4 remaining items
ShridharGoel commentedon Oct 11, 2026
Fixed in #103654
melvin-bot commentedon Oct 14, 2026
@Pujan92, @Gonals, @ShridharGoel Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
ShridharGoel commentedon Oct 15, 2026
In review
m-natarajan commentedon Oct 20, 2026
Chrome / v9.5.15-1
Passed
bandicam.2026-10-20.23-04-37-614.mp4
[-]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[/+]melvin-bot commentedon Oct 21, 2026
@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]