fix: Home - Action button disappears the second time an expense is opened from "Recently Added"#94466
Conversation
…ened from "Recently Added"
|
LGTM |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@ZhenjaHorbach 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] |
There was a problem hiding this comment.
💡 Codex Review
App/src/libs/TransactionThreadNavigationUtils.ts
Lines 56 to 57 in d4bcf47
When the Recently Added row is backed only by the Search snapshot, the parent IOU action can be absent from the main reportActions_ collection even though it was present in searchResults.data (for example after clearing Onyx or for an expense added on another device). In that case getIOUActionForReportID() returns nothing here and we still navigate to the parent report; opening that parent can then create the transaction thread, so the next tap routes to the thread and the first/second-open header inconsistency remains. The descriptor needs to carry the snapshot ReportAction/parent report so this path can create the thread without depending on hydrated main Onyx actions.
ℹ️ 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".
@mhawryluk |
yeah, I will look into this |
@ZhenjaHorbach should be fixed now, I also updated steps in Tests that I thought would cover it, but actually I'm not able to reproduce the supposed issue (it requires the transaction's IOU action to not be in Onyx and it never happens to me) |
trjExpensify
left a comment
There was a problem hiding this comment.
Bug fix for new feature 👍
|
🚧 grgia has triggered a test Expensify/App build. You can view the workflow run here. |
grgia
left a comment
There was a problem hiding this comment.
NAB. Heads up @mhawryluk this might overlap with #94308 and #94180 on useRecentlyAddedData.ts and TransactionThreadNavigationUtils.ts. Maybe worth confirming merge order with @adamgrzybowski ?
|
For some reason in this branch we don't show loader for expenses after clearing cache or relogin 2026-06-26.13.01.42.mov |
This comment has been minimized.
This comment has been minimized.
|
@grgia There shouldn't be any overlap, but just in case, let's merge PRs you mentioned first and this one last |
I'm looking into this, but so far I'm not able to reproduce it. if I understand correctly the issue is the view disappearing briefly, right? does it always happen or only on some platforms/accounts? |
|
okay, that makes sense. it definitely could be related to these changes. the skeleton only shows up when the thread's reportID is undefined and not when it is in other ways incomplete and |
|
but since I'm not able to reproduce, could you confirm that it does not happen on main? @ZhenjaHorbach |
|
Unfortunately, on main everything is good |
…rges the report to the main onyx collections
|
@ZhenjaHorbach I pushed some code that I hope will fix it. I managed to kinda reproduce it, but by majorly changing the code to force |
|
Nice |
|
@mhawryluk |
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp2026-07-01.17.18.57.movAndroid: mWeb Chrome2026-07-01.17.16.22.moviOS: HybridApp2026-07-01.17.18.57.moviOS: mWeb Safari2026-07-01.17.16.22.movMacOS: Chrome / Safari2026-07-01.17.15.15.mov |
|
LGTM Only this comment was left
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 grgia 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/grgia in version: 9.4.27-1 🚀
|
|
🤖 Help site review — no docs changes required. I reviewed the changes in this PR against Expensify's help-site articles under Why no changes are requiredThis PR is an internal routing/navigation bug fix. It changes which view opens when tapping an expense in Home → Recently Added so that it consistently lands on the transaction thread view (the single-expense detail with the More menu and prev/next carousel) instead of occasionally showing the report view with Submit/Pay/Approve buttons on a second tap. All edits are in code (
I searched the help site for the relevant concepts:
Since this is a bug fix restoring intended behavior with no documented UI surface affected, no help-site update is needed, so I did not create a draft docs PR. If you believe a help article should describe this behavior, let me know which one and I'll draft the update. |
|
🚀 Deployed to production by https://github.com/grgia in version: 9.4.27-2 🚀
Bundle Size Analysis (Sentry): |

Explanation of Change
Opening the same expense from Home "Recently added" could show different header actions on consecutive taps: the first open sometimes showed the report view (
MoneyReportHeaderwith Submit/Pay/Approve), and the second showed the transaction thread view (MoneyRequestHeaderwith just "More"). The cause was thatgetReportIDToOpenForExpensedecided between the two based on whether the transaction thread was already known (childReportIDpresent in the Search snapshot). On a freshly created expense that's initially absent, so the first open fell back to the parent report, but opening it creates the thread, and the re-fired search then surfaced thechildReportID, so the second open routed to the thread instead. The transaction thread is the intended view here: it's the single expense detail and it hosts the prev/next carousel for swiping between recently added expenses. The report view only ever appeared via the fallback. Now every navigation from "Recently added" lands on the transaction thread (showing the "More" menu plus the prev/next carousel when there are siblings).Fixed Issues
$ #94311
PROPOSAL: N/A
Tests
Offline tests
N/A
QA Steps
Same as tests.
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
Nagranie.z.ekranu.2026-06-24.o.17.48.10.mov
MacOS: Chrome / Safari
Nagranie.z.ekranu.2026-06-24.o.15.28.13.mov
Nagranie.z.ekranu.2026-06-25.o.16.05.44.mov