Repository navigation
Remove the original expense from the prev/next carousel when it is split - #105671
Conversation
Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
|
I created this PR from an upstream branch since I don't have push access to your fork. To take ownership of this branch and be able to push updates, run: Then you can close this PR and open a new one from your fork. |
|
The failing Analysis: Oxlint reports 2 Fix: [No QA] Stop reading Onyx loading status on the company card Reimbursable page is already open to fix it. Once it merges, merge The other checks are passing or still running. |
|
🤖 Web test steps verification results: ✅ pass The PR's Tests section is still empty, so I ran the reproduction steps from the linked issue. After splitting Expense B and deleting both splits, the remaining expense (Expense A) shows no prev/next arrows and no "N of N" counter, so no arrow can lead to the "not here" page.
view run · no recording available |
|
@MelvinBot resolve conflicts |
1 similar comment
|
@MelvinBot resolve conflicts |
|
I couldn’t resolve the conflicts safely. The checkout is shallow, so Git cannot find the PR’s common ancestor with No files were changed or commits pushed. A checkout with the shared Git history is needed before retrying. |
|
@MelvinBot resolve conflicts The last attempt failed because the checkout was shallow and the full history fetch timed out. You don't need the full history. This PR branched from
Only one file should conflict:
Then run typecheck and the tests in |
Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
|
Merged
|
|
|
|
@MelvinBot Thanks for resolving the conflicts. The code looks good to me. Please update the PR description so it's ready for review:
Once that's done, please mark the PR as ready for review. |
|
@Krishna2323 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. |
|
Updated Tests, Offline tests, QA Steps, and the checklist as requested. Platform testing, screenshots, and unverified manual checks remain unticked. The PR is now ready for review. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid_chrome.mp4Android: mWeb Chromeandroid_chrome_r.mp4iOS: HybridAppios_native.mp4iOS: mWeb Safariios_mWeb.mp4MacOS: Chrome / Safariweb_chrome.mp4 |
|
@twisterdotcom want to review before i merge this? |
|
Nice, reviewed a few of the recordings in #105671 (comment). Very nice, very smooth. All good from a product perspective. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 Beamanator 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/Beamanator in version: 9.5.35-0 🚀
|
|
No help site update needed — this PR fixes expense navigation after splitting to behave as expected; it adds no new workflow and makes no existing article sentence incorrect. |
|
No FullStory changes needed — this PR only fixes expense carousel navigation after splitting, without adding new screens, interactions, user properties, or sensitive-content UI. |
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.5.35-3 🚀
Bundle Size Analysis (Sentry): |










Explanation of Change
Splitting an expense moves the original to the hidden split report (
SPLIT_REPORT_ID,-2), but unlike a regular move it never removed the original from the prev/next carousel seeded from the report it left. After you split B on a report with[A, B]and delete both splits, the carousel still held[A, B]. A showed "1 of 2", and the arrow opened B on report-2, which is the "Hmm... it's not here" page.OneTransactionThreadRedirectHandlerreads that raw carousel key too, so A's thread also skipped its single-expense redirect.updateSplitTransactions): when splits are first created, callremoveActiveTransactionIDsForReport([originalTransactionID], originalTransaction.reportID). This is the same helperremoveMovedTransactionsFromCarouseluses for every move. It only touches a carousel owned by that report, and clears it when fewer than 2 expenses remain. In the split-expenses flow it runs after the navigation transition, matching howwriteSplitdefers its optimistic data.useCarouselTransactionIDs): the selector also dropsisSplitContainerTransactionIDs. This covers carousels the split action doesn't own (Search, Home, duplicate review) until their owner refreshes.If the split request fails, the original goes back on its report, but the carousel isn't written back. That matches the existing rule for failed moves: the screen that owned the list may be gone by then. The worst case is a missing arrow stop until the list is seeded again, never a dead page.
Tests:
SplitTest.ts: splitting clears a report-owned[sibling, B]carousel. A failed split leaves[s1, B, s2]as[s1, s2]. A Search-owned carousel is left alone.MoneyRequestReportTransactionsNavigation.test.tsx: a sibling on the split report isn't counted and can't be opened.AI Tests
modern-screenshot, required by incomingmain; dependency installation was blocked. No PR typing errors were reported.lint-changed, spelling, and React Compiler checks did not complete within the local time limits. Theprettiernpm script no longer exists on incomingmain.Fixed Issues
$ #104307
PROPOSAL: #104307 (comment)
Tests
Offline tests
QA Steps
Same as tests
PR Author Checklist
Checked conditional items below are not applicable where this PR adds no UI, assets, message/markdown changes, Storybook changes, copy, new code pattern, or generic component changes. Unchecked execution items still require manual verification; the steps above are a test plan, not a claim that every step has been run.
### 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
iOS: mWeb Safari
MacOS: Chrome / Safari