[Home Page] Add Recently added slot to Home#93451
Conversation
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx ts-node ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
|
🚧 @JmillsExpensify has triggered a test Expensify/App build. You can view the workflow run here. |
|
Triggered an adhoc, will test when it's ready. |
This comment has been minimized.
This comment has been minimized.
|
It works for me, though the most recent expenses don't seem to be right. |
|
It's showing my most recent expense as april 12, though on the Spend page my most recent expense is June 12 |
|
I'll share my details in Slack. Also for the empty state, we ended up changing the wording. The sub-text should be "Create one or drag a receipt here." |
|
Totally agree with those points Jon. Ideally we would share styles between the two if possible so we don't need to manage the same exact thing in multiple places. |
This comment has been minimized.
This comment has been minimized.
TDD red phase: cover the recent-expenses data hook selection (sort by inserted, current-user scope, 5-row cap, status agnostic), the section's empty state, rows, RHP navigation and overflow menu, and the updated Home slot ordering with Discover relocation. Implementation follows.
a1f0f5a to
815f807
Compare
|
@adamgrzybowski ping when youre ready for a build! |
|
@grgia I am fixing one more thing, will let you know soon |
|
@grgia @JmillsExpensify Should work now. You can retest it. I will clean the code from any leftovers tomorrow, so I would skip the code review for now |
|
🚧 @grgia has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
@JmillsExpensify Curious what you would do to standardize here? We could style the more menu as an icon button so it had a similar vibe to the view button maybe? Or we could put the view button behind a more menu to mimic the recently added card (I think I might like that better, but it's MORE CLICKS!!!! 😱). cc @Expensify/design for more thoughts on Jason's comment. |
@JmillsExpensify It's the same as on the spend page. The zoomed receipt is in a fixed upper left position. How would you like to change this behavior? And do you think we could do it as follow up? Would be great to finally merge this PR 😄
@ZhenjaHorbach If we want to do something about it, let's do it as follow up 🙏
I would also ask for a follow up issue for that. Leaving it for later is not a deal breaker for functionality and it would speed up this PR
@ZhenjaHorbach The different sorting is by design. Spend is sorted by
@JmillsExpensify Let me know what the final decision is with this one, but it makes sense to me to unify this @dannymcclain |
|
I don't mind fixing these issues as a follow-up! |
|
Same here. Everything I said above is NAB. |
The hovered receipt preview is a portal on document.body that only hides on mouseleave, so it lingered over the RHP after opening an expense. Gate it on screen focus so it is dismissed once the home screen blurs.
No strong feelings. I assume @shawnborton did this for a reason. I'd expect a button, but given the Spend tab is right there I also don't mind just being more subtle here. |
|
The reason we originally landed on this is because of the potentially different sort. |
The Search snapshot doesn't return the transaction `inserted` field, so the recency sort was a no-op and newly added expenses fell outside the visible cap. Source `inserted` from the local transactions collection (falling back to `created`) so recently added expenses sort to the top.
|
I fixed the problem with many openReport calls discussed here One thing I want to mention before moving forward with the PR: the expense Search snapshot doesn't return the inserted field on transactions at all, so the logic for ordering the "Recently added" widget could be simpler. For now, we read I think we should create a follow up to add this property to the search on the backend. |
The hook falls back to the created date when an expense has no inserted timestamp, so the test now expects the created-only expense to outrank one with an earlier inserted timestamp.
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp2026-06-19.15.46.25.movAndroid: mWeb Chrome2026-06-19.15.50.40.moviOS: HybridApp2026-06-19.15.46.25.moviOS: mWeb Safari2026-06-19.15.50.40.movMacOS: Chrome / Safari2026-06-19.15.38.16.mov |
|
After opening the parent report and going back 2026-06-19.15.46.50.mov |
Opening a parent report in the same SEARCH_REPORT RHP overwrote and then cleared the underlying transaction-thread carousel's active IDs, so the prev/next carousel vanished on back-navigation. Save the carousel context present underneath the report on mount and restore it on unmount instead of unconditionally clearing.
|
Yup, agree with Jason's comments above. I would love to standardize on this three dots icon menu pattern for any time we need to add more buttons/nav options to the parent level of a widget. |
The previous overwrite-then-restore approach restored the Recently added carousel IDs through an async Onyx write, so for one frame the prev/next buttons reflected the parent report's transactions before settling. Instead, the parent report's transaction list now leaves a descriptor-backed carousel (the Recently added flow) untouched, so its IDs are never clobbered and there is nothing to restore. Row presses still seed siblings lazily via useNavigateToTransactionThread.
|
@ZhenjaHorbach, The carousel problem should be fixed |
Build a full Transaction via the test factory instead of an unsafe cast, and switch mock helpers to jest.mocked to stay under the seatbelt budget.
|
LGTM! |
|
@adamgrzybowski |
|
@adamgrzybowski tag me if you need any help making issues |
|
🚧 @grgia has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|




Explanation of Change
insertedtimestamp (when the expense was added to the system), most recent first and independent of the expense date, and capped at five rows. Each row shows the receipt thumbnail, expense date, merchant, and amount.Fixed Issues
$ #92658
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, 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.ScrollViewcomponent to make it scrollable when more elements are added to the page.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
Screen.Recording.2026-06-16.at.14.23.20.mov