You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-09-14] Page count is shown and blocks Mapbox when new receipt is generating after editing distance #100342
Version Number: 9.4.70-0 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#97813 Email or phone of affected tester (no customers):jsdoijnodsdisojo@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.5 / Chrome App Component: Money Requests
Action Performed:
Go to staging.new.expensify.com
Go to workspace chat.
Create a map distance expense with many waypoints so that the receipt has more than 1 page.
Open the expense.
Click Distance.
Edit the distance and save it.
Expected Result:
Page count will be hidden when new receipt is generating after editing distance.
Actual Result:
Page count is shown and blocks Mapbox logo when new receipt is generating after editing distance.
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Classification: Frontend bug Causing PR: #97813 - "Show a page count badge on multi-page PDF receipts" by @ishpaul777 (High confidence) Related Issues: #100332 (StagingDeployCash — PR #97813 is line item 26)
Recommendation: ROLL FORWARD
The badge's visibility condition is missing the one guard the rest of that file already uses (isPendingReceiptRegeneration), so this is a one-line fix in a single expression. A revert would tear out an entire feature (badge + 11 language files + styles + Onyx type + unit tests) whose backend counterpart is already deployed, to fix a stale-overlay condition.
// Show the count badge only after a multi-page PDF receipt loads. While a distance receipt is regenerating the// container swaps the PDF for a live map, which has no pages and whose Mapbox logo sits in the same corner.constshouldShowReceiptPageCount=receiptPageCount>1&&Str.isPDF(receiptURIs?.filename??'')&&!isLoading&&!isPendingReceiptRegeneration;
isPendingReceiptRegeneration is already computed at line 194 and is the same guard behind canShowDistanceEReceipt (L197), shouldDisableExpandReceipt (L200), and canHoverZoomReceipt (L299), so no new state is needed.
Worth covering the sibling case in the same fix: ReportActionItemImage.tsx:145 also substitutes the map when the transaction has route/waypoint errors (hasErrors), which strands the badge over a map the same way.
Assigned: @ishpaul777 (PR author), @MonilBhavsar and @abzokhattab (approving reviewers) from PR #97813 — already assigned by Melvin Labels: No changes. DeployBlockerCash stays (an App PR caused this and the fix is in App). DeployBlocker was never applied, so nothing to remove.
receipt.pageCount did not exist in the codebase before this PR. It introduces the field on the Onyx type and is its only renderer, so no other PR can produce a "1 of N" indicator.
The symptom is precisely the badge's geometry: the badge is position: 'absolute', bottom: 12, left: 12, and the Mapbox logo is placed at left: 8, bottom: 8. Same corner.
Verification
Affected files, all touched by PR #97813 except the last two, which explain the interaction:
Confirmed with gh pr view 97813 --json files: the PR modifies MoneyRequestReceiptView.tsx, src/styles/index.ts, src/types/onyx/Transaction.ts, src/libs/actions/IOU/Receipt.ts, src/libs/actions/MergeTransaction.ts, src/libs/DebugUtils.ts, the 11 language files and one new test file. Nothing else in the repo reads receipt.pageCount.
Root Cause
Saving a distance edit writes a pending action onto the transaction's pendingFields. hasPendingDistanceReceiptRegeneration turns true, so ReportActionItemImage stops loading the now-stale receipt URL and renders a live ConfirmedRoute map instead. The receipt box is therefore showing a Mapbox map, not a PDF.
The page-count badge, however, is rendered as a sibling of that image (deliberately, so hover-zoom doesn't scale it), and its condition only asks three things: receiptPageCount > 1, Str.isPDF(receiptURIs?.filename) and !isLoading. All three still hold during regeneration:
receipt.pageCount is untouched by the distance edit — nothing resets it the way replaceReceipt resets it to null in Receipt.ts:213.
receiptURIs.filename still points at the stale PDF, so Str.isPDF is still true.
isLoading was already false from the pre-edit render, and the component doesn't remount, so it stays false.
So the badge keeps rendering with the old PDF's page count, absolutely positioned at bottom-left, directly on top of the Mapbox logo at bottom-left of the substituted map. It is both wrong (the map has no pages) and it obscures the Mapbox attribution logo, which is why this is more than cosmetic.
2026-09-01, abzokhattabapproved it again after the backend shipped. "LGTM i updated the screenshots after the backend merge .. it looks good to me"
He then approved the fix PR on 2026-09-04. That work is cleanup of a fault his own approval let through, so it is inside the original job price and earns nothing here.
Melvin applied the wrong rule. The Contributor is a Backend Contributor, so Melvin correctly zeroed ishpaul777 and then paid the reviewer in full. That is the right answer on an ordinary issue. It is the wrong answer on a regression issue, because the reviewer is on the offending PR.
Matt answered: "I'm assuming payment isn't due cuz this regression came from the PR you two worked on."
truph01agreed: "This issue doesn't need payment, since it is a follow-up issue."
Two more cases run the same way, #91136 and #98923. All three paid 0%.
The counterargument, if `abzokhattab` appeals
He can argue he could not have caught this. His first approval says he could only test on web, because the three backend PRs had not shipped and pageCount did not exist yet. The bug needs a multi-page distance receipt, which needs that backend.
The record answers it. He approved a second time on 2026-09-01, after the backend merged, and said he updated the screenshots. So he did retest with the feature live.
The C+ doc also lets the assigned internal engineer waive the reviewer penalty for a large PR that introduces new functionality. PR #97813 does introduce new functionality, but at 18 files and +130 lines it is not large. MonilBhavsar can still rule on it.
Two things to handle outside this issue
The twin issue pays nothing either.#100336 has the same offending PR, the same fix PR, the same assignees and the same payment date. Melvin will have proposed $250 there too. Paying both is $500.
The penalty belongs on the original job. PR #97813 is titled "[Payment due @abzokhattab]" and closed Expensify/Expensify#667914. That is where abzokhattab gets paid for this work, and that is where the regression cut applies. #97813 caused two confirmed regressions, #100336 and this one, and the rule for two or more is 25% of the job price. Worth checking on 667914 before it is paid, if it has not been paid already.
The Contributor+ checklist is still outstanding. It gates the regression test case, not the money, so it does not change anything above. The standing ask: plz complete the Contributor+ checklist and tag me in a post once you have. Thx
On a live run this would tag abzokhattab and MonilBhavsar. It tags nobody here, because the comment carries a test marker.
Claude posting on behalf of Matt. PAYRUBRICTEST v2
Activity
applause-bot commentedon Sep 3, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/b4e78e68a339212acc80426784db5c3fa5150295f563e71772d7d1c9616295ba
melvin-bot commentedon Sep 3, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #97813
melvin-bot commentedon Sep 3, 2026
@MonilBhavsar @abzokhattab you have been assigned to this deploy blocker because you reviewed the offending PR: #97813
melvin-bot commentedon Sep 3, 2026
@ishpaul777 you have been assigned to this deploy blocker because you authored the offending PR: #97813
github-actions commentedon Sep 3, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
melvin-bot commentedon Sep 3, 2026
💬 A slack conversation has been started in #expensify-open-source
MelvinBot commentedon Sep 3, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #97813 - "Show a page count badge on multi-page PDF receipts" by @ishpaul777 (High confidence)
Related Issues: #100332 (StagingDeployCash — PR #97813 is line item 26)
Recommendation: ROLL FORWARD
The badge's visibility condition is missing the one guard the rest of that file already uses (
isPendingReceiptRegeneration), so this is a one-line fix in a single expression. A revert would tear out an entire feature (badge + 11 language files + styles + Onyx type + unit tests) whose backend counterpart is already deployed, to fix a stale-overlay condition.Suggested fix —
MoneyRequestReceiptView.tsx:560:isPendingReceiptRegenerationis already computed at line 194 and is the same guard behindcanShowDistanceEReceipt(L197),shouldDisableExpandReceipt(L200), andcanHoverZoomReceipt(L299), so no new state is needed.Worth covering the sibling case in the same fix:
ReportActionItemImage.tsx:145also substitutes the map when the transaction has route/waypoint errors (hasErrors), which strands the badge over a map the same way.Assigned: @ishpaul777 (PR author), @MonilBhavsar and @abzokhattab (approving reviewers) from PR #97813 — already assigned by Melvin
Labels: No changes.
DeployBlockerCashstays (an App PR caused this and the fix is in App).DeployBlockerwas never applied, so nothing to remove.📋 Detailed Analysis
Evidence
2026-09-03T18:04:45Z; this issue was filed2026-09-03T19:12:57Z— about one hour later, in the same deploy.N/A - new feature, doesn't exist in prod.receipt.pageCountdid not exist in the codebase before this PR. It introduces the field on the Onyx type and is its only renderer, so no other PR can produce a "1 of N" indicator.position: 'absolute', bottom: 12, left: 12, and the Mapbox logo is placed atleft: 8, bottom: 8. Same corner.Verification
Affected files, all touched by PR #97813 except the last two, which explain the interaction:
src/components/ReportActionItem/MoneyRequestReceiptView.tsx#L560—shouldShowReceiptPageCount(added by the PR)src/components/ReportActionItem/MoneyRequestReceiptView.tsx#L718-L723— theBadgerender, a sibling of theReceiptHoverZoomwrapper (added by the PR)src/styles/index.ts#L4039-L4044—receiptPageCountBadge,bottom: 12, left: 12(added by the PR)src/components/ReportActionItem/ReportActionItemImage.tsx#L145—showMapAsImage, which swaps the receipt image for a liveConfirmedRoutemap (L159-L172)src/components/MapView/MapView.tsx#L278—logoPosition={{...styles.l2, ...styles.b2}}, i.e. the Mapbox logo at left 8 / bottom 8Confirmed with
gh pr view 97813 --json files: the PR modifiesMoneyRequestReceiptView.tsx,src/styles/index.ts,src/types/onyx/Transaction.ts,src/libs/actions/IOU/Receipt.ts,src/libs/actions/MergeTransaction.ts,src/libs/DebugUtils.ts, the 11 language files and one new test file. Nothing else in the repo readsreceipt.pageCount.Root Cause
Saving a distance edit writes a pending action onto the transaction's
pendingFields.hasPendingDistanceReceiptRegenerationturns true, soReportActionItemImagestops loading the now-stale receipt URL and renders a liveConfirmedRoutemap instead. The receipt box is therefore showing a Mapbox map, not a PDF.The page-count badge, however, is rendered as a sibling of that image (deliberately, so hover-zoom doesn't scale it), and its condition only asks three things:
receiptPageCount > 1,Str.isPDF(receiptURIs?.filename)and!isLoading. All three still hold during regeneration:receipt.pageCountis untouched by the distance edit — nothing resets it the wayreplaceReceiptresets it tonullinReceipt.ts:213.receiptURIs.filenamestill points at the stale PDF, soStr.isPDFis still true.isLoadingwas alreadyfalsefrom the pre-edit render, and the component doesn't remount, so it staysfalse.So the badge keeps rendering with the old PDF's page count, absolutely positioned at bottom-left, directly on top of the Mapbox logo at bottom-left of the substituted map. It is both wrong (the map has no pages) and it obscures the Mapbox attribution logo, which is why this is more than cosmetic.
view run
13 remaining items
melvin-bot commentedon Sep 13, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Sep 13, 2026
Payment Summary
Resolving PRs:
[CP Staging] Fix stale/missing receipt page count badge across distance edits #100357
Reviewer: @abzokhattab owed $250 via NewDot
Contributor: @ishpaul777 does not require payment (Contractor)
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon Sep 16, 2026
Claude posting on behalf of Matt:
Nothing is due on this issue. Not $250.
abzokhattabapproved the offending PR twice, so this regression came from a PR he reviewed.ishpaul777, merged 2026-09-03. 18 files, +130 / -1ishpaul777, merged 2026-09-04. 4 files, +111 / -1ishpaul777authored the offending PR, and he is a Backend Contributorabzokhattabapproved the offending PR on 2026-08-14 and approved it again on 2026-09-01abzokhattababzokhattabappeals. The counterargument is belowWhy nothing is due
Melvin named the reviewers itself: "@MonilBhavsar @abzokhattab you have been assigned to this deploy blocker because you reviewed the offending PR".
The approvals are on the record:
abzokhattabapproved PR [Payment due @abzokhattab] Show a page count badge on multi-page PDF receipts #97813. "LGTM .. i was only able to test it on web since the backend is not yet deployed"abzokhattabapproved it again after the backend shipped. "LGTM i updated the screenshots after the backend merge .. it looks good to me"He then approved the fix PR on 2026-09-04. That work is cleanup of a fault his own approval let through, so it is inside the original job price and earns nothing here.
Melvin applied the wrong rule. The Contributor is a Backend Contributor, so Melvin correctly zeroed
ishpaul777and then paid the reviewer in full. That is the right answer on an ordinary issue. It is the wrong answer on a regression issue, because the reviewer is on the offending PR.The precedent, which is nearly identical
#98833. PR #97671 by
truph01caused a deploy blocker.daledahandmollfprapproved it. Melvin proposed $250 each totruph01anddaledah.Matt answered: "I'm assuming payment isn't due cuz this regression came from the PR you two worked on."
truph01agreed: "This issue doesn't need payment, since it is a follow-up issue."Two more cases run the same way, #91136 and #98923. All three paid 0%.
The counterargument, if `abzokhattab` appeals
He can argue he could not have caught this. His first approval says he could only test on web, because the three backend PRs had not shipped and
pageCountdid not exist yet. The bug needs a multi-page distance receipt, which needs that backend.The record answers it. He approved a second time on 2026-09-01, after the backend merged, and said he updated the screenshots. So he did retest with the feature live.
The C+ doc also lets the assigned internal engineer waive the reviewer penalty for a large PR that introduces new functionality. PR #97813 does introduce new functionality, but at 18 files and +130 lines it is not large.
MonilBhavsarcan still rule on it.Two things to handle outside this issue
The twin issue pays nothing either. #100336 has the same offending PR, the same fix PR, the same assignees and the same payment date. Melvin will have proposed $250 there too. Paying both is $500.
The penalty belongs on the original job. PR #97813 is titled "[Payment due @abzokhattab]" and closed Expensify/Expensify#667914. That is where
abzokhattabgets paid for this work, and that is where the regression cut applies. #97813 caused two confirmed regressions, #100336 and this one, and the rule for two or more is 25% of the job price. Worth checking on 667914 before it is paid, if it has not been paid already.The Contributor+ checklist is still outstanding. It gates the regression test case, not the money, so it does not change anything above. The standing ask: plz complete the Contributor+ checklist and tag me in a post once you have. Thx
On a live run this would tag
abzokhattabandMonilBhavsar. It tags nobody here, because the comment carries a test marker.Claude posting on behalf of Matt.
PAYRUBRICTEST v2mallenexpensify commentedon Sep 16, 2026
Going to close as not due payment, will leave open for a pass in case anyone wants to comment
abzokhattab commentedon Sep 23, 2026
Can be closed as its handled in #100336