Repository navigation
Fix action pill flashing when sending messages - #104825
Conversation
|
@mkhutornyi Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
dylanexpensify
left a comment
There was a problem hiding this comment.
Looks good from product POV
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid.movAndroid: mWeb ChromeiOS: HybridAppios.mp4iOS: mWeb SafariMacOS: Chrome / Safariweb.mov |
|
@MelvinBot review |
|
@codex review |
Code reviewThe fix looks correct to me, and I found no blocking issues. CI is green apart from the reviewer checklist. I have one request and one nit.
Why the fix works (checked against FlashList 2.3.2)
|
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
⏱️ Ran out of time before I could finish. This usually means the task was too complex or I got stuck exploring. Please try again with a more specific request or post in #melvinbot-ai. |
|
@aimane-chnaif should the title be "Submit" pill, not "Latest messages"? |
Good catch. Fixed |
|
The bug is still reproducible on iOS bug.mp4 |
Regression checkI found no crash or correctness regressions in the code. I found two small behavior changes. I checked the code only and did not run the app.
The iOS repro that What I ruled out
|
Code review (
|
|
https://github.com/Expensify/App/actions/runs/40216008477/job/121237162789?pr=104825 job 3 failure is unrelated. @MelvinBot fix this in a separate PR |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Regression check (
|
I am not able to reproduce not.repro.movAnd I don't think this is a regression. |
|
I opened [No QA] Fix flaky Select all query in WorkspaceCategoriesTest as a draft to fix the job 3 failure. You're right that it's unrelated to this PR. The test passes locally on both Cause: The categories table's column header is a sticky FlashList row. Once the list loads, FlashList renders the header twice: once as a cell and once as the sticky overlay. Each copy has a "Select all" checkbox. When Fix: Both tests now use Re-run job 3 here to get this PR green in the meantime. |
|
@carlosmiceli job 3 failure is unrelated and being fixed separately in #104939. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 carlosmiceli has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/carlosmiceli in version: 9.5.24-1 🚀
|
|
No help site update needed. This PR fixes a brief flash of the action pill (for example, Submit) when you send a message below a visible expense, and no help article describes that behavior. |
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.5.24-8 🚀
Bundle Size Analysis (Sentry): |








Explanation of Change
Sending a message adds a row at index 0, which shifts the action badge target's index by one.
We then recomputed the pill from FlashList's cached viewable items, whose indexes were now stale, so a visible expense was briefly treated as above the viewport and the pill flashed.
Now the check reads FlashList's live visible range via
computeVisibleIndices()and only falls back to the reported items before the list has a layout.The shared list ref is retyped from
FlatListtoFlashListRef(both lists using it are FlashLists) socomputeVisibleIndices()andgetLayout()are reachable without a cast.Fixed Issues
$ #92663
Tests
Offline tests
Same as Tests
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
before.fix.mov
after.fix.mov