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-09-04] Promo modal - After swiping to next slide and rotating device, modal is stuck between pages #95853
Version Number: 9.4.33-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:#94012 Email or phone of affected tester (no customers):jsodinjsodjdsiodjsonj@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: Other
Action Performed:
Launch Expensify app.
Log in with new account.
Complete onboarding.
Relaunch the app.
When Concierge AI promo modal shows up, swipe to next slide.
Rotate device to landscape.
Swipe to next slide.
Rotate device to portrait.
Expected Result:
After swiping to next slide and rotating device, the modal will not be stuck between pages.
Actual Result:
After swiping to next slide and rotating device, the modal is stuck between pages.
👋 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.
Please re-state the problem that we are trying to solve in this issue.
The AI features promo modal (AIFeaturesPromoModal, from PR #94012) gets stuck between slides when the device is rotated while on a non-first slide.
What is the root cause of that problem?
The carousel is a horizontal FlatList whose page width comes from onLayout (carouselViewportWidth). Two things break on rotation, and nothing corrects for either:
The list remounts and resets to page 0.Wrapper = shouldUseScrollView ? ScrollView : View — and shouldUseScrollView is derived from isInLandscapeMode. On a phone, rotating flips landscape mode, so Wrapper changes React element type (View ⇄ ScrollView) at the same position. React can't reconcile that, so it unmounts and remounts the whole subtree — including the FlatList, which has no initialScrollIndex and so mounts back at offset 0.
The page width changes but the scroll offset isn't re-aligned.snapToInterval and getItemLayout both scale with carouselViewportWidth, but there is no effect keyed on carouselViewportWidth that re-scrolls the list to the current page. A surviving pixel offset from the old width no longer lands on a page boundary → partial two-slide "stuck between pages" view.
Meanwhile currentPage lives in the parent (survives rotation), so the pagination dots and body text still point at the old page while the list is at 0 or between pages — the visible mismatch.
Add initialScrollIndex={currentPage} to the FlatList so it lands on the correct page immediately after the remount (no flash to page 0). getItemLayout is already provided, which makes this reliable.
Add an effect keyed on carouselViewportWidth that re-aligns the offset to the current page on any width change:
useEffect(()=>{if(carouselViewportWidth<=0){return;}horizontalListRef.current?.scrollToOffset({offset: currentPage*carouselViewportWidth,animated: false});// eslint-disable-next-line react-hooks/exhaustive-deps -- re-align only when the viewport width changes (rotation)},[carouselViewportWidth]);
Read currentPage via a ref (or include it in deps — the re-snap is idempotent) so the effect stays keyed on width. This covers both the remount reset and the width-only relayout.
An alternative that also removes the remount trigger entirely is to keep Wrapper a single component type and toggle scroll behavior via props instead of swapping View/ScrollView, but the targeted fix above is the smaller change for a deploy blocker.
What alternative solutions did you explore? (Optional)
Since this is a deploy blocker on a brand-new feature (#94012), reverting that PR is the fastest option if a fix can't land quickly.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/95853) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
changed the title [-]Promo modal - After swiping to next slide and rotating device, modal is stuck between pages[/-][+][Due for payment 2026-09-04] Promo modal - After swiping to next slide and rotating device, modal is stuck between pages[/+]on Aug 28, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.63-1 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-09-04. 🎊
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 Jul 10, 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/25f1028532e858976ec8fa0e802e9217255d91c511c92bfb20855de010e7ff63
melvin-bot commentedon Jul 10, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #94012
melvin-bot commentedon Jul 10, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jul 10, 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 Jul 10, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
The AI features promo modal (
AIFeaturesPromoModal, from PR #94012) gets stuck between slides when the device is rotated while on a non-first slide.What is the root cause of that problem?
The carousel is a horizontal
FlatListwhose page width comes fromonLayout(carouselViewportWidth). Two things break on rotation, and nothing corrects for either:The list remounts and resets to page 0.
Wrapper = shouldUseScrollView ? ScrollView : View— andshouldUseScrollViewis derived fromisInLandscapeMode. On a phone, rotating flips landscape mode, soWrapperchanges React element type (View⇄ScrollView) at the same position. React can't reconcile that, so it unmounts and remounts the whole subtree — including theFlatList, which has noinitialScrollIndexand so mounts back at offset 0.The page width changes but the scroll offset isn't re-aligned.
snapToIntervalandgetItemLayoutboth scale withcarouselViewportWidth, but there is no effect keyed oncarouselViewportWidththat re-scrolls the list to the current page. A surviving pixel offset from the old width no longer lands on a page boundary → partial two-slide "stuck between pages" view.Meanwhile
currentPagelives in the parent (survives rotation), so the pagination dots and body text still point at the old page while the list is at 0 or between pages — the visible mismatch.Evidence / data flow
currentPage = 1,lastReportedPage = 1.isInLandscapeModeflips →shouldUseScrollViewflips →WrapperswitchesView→ScrollView→ FlatList remounts at offset 0.carouselViewportWidthupdates viaonLayout, but nothing re-scrolls the list.scrollToEnd) — neither touches the horizontal list.What changes do you think we should make in order to solve the problem?
In
FeatureTrainingCarousel.tsx:initialScrollIndex={currentPage}to theFlatListso it lands on the correct page immediately after the remount (no flash to page 0).getItemLayoutis already provided, which makes this reliable.carouselViewportWidththat re-aligns the offset to the current page on any width change:Read
currentPagevia a ref (or include it in deps — the re-snap is idempotent) so the effect stays keyed on width. This covers both the remount reset and the width-only relayout.What alternative solutions did you explore? (Optional)
Since this is a deploy blocker on a brand-new feature (#94012), reverting that PR is the fastest option if a fix can't land quickly.
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/95853)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
13 remaining items
Fix Expensify#95853
[-]Promo modal - After swiping to next slide and rotating device, modal is stuck between pages[/-][+][Due for payment 2026-09-04] Promo modal - After swiping to next slide and rotating device, modal is stuck between pages[/+]melvin-bot commentedon Aug 28, 2026
@gijoe0295
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.63-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
FeatureTrainingContent#97222If no regressions arise, payment will be issued on 2026-09-04. 🎊
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]