Repository navigation
[4] Refactor Remaining TrackExpense related functions to pass current user data - #103467
Conversation
|
Check #103465 (comment) |
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. |
|
@ikevin127 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] |
|
@ikevin127 what should we do about the known issue in step 3 in offline tests? |
Reviewer Checklist
Screenshots/VideosMacOS: Chrome / Safaripr103467-ctest.mp4 |
@parasharrajat The code path that blanks From is identical on main. I worked out the cause from the code but didn't reproduce it in the app: It happens on main too, so it shouldn't block this PR. The fix looks like one line, the same thing const searchUpdate = getSearchOnyxUpdate({
transaction,
participant,
iouAction,
currentUserPersonalDetails,
transactionThreadReportID: transactionThreadReport?.reportID,
});For a self DM track, |
ikevin127
left a comment
There was a problem hiding this comment.
🟢 LGTM - Approved. I left two non-blocking comments: one about the duplicated current user params in createTransaction, and a missing test that the duplicate flow passes currentUserPersonalDetails through.
Response to your question, might require a change in this PR - but won't block on it.
| report: OnyxEntry<Report>; | ||
| currentUserAccountID: number; | ||
| currentUserEmail?: string; | ||
| currentUserPersonalDetails: CurrentUserPersonalDetails; |
There was a problem hiding this comment.
🟢 NAB: now that currentUserPersonalDetails is required here, currentUserAccountID and currentUserEmail pass the same data a second time. ScanSkipConfirmation already builds all three from one object.
Can we drop the two scalars and read them inside createTransaction instead? A follow-up is fine.
const {accountID: currentUserAccountID, login: currentUserEmail = ''} = currentUserPersonalDetails;👁️ Written by AI, reviewed by Kevin.
| targetPolicyTags, | ||
| policyTagList: targetPolicyTags ?? {}, | ||
| currentUser: {accountID: RORY_ACCOUNT_ID, email: RORY_EMAIL}, | ||
| currentUserPersonalDetails: {accountID: RORY_ACCOUNT_ID, login: RORY_EMAIL}, |
There was a problem hiding this comment.
🟢 NAB: these calls only pass {accountID, login}, so no test checks that the duplicate flow forwards currentUserPersonalDetails to trackExpense. If it gets dropped, getSearchOnyxUpdate falls back to Onyx and every test still passes.
Could you add one case like the trackExpense one in TrackExpenseTest.ts? Pass a displayName / avatar that differs from Onyx, duplicate a self DM expense, and assert the Search snapshot has the passed values.
👁️ Written by AI, reviewed by Kevin.
|
🚧 mountiny 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! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.5.54-0 🚀
|
|
No help site update needed — this PR refactors how existing expense tracking and duplication flows receive current-user data; it adds no new workflow and makes no existing article sentence incorrect. |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.5.54-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.5.54-6 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Fixed Issues
$ #66508
PROPOSAL:
Tests
Offline tests
QA Steps
Same as Tests and Offline tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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
23.11.2026_23.07.05_REC.mp4