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-04-09][$250] Expenses – Bottom comments are briefly displayed when switching between chats #75269
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
changed the title [-]Expenses – Bottom comments are briefly displayed when switching between chats[/-][+][$250] Expenses – Bottom comments are briefly displayed when switching between chats[/+]on Nov 17, 2025
Please re-state the problem that we are trying to solve in this issue.
When updating an expense's category or tag and navigating back, the bottom ~50 comments briefly flash on screen during navigation.
What is the root cause of that problem?
In transaction/IOU reports, shouldScrollToEndAfterLayout state is initialized to true on mount. When navigating back from category selection, the component remounts with this state still true, causing the FlatList to render with opacity: 0, then transition to opacity: 1 before the scroll corrects. During this transition, the bottom 50 items (from initialNumToRender) are visible, causing the flash.
📣 @proBhavesh! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
We returned undefined for the entire maintainVisibleContentPosition object, which made minIndexForVisible effectively undefined. On Web (especially Chrome), undefined does not disable MVCP; instead, the browser treats it as an invalid anchor. This causes Chrome to choose the wrong DOM node as the anchor during the content update, which results in the list jumping or shifting when new items render.
We should return null for minIndexForVisible instead of a undefined or numeric value. Setting it to null fully disables MVCP anchoring during the initial render, which prevents Chrome from incorrectly selecting an anchor item and causing the list to jump. Once the list is stable, MVCP can be re-enabled as needed.
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to the comment on the PR: NA
Link to the comment on the Issue: NA
The original bug report isn't reproducible anymore and we ended up polishing a new feature, see regression test.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: NA
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon Nov 16, 2025
Triggered auto assignment to @VictoriaExpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.[-]Expenses – Bottom comments are briefly displayed when switching between chats[/-][+][$250] Expenses – Bottom comments are briefly displayed when switching between chats[/+]melvin-bot commentedon Nov 17, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021990264804839923457
melvin-bot commentedon Nov 17, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts (
External)proBhavesh commentedon Nov 17, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
When updating an expense's category or tag and navigating back, the bottom ~50 comments briefly flash on screen during navigation.
What is the root cause of that problem?
In transaction/IOU reports,
shouldScrollToEndAfterLayoutstate is initialized totrueon mount. When navigating back from category selection, the component remounts with this state stilltrue, causing the FlatList to render withopacity: 0, then transition toopacity: 1before the scroll corrects. During this transition, the bottom 50 items (frominitialNumToRender) are visible, causing the flash.State initialization:
App/src/pages/home/report/ReportActionsList.tsx
Line 205 in a66525c
Opacity control that causes the flash:
App/src/pages/home/report/ReportActionsList.tsx
Lines 864 to 868 in a66525c
What changes do you think we should make in order to solve the problem?
Add a
useLayoutEffectafter the visibility effect to detect when remounting a report with existing actions and reset the flag before browser paint:App/src/pages/home/report/ReportActionsList.tsx
Line 215 in a66525c
Using
useLayoutEffect(notuseEffect) ensures this runs synchronously before browser paint, preventing any visual flash.What alternative solutions did you explore? (Optional)
N/A
melvin-bot commentedon Nov 17, 2025
📣 @proBhavesh! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Format:
proBhavesh commentedon Nov 17, 2025
Contributor details
Your Expensify account email: probhavsh@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~0105269ba7e75f1a0e?mp_source=share
allroundexperts commentedon Nov 19, 2025
@proBhavesh Can you please share the result of applying your proposal? This seems to happen even after applying your fix.
marufsharifi commentedon Nov 23, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Expenses – Bottom comments are briefly displayed when switching between chats
What is the root cause of that problem?
This PR introduced this issue.
We returned
undefinedfor the entiremaintainVisibleContentPositionobject, which mademinIndexForVisibleeffectivelyundefined. On Web (especially Chrome),undefineddoes not disable MVCP; instead, the browser treats it as an invalid anchor. This causes Chrome to choose the wrong DOM node as the anchor during the content update, which results in the list jumping or shifting when new items render.App/src/components/InvertedFlatList/BaseInvertedFlatList/index.tsx
Lines 92 to 96 in 1d0ce34
What changes do you think we should make in order to solve the problem?
App/src/components/InvertedFlatList/BaseInvertedFlatList/index.tsx
Lines 92 to 96 in 1d0ce34
We should return
nullforminIndexForVisibleinstead of aundefinedor numeric value. Setting it tonullfully disables MVCP anchoring during the initial render, which prevents Chrome from incorrectly selecting an anchor item and causing the list to jump. Once the list is stable, MVCP can be re-enabled as needed.What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
None
What alternative solutions did you explore? (Optional)
58 remaining items
melvin-bot commentedon Apr 7, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)mallenexpensify commentedon Apr 10, 2026
Payment Summary
Contributor: @marufsharifi paid $250 via Upwork
Contributor+: @eh2077 due $250 via NewDot
@marufsharifi can you please accept the job below? Please reply here and tag me once you have.
https://www.upwork.com/jobs/~022042698337234182992
@eh2077 plz complete the BZ checklist and tag me in a post once you have. Thx
marufsharifi commentedon Apr 11, 2026
@mallenexpensify, I've accepted the offer. thanks.
eh2077 commentedon Apr 13, 2026
BugZero Checklist:
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to the comment on the PR: NA
Link to the comment on the Issue: NA
The original bug report isn't reproducible anymore and we ended up polishing a new feature, see regression test.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: NA
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue: https://github.com/Expensify/Expensify/issues/623712
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
Zapier Logs
Run ID: 00040eee-6e91-a853-20ea-0e8c1ab9c334mallenexpensify commentedon Apr 13, 2026
@marufsharifi paid, summary updated above. Thx.
^ Test case created
thx
laurenreidexpensify commentedon Apr 27, 2026
#75269 (comment)