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
feat: render high-res PDF overlay on receipt hover zoom #93627
PDF receipts are served as low-resolution JPG thumbnails by the server. When users hover to zoom on web, the magnification is applied to an upscaled raster image, making PDF text appear blurry instead of sharp.
Solution
Added ReceiptPDFOverlay, a web-only component that renders the actual PDF at 2.5× its on-screen size (via CSS scale) so hover-zoom reveals real PDF pixels. A native no-op stub keeps bundling clean. Extracted HOVER_ZOOM_SCALE to CONST.RECEIPT for shared use, and integrated the overlay into ReportActionItemImage with graceful fallback to the JPG thumbnail when the PDF fails to load.
This is a feature already implemented in Expensify/App#93583. The core approach is sound, but the PR bundles a non-obvious behavior change to distance-receipt handling that should be confirmed as intentional.
How the fix works (sound): The JPG thumbnail stays as the instant preview. On web with hover support, ReceiptPDFOverlay mounts the real PDF on top via PDFPreviewer, rendered at HOVER_ZOOM_SCALE (2.5×) its box size and CSS-scaled back down by 1/2.5 so it visually matches the thumbnail. When ReceiptHoverZoom magnifies the whole layer by the same 2.5× on hover, the PDF reaches its native render resolution → sharp text. On PDF load failure it renders null, revealing the JPG underneath. Native is a no-op stub. This composition is correct and the shared CONST.RECEIPT.HOVER_ZOOM_SCALE keeps the two scales in lockstep.
⚠️ Main risk — distance-receipt behavior change (verify intent): The PR replaces the inline isDistanceRequest && !isManualDistanceRequest in MoneyRequestReceiptView with a new shared isMapBasedDistanceRequest, but the two are not equivalent. This drives canShowReceiptActions, so the change affects which distance receipts show action buttons — beyond the stated PDF-zoom scope.
Transaction
Old isMapDistanceRequest
New isMapBasedDistanceRequest
Odometer
true (actions hidden)
false (actions now shown)
Plain distance w/o waypoints
true
false
distance-manual w/ waypoints
false
true (the documented intent)
The distance-manual-with-waypoints case is the intended fix, but the odometer and waypoint-less rows are side effects that flip receipt-action visibility. Worth a deliberate check.
Evidence & investigation details
Old inline logic: MoneyRequestReceiptView.tsx — removed const isMapDistanceRequest = !!transaction && isDistanceRequest && !isManualDistanceRequest(transaction), now isMapBasedDistanceRequest(transaction).
Overlay gating: ReportActionItemImage.tsx — isRemotePDF = isPDF && !isLocalFile && !isEReceipt && !isMapBasedDistanceRequest && !!pdfSourceURL, then && canZoomReceipt && hasHoverSupport(). canZoomReceipt is only passed from MoneyRequestReceiptView (single-receipt detail view), so only one PDF is ever overlaid at a time.
Minor (low priority): The PDFPreviewer mounts and renders eagerly at 2.5× as soon as the detail view opens, not on first hover. For the single-receipt detail view this is fine, but it is upfront work behind an interaction that may never happen — mounting on first hover would avoid it if PDF render cost becomes a concern.
Alternative explanations considered: Could the blur be fixed by serving a higher-res thumbnail server-side instead? Yes, but that is a backend change outside App; the client-side overlay is a reasonable App-only fix.
Next Steps: Reply with @MelvinBot <feedback> to refine this analysis. The approach in #93583 looks good to ship once the isMapBasedDistanceRequest behavior change above is confirmed intentional (or scoped to only the distance-manual-with-waypoints case).
changed the title [-]feat: render high-res PDF overlay on receipt hover zoom[/-][+][Due for payment 2026-06-25] feat: render high-res PDF overlay on receipt hover zoom[/+]on Jun 18, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.14-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@ZhenjaHorbach The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
@mountiny@WojtekBoman@ZhenjaHorbach this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
Activity
MelvinBot commentedon Jun 15, 2026
Issue Analysis
This is a feature already implemented in Expensify/App#93583. The core approach is sound, but the PR bundles a non-obvious behavior change to distance-receipt handling that should be confirmed as intentional.
How the fix works (sound): The JPG thumbnail stays as the instant preview. On web with hover support,
ReceiptPDFOverlaymounts the real PDF on top viaPDFPreviewer, rendered atHOVER_ZOOM_SCALE(2.5×) its box size and CSS-scaled back down by1/2.5so it visually matches the thumbnail. WhenReceiptHoverZoommagnifies the whole layer by the same 2.5× on hover, the PDF reaches its native render resolution → sharp text. On PDF load failure it rendersnull, revealing the JPG underneath. Native is a no-op stub. This composition is correct and the sharedCONST.RECEIPT.HOVER_ZOOM_SCALEkeeps the two scales in lockstep.isDistanceRequest && !isManualDistanceRequestinMoneyRequestReceiptViewwith a new sharedisMapBasedDistanceRequest, but the two are not equivalent. This drivescanShowReceiptActions, so the change affects which distance receipts show action buttons — beyond the stated PDF-zoom scope.isMapDistanceRequestisMapBasedDistanceRequesttrue(actions hidden)false(actions now shown)distancew/o waypointstruefalsedistance-manualw/ waypointsfalsetrue(the documented intent)The
distance-manual-with-waypoints case is the intended fix, but the odometer and waypoint-less rows are side effects that flip receipt-action visibility. Worth a deliberate check.Evidence & investigation details
MoneyRequestReceiptView.tsx— removedconst isMapDistanceRequest = !!transaction && isDistanceRequest && !isManualDistanceRequest(transaction), nowisMapBasedDistanceRequest(transaction).TransactionUtils/index.ts:187-193—falsefor odometer; otherwiseisMap || isGPS || hasWaypoints.canShowReceiptActions = hasReceipt && !isLoading && isEditable && !isMapDistanceRequest && !mergeTransactionID.ReceiptPDFOverlay/index.tsx(oversample 250% +scale(1/2.5)), wrapped byReceiptHoverZoom/useReceiptHoverZoom.tswhich appliestransform: scale(scale)onpointermove.ReportActionItemImage.tsx—isRemotePDF = isPDF && !isLocalFile && !isEReceipt && !isMapBasedDistanceRequest && !!pdfSourceURL, then&& canZoomReceipt && hasHoverSupport().canZoomReceiptis only passed fromMoneyRequestReceiptView(single-receipt detail view), so only one PDF is ever overlaid at a time.Minor (low priority): The
PDFPreviewermounts and renders eagerly at 2.5× as soon as the detail view opens, not on first hover. For the single-receipt detail view this is fine, but it is upfront work behind an interaction that may never happen — mounting on first hover would avoid it if PDF render cost becomes a concern.Alternative explanations considered: Could the blur be fixed by serving a higher-res thumbnail server-side instead? Yes, but that is a backend change outside App; the client-side overlay is a reasonable App-only fix.
Next Steps: Reply with
@MelvinBot <feedback>to refine this analysis. The approach in #93583 looks good to ship once theisMapBasedDistanceRequestbehavior change above is confirmed intentional (or scoped to only thedistance-manual-with-waypoints case).[-]feat: render high-res PDF overlay on receipt hover zoom[/-][+][Due for payment 2026-06-25] feat: render high-res PDF overlay on receipt hover zoom[/+]melvin-bot commentedon Jun 18, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jun 18, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.14-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-06-25. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jun 18, 2026
@ZhenjaHorbach The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
melvin-bot commentedon Jun 18, 2026
@ZhenjaHorbach Whoops! This issue is 2 days overdue. Let's get this updated quick!
13 remaining items
melvin-bot commentedon Jun 29, 2026
@mountiny @WojtekBoman @ZhenjaHorbach this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
WojtekBoman commentedon Jun 30, 2026
I created a draft PR for this: #94560. Once I've polished it, I'll send it to review :)
melvin-bot commentedon Jul 27, 2026
This issue has not been updated in over 15 days. @mountiny, @WojtekBoman, @ZhenjaHorbach eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
ZhenjaHorbach commentedon Jul 28, 2026
We have one issue that we decided to fix in a separate PR
melvin-bot commentedon Sep 23, 2026
@mountiny, @WojtekBoman, @ZhenjaHorbach, this Monthly task hasn't been acted upon in 6 weeks; closing.
If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead.
ZhenjaHorbach commentedon Sep 24, 2026
@MelvinBot
Reopen this issue
MelvinBot commentedon Sep 24, 2026
🤖 Reopened.
ZhenjaHorbach— this was auto-closed as a staleMonthlytask. It's open again. Both feat: render high-res PDF overlay on receipt hover zoom and [Payment due @ZhenjaHorbach] fix(ReceiptImage): render local PDF receipts via LocalPDFReceiptPreview are merged, so the remaining follow-up you flagged still needs its own PR.view run