Repository navigation
Conversation
|
@abzokhattab 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
Here are some automated review suggestions for this pull request.
Reviewed commit: 98b2144d3a
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0d4d2963ef
ℹ️ 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".
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
@codex review |
|
@MelvinBot review the changes |
Code ReviewThe fix is sound — it mirrors the existing Verified:
Two minor non-blocking observations
Overall this looks good to merge. Clean separation of concerns, follows established patterns, and comprehensive test coverage. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cb2c0631eb
ℹ️ 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".
|
@MelvinBot Review |
Updated Review (post April 28 commits)Since my last review, two new commits landed:
Verdict: Good hardening. The guard now correctly requires all four preconditions ( No new concerns. Previous review assessment still holds — this looks good to merge. |
|
thanks i would review it later today |
|
Bug: When duplicating an expense within the report, a new report is created. The expected result should be that a new expense is created within the same report: Screen.Recording.2026-04-30.at.19.24.57.mov |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
@TaduJR kind reminder on this #88327 (comment) |
|
|
|
All contributors have signed the CLA ✍️ ✅ |
0fd0061 to
078c2a1
Compare
Explanation of Change
Symptom: Duplicating an expense while viewing its iouReport visibly swaps the chat-like
ReportActionsViewfor the table-styleMoneyRequestReportActionsList— perceived as an unexpected "highlight animation / navigation change" on the added expense.Root cause:
duplicateExpenseTransactiongenerated optimistic IDs but never calledcreateNewReport, so the BE'sREQUEST_MONEYattached the duplicate to the chat's openiouReportID. The viewed report went from 1 → 2 transactions, flippingshouldDisplayReportTableViewfalse → trueand swapping the subtree.Fix: Mirror
duplicateReport(bulk flow). BeforerequestMoney, callcreateNewReportto materialize a dedicated iouReport on the BE, then pass it asexistingIOUReport. The viewed report is untouched — no subtree swap.Follow-up fix (UI consistency): Once duplicates always go to a fresh iouReport, the
activePolicyExpenseChat?.iouReportID === moneyRequestReport?.reportIDbranch inshouldDuplicateCloseModalOnSelectbecame a stale workaround. It closed the dropdown instantly on the first click (no ✓) while later clicks showed the smooth ✓ → fade. Dropped, soDUPLICATE_EXPENSEmatchesDUPLICATE_REPORT(alwaysshouldCloseModalOnSelect: false).Scope of change:
src/libs/actions/IOU/Duplicate.ts— accept optionalownerPersonalDetails; pre-create viacreateNewReportwhentargetPolicy + ownerPersonalDetailsand noexistingIOUReport.src/hooks/useExpenseActions.ts— passownerPersonalDetails; drop the stale iouReport-equality condition.src/components/MoneyRequestHeaderSecondaryActions.tsx— passownerPersonalDetails(second live entry point for single-expense duplicate).tests/actions/IOUTest/DuplicateTest.ts— 4 new tests:CREATE_APP_REPORTfires under the new branch; its report flows toREQUEST_MONEY; back-compat whenownerPersonalDetailsis omitted; bulk-duplicate path untouched whenexistingIOUReportis passed.Fixed Issues
$ #86354
PROPOSAL: #86354 (comment)
Tests
Prerequisite: Account with at least one workspace (paid group workspace — TEAM or CORPORATE).
Offline tests
Same as tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same as 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
Android: Native
Android-Native.mp4
Android: mWeb Chrome
Android-mWeb.mp4
iOS: Native
iOS-Native.mp4
iOS: mWeb Safari
iOS-Safari.mp4
MacOS: Chrome / Safari
Macbook-Chrome.mp4