Repository navigation
Conversation
…s-linkedTransaction-from-search
… reads the deprecated transactions
getReportPreviewMessage only falls back to getLinkedTransaction when no transaction is passed, which is still the case for Search until Expensify#104079. Also formats the Omit list re-added in the main merge.
…inkedTransaction-from-search # Conflicts: # src/libs/ReportUtils.ts # tests/unit/ReportAlternateTextUtilsTest.ts # tests/unit/ReportUtilsTest.ts
getReportAlternateText no longer takes linkedTransaction since main added lastActionTransaction, so the transaction passed from Search was ignored.
getLinkedTransaction was its last reader, so Oxlint flagged it as assigned but never used. deprecatedReportsTransactions keeps the same Onyx.connect.
|
@MelvinBot review the code in this PR |
|
Found one issue: [P2] Subscribe using the last visible action
After splitting an expense, send and delete a newer comment, then open the share-destination picker. The collector sees the deleted comment and skips subscribing to the split transaction, while the preview still renders the split. With the global fallback removed, it returns stored action text instead of transaction-derived content—for example, losing the receipt-scanning status. Tracked expenses have the same mismatch. Recommendation: Collect transaction IDs using the same visible-action resolution as the preview, and add coverage for a newer deleted comment. Validation: Five focused linked-transaction unit tests passed. Browser behavior was not tested. |
…chat preview The Search chat preview line renders the last visible action, but the transaction IDs were taken from lastActions, the newest raw action. A newer deleted, pending-delete or failed comment made the two differ, so the split's transaction was never subscribed to and the preview lost its merchant once the global lookup was removed. Collect the IDs with getSplitAndTrackTransactionIDs, which reads the first visible action in sortedActions. Use it for the share destination list and for the Search router, which calls getSearchOptions directly and passed no transaction at all.
|
@MelvinBot review the code in this PR |
|
No actionable issues found in the updated code. The visible-action collector addresses the previous deleted-comment finding, and both search and share previews receive the linked transactions. Validation: All 2,946 tests across seven relevant suites passed. Browser testing was not performed. |
|
@DylanDylann 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 Summary: ✅ CompletedThis 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. |
|
No product review needed. |
|
@linhvovan29546 can you run fmt again |
…inkedTransaction-from-search # Conflicts: # src/components/Search/SearchAutocompleteList.tsx
|
Done |
…inkedTransaction-from-search # Conflicts: # src/components/Search/SearchAutocompleteList.tsx # src/libs/OptionsListUtils/index.ts # src/libs/ReportAlternateTextUtils.ts
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-11-26.at.16.05.54.mov |
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! 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". |
|
Hey @linhvovan29546 could you merge main please, that should fix the failing check |
…inkedTransaction-from-search # Conflicts: # src/libs/OptionsListUtils/index.ts
Main changed getAlternateText to take report as a config param instead of reading it internally via getReportOrDraftReport, so the test's buildConfig call needs it explicitly too, like its sibling tests already do.
0b5438d to
7121d31
Compare
Done |
|
🚧 Julesssss 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/Julesssss in version: 9.5.57-0 🚀
|
|
No help site update needed — this PR restores expected split and tracked expense previews in search and sharing without adding a workflow or making existing article instructions incorrect. |
Explanation of Change
Part of #66418. After #104006,
getReportPreviewMessageno longer reads the deprecated global transactions, but its split and track branches still need the caller to hand in the transaction. A split/track action's transaction isn't part of its own chat (splitreportIDis-2, an unreported track expense is0), so without it the preview falls back to the stored action text and loses the merchant and scanning state. Until now the Search paths hid that behind the globalgetLinkedTransactionfallback.This PR makes the Search paths pass the transaction explicitly and removes that fallback:
getLastMessageTextForReportnow requireslastActionand no longer falls back togetLastVisibleAction. It forwardslastActionTransactiontogetReportPreviewMessage.getSearchOptionstakessplitAndTrackTransactionsand resolves the matching transaction per option for the chat preview line.getSplitAndTrackTransactionIDsinReportAlternateTextUtilsfinds the split/track transaction IDs from each report's last visible action (isReportActionVisibleAsLastAction, now exported). It must use the last visible action, not the newest raw one. The preview renders the last visible action, so a deleted, pending-delete or failed newer action would otherwise make the two differ and the preview would lose the transaction.SearchAutocompleteList) and the share-destination picker (useSearchSelector,SEARCH_CONTEXT_SHARE_DESTINATION) read those transactions withuseTransactionsByIDand pass them down. Both stay onuseOnyx, since the value is rendered (Onyx.getis for event handlers only).deprecatedAllTransactionsis removed fromReportUtils. The general path prefers the passed-in transaction when its ID matches the action'sIOUTransactionID, otherwise it looks in the report's own transactions.Fixed Issues
$ #66418
PROPOSAL: N/A
Tests
You: split xxxx for LunchA.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
Screen.Recording.2026-11-13.at.17.49.35.mov
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-11-13.at.17.13.12.mov