Repository navigation
Show receipt page count badge for split expenses - #100361
MonilBhavsar merged 11 commits into
Conversation
buildOptimisticTransaction rebuilt the receipt from a fixed field list that omitted pageCount, so a multi-page receipt scanned into a split expense lost its page count on the child transactions the split creates.
ConfirmationReceiptThumbnail (used by the split expense confirmation flow) never had the page count badge added, so multi-page PDF receipts scanned into a split expense showed no page count at all.
isPDF can be boolean | undefined since isLocalFile is optional, so shouldShowReceiptPageCount needs a boolean coercion before use in JSX.
The badge only rendered inside the PDFThumbnail branch, which requires isLocalFile (a blob/file:// path). Once a receipt is uploaded its source is a remote URL, so the split-details screen took the ReceiptImage branch instead and never showed the badge. Decouple the badge from isLocalFile and render it as a sibling of both branches.
|
@MonilBhavsar 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 SummaryThis 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. |
…se-receipt-page-count
|
@abzokhattab what's your ETA to review? |
|
i missed this one. Thanks for the reminder |
|
we have conflicts @ishpaul777 |
…se-receipt-page-count
|
fixed conflicts and merged main |
|
reviewing now ... btw we have failing eslint checks @ishpaul777 |
|
Found this bug:
Expected result: the page count badge should not appear until the receipt has finished loading. Actual result: the badge appears immediately along with the loading indicator. Screen.Recording.2026-09-18.at.00.20.21.mov |
|
@abzokhattab fixed the bug and fixed lint failing |
|
@codex @MelvinBot re-review |
|
🤖 Re-review of 1. Removing the preview
|
|
@abzokhattab can you complete your review, today? |
|
@trjExpensify Was already looking at it ... I already reviewed once and sent back a loading-badge bug .. and there are few points from melvin ... posting the checklist soon |
Reviewer Checklist
Screenshots/VideosMacOS: Chrome / SafariScreen.Recording.2026-09-21.at.13.26.55.mov |
abzokhattab
left a comment
There was a problem hiding this comment.
i verified the melvin suggested changes but they look incorrect ... only the 4th point regarding the tests is correct its also NAB
also the mentioned bug is now fixed
Screen.Recording.2026-09-21.at.13.25.57.mov
so approving.
|
🚧 MonilBhavsar 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/MonilBhavsar in version: 9.4.91-0 🚀
|
|
🤖 No help site changes are required for this PR, so I did not create a draft PR. Why: this PR fixes a bug in an existing visual affordance — the What I checkedThe change itself — all five changed files are component, util, and test code:
No copy was added or changed. The badge string already exists as The help site — I searched
So no existing article is now inaccurate, and the earlier PR that introduced the badge did not ship docs either. One more reason to hold off: per your PR description, the badge will not render for a new split until the linked backend PRs land, because the page count does not yet survive the split creation round trip. Documenting the badge before that would describe behavior users can't see yet. If you'd still like it documented, the natural home is a short FAQ entry under Attach and edit receipts on expenses — something like "Why does my PDF receipt show a Page 1 of N badge?" Reply with Since no help site PR was created, there is nothing to mark |
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.4.91-3 🚀
Bundle Size Analysis (Sentry): |




Explanation of Change
Show a page count badge on multi-page PDF receipts never showed the badge for split expenses.
ConfirmationReceiptThumbnail, used by the split confirmation screen, had no badge logic at all.buildOptimisticTransactionalso droppedreceipt.pageCountwhen building each split's child transaction. Both fixed here.The badge still won't render for a new split until the linked Auth and Web-Expensify PRs land too — the page count doesn't currently survive
StartSplitBill/CompleteSplitBillon the backend.Fixed Issues
$ #100350
PROPOSAL:
Backend counterparts, need to land together:
Tests
Offline tests
Same as Tests — creating and completing a split expense works the same offline, syncing once back online.
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Screen.Recording.2026-09-13.at.7.24.45.PM.mov