fix: The floating action badge scrolls to the wrong report#94762
fix: The floating action badge scrolls to the wrong report#94762lorretheboy wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a14d03a0d1
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
| if (predicate && !predicate(reports[`${ONYXKEYS.COLLECTION.REPORT}${childReportID}`])) { | ||
| continue; | ||
| } | ||
| const reportPreviewAction = getReportPreviewAction(chatReportID, childReportID); |
There was a problem hiding this comment.
Use the derived reportActions snapshot for preview lookup
When this compute is triggered by a REPORT_ACTIONS update, the reportActions dependency is already the fresh snapshot, but calling getReportPreviewAction without its chatReportActions argument falls back to MoneyRequestBuilder's module-level Onyx cache. If that cache has not observed the newly added or updated REPORT_PREVIEW yet, the propagated Fix badge keeps the previous target (often an Approve target) or no target, so pressing the floating badge can still scroll to the wrong item. Pass the current reportActions?.[${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${chatReportID}] snapshot into the helper.
Useful? React with 👍 / 👎.
Explanation of Change
Fixed Issues
$ #93430
PROPOSAL: #93430 (comment)
Tests
Prerequisite:
Offline tests
QA Steps
Prerequisite:
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))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
Screen.Recording.2026-06-27.at.22.08.00.mov
Android: mWeb Chrome
Screen.Recording.2026-06-27.at.22.10.56.mov
iOS: Native
Screen.Recording.2026-06-27.at.21.41.51.mov
iOS: mWeb Safari
Screen.Recording.2026-06-27.at.21.40.18.mov
MacOS: Chrome / Safari
Screen.Recording.2026-06-27.at.21.36.15.mov