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-08-24] [$250] Improve hover-to-zoom preview quality for non-PDF (image) receipts #96999
We recently shipped a high-res hover-to-zoom preview for PDF receipts (#93627 / PR #93583, now in production). That fix renders the actual PDF at a higher resolution so hover-zoom reveals sharp pixels.
However, the improvement was intentionally scoped to PDFs only. For non-PDF (image) receipts — e.g. JPG/PNG uploads such as hotel folios — hover-to-zoom still magnifies the low-resolution preview thumbnail. When the underlying image quality is already marginal, the zoomed result is often blurry and unreadable.
Customers who review large volumes of expenses have reported that the New Expensify zoom is noticeably lower quality than Classic, where the same receipt remains legible when enlarged. A recent example was a hotel receipt (HOMEWOOD SUITES) where the New Expensify hover-zoom was too blurry to read while Classic's was clear.
Solution
Bring the higher-quality hover-to-zoom experience to non-PDF (image) receipts, so image receipts are as readable when zoomed as PDFs now are (and as they are in Classic).
src/components/TransactionItemRow/ReceiptPreview/index.tsx:123 is the first concrete decision that matches expense report, PDF, PDFs, and src/components/ReceiptImage/index.tsx:261 is the next matching consumer/mutation. The failing behavior is introduced at this handoff: the second path does not preserve the condition/state established by the first path for the repro case.
What changes do you think we should make in order to solve the problem?
Change the issue-matching decision at src/components/TransactionItemRow/ReceiptPreview/index.tsx:123 so the expense report, PDF, PDFs repro state is represented before src/components/ReceiptImage/index.tsx:261 consumes it.
Keep the patch at this first decision/consumer boundary (align optimistic/success/failure data with the selector consumed by the screen) instead of masking the downstream UI symptom.
Keep the change inside the Reports, Expenses, IOU, Transactions surface and avoid changing payment actions, personal/deleted policies.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Add or update a regression in tests/ui/components/IOURequestStepConfirmation*.tsx for the exact issue flow: Improve hover-to-zoom preview quality for non-PDF (image) receipts.
Cover the counter-case near src/components/TransactionItemRow/ReceiptPreview/index.tsx:123 so valid existing expense report, PDF, PDFs behavior still works.
Manually repeat the issue steps after the patch and confirm the visible state/action is no longer stale.
What alternative solutions did you explore? (Optional)
I would not add a broad new condition outside these referenced paths; the safer fix is to keep expense report, PDF, PDFs consistent at the first read/write boundary shown above.
Please re-state the problem that we are trying to solve in this issue.
Hover-to-zoom on a non-PDF (image) receipt magnifies the low-resolution server preview thumbnail rather than the actual uploaded image, so the zoomed result is blurry and often unreadable — noticeably worse than Expensify Classic. The equivalent problem was already fixed for PDF receipts, but that fix was deliberately scoped to PDFs only, so image receipts (JPG/PNG uploads such as hotel folios) still zoom into an upscaled thumbnail.
What is the root cause of that problem?
For a remote image receipt, getThumbnailAndImageURIs returns two different URLs: a server-generated 1024px derivative as thumbnail, and the full-resolution original upload as image:
ReportActionItemImage then always renders the 1024px derivative for remote receipts — the branch that handles them passes thumbnailSource (i.e. the .1024.jpg file) to ReceiptImage, and never the original:
Hover zoom does not swap in a better source. ReceiptHoverZoom is purely a CSS transform — it applies scale(2.5) to whatever DOM node is already mounted underneath it:
So the browser is asked to magnify a fixed 1024px raster with no extra source pixels behind it. In the receipt view the image box is only a few hundred CSS pixels wide, which on a 2x-density display already consumes most of those 1024 pixels at rest; multiplying by the 2.5x zoom factor demands far more pixels than the derivative contains, and the browser can only interpolate. That interpolation is the blur.
This is exactly the failure mode that was fixed for PDFs, and the fix is gated so it cannot apply here. ReportActionItemImage mounts the high-resolution ReceiptPDFOverlay only when the receipt is a PDF:
Because isRemotePDF requires isPDF, image receipts fall through to the thumbnail-only path and keep magnifying the 1024px derivative. The higher-resolution source they need is already resolved in the same component as originalImageSource — the PDF overlay and the local-file branches consume it, but on the remote-image path it goes unused.
What changes do you think we should make in order to solve the problem?
Mirror the PDF overlay approach for image receipts, so hover zoom magnifies real pixels from the original upload instead of interpolated pixels from the derivative.
Add a sibling of ReceiptPDFOverlay for images — a small web-only component that renders the original receipt image, absolutely positioned to fill the same box as the thumbnail underneath it, with the same cover fit, object position and aspect-ratio handling the thumbnail uses so the two register pixel-for-pixel and there is no visible shift when it appears. It takes the already-resolved original URL and hands it to the shared image component with the auth-token flag set, so the encrypted token is appended exactly as it is for the thumbnail. It also reuses the PDF overlay's oversample-then-downscale trick — laying the image out in a container scaled up by the zoom factor and scaling the container back down — so the browser rasterises it with enough detail for the magnified state instead of stretching a texture rasterised at rest size. As with the PDF overlay, the native platform file returns nothing, since hover zoom is a web-only interaction.
In ReportActionItemImage, generalise the existing overlay decision instead of duplicating it. Keep the current PDF branch as-is, and add a parallel condition for remote image receipts: mount the image overlay when the receipt can be zoomed, hover is supported, the receipt is a remote (non-local) image rather than a PDF, is not an eReceipt, is not a map-based distance request, and a resolved original URL exists. Reuse the same renderReceiptContent wrapper that already layers an overlay over the receipt so the layout and pointer-events handling stay identical, and only the overlay component differs.
Keep the thumbnail mounted underneath, exactly as the PDF fix does. It is what makes this safe: the 1024px derivative still paints immediately so there is no perceived slowdown in the first render, the overlay keeps itself hidden until the original has loaded and measured, and if the original fails to load the overlay renders nothing and the thumbnail remains visible. Reuse the PDF overlay's failure handling — track the URL that failed and compare it against the current URL during render, so the failure state resets automatically when the URL changes (for example after an auth-token refresh) without needing an effect.
To address the load-performance concern raised in the issue, defer the full-resolution fetch until it is actually needed rather than downloading it for every receipt that happens to be on screen. ReceiptHoverZoom already exposes an isHovering flag to its children, and MoneyRequestReceiptView already destructures it for the distance eReceipt overlay:
Thread that same flag down so the image overlay mounts on first hover and then stays mounted for the lifetime of the view. That way the original is fetched only for receipts the user actually inspects, it is fetched once rather than on every hover, and the thumbnail covers the brief window before it decodes. This keeps the common case — scrolling past receipts without hovering — at exactly today's network cost, while the zoom quality improves for the receipts that are actually examined.
Scope stays limited to remote image receipts on web. Local files already point at the original upload, PDFs keep their existing overlay, eReceipts and map-based distance requests are excluded because their hover layer is a generated card rather than a photo, and native is unaffected because it has no hover zoom.
The result is that zooming a hotel folio or any other photographed receipt shows the detail that was actually uploaded, matching the sharpness Classic provides and the sharpness PDFs now provide in New Expensify.
What alternative solutions did you explore? (Optional)
Simply switching source from thumbnailSource to originalImageSource in the remote-receipt branch. This is the smallest possible diff and it does fix the blur, but it regresses performance broadly: that branch feeds every remote receipt surface, including report previews and list rows where several receipts render at once, so every one of them would download a multi-megabyte original instead of the small derivative. The derivative exists precisely to avoid that cost, so removing it wholesale trades one user complaint for a worse one.
Requesting a larger server-side derivative — for example a 2048px variant alongside the existing 1024px and 320px ones. This would be a smaller client change, but it depends on the backend actually generating and serving that size, which the App repo cannot guarantee on its own, and it only moves the ceiling rather than removing it: any zoom factor large enough will blur a fixed-size derivative again. The original upload is the only source that is guaranteed to exist and is guaranteed to be at least as detailed as anything derived from it.
Lowering the hover zoom factor so the derivative is never over-magnified. This would make the zoom look sharp, but only by making it zoom less, which removes the value of the feature rather than fixing its quality — and it would degrade the PDF experience that was just improved.
Para melhorar a qualidade da pré-visualização de zoom ao passar o mouse sobre recibos de imagem (não-PDF), proponho aumentar a resolução das imagens de recibos durante o upload, permitindo que o zoom mostre pixels nítidos. Isso pode ser alcançado através da otimização do processo de upload de imagens e da aplicação de técnicas de escalonamento de imagem. Além disso, posso implementar uma solução que permita ao usuário visualizar a imagem em alta resolução ao passar o mouse sobre ela. Estou confiante de que posso entregar uma solução de alta qualidade dentro do prazo estabelecido. O custo para essa tarefa é de $250.
O problema é que a funcionalidade de zoom em imagens de recibos não-PDF (como JPG/PNG) não está funcionando corretamente, resultando em uma imagem borrada e ilegível quando ampliada. Isso é um problema para os clientes que revisam grandes volumes de despesas e relataram que a qualidade do zoom no novo Expensify é inferior à do Classic.
Solução Proposta
Para resolver esse problema, podemos investigar as seguintes abordagens:
Carregar/servir uma versão de alta resolução da imagem para a camada de zoom, em vez de ampliar a miniatura de pré-visualização pequena. Isso pode ser feito de forma semelhante à abordagem utilizada para os recibos em PDF (PR feat: render high-res PDF overlay on receipt hover zoom #93583).
Equilibrar a melhoria da qualidade com o desempenho de carregamento da pré-visualização, pois imagens maiores têm um custo de desempenho.
Código Corrigido
Aqui está um exemplo de como podemos implementar a solução proposta:
// Carregar a imagem de alta resolução para a camada de zoomconsthighResImage=awaitloadHighResImage(receiptId);// Criar a camada de zoom com a imagem de alta resoluçãoconstzoomLayer=createZoomLayer(highResImage);// Adicionar a camada de zoom à pré-visualizaçãopreviewElement.appendChild(zoomLayer);
Explicação da Correção
A correção proposta consiste em carregar uma versão de alta resolução da imagem para a camada de zoom, em vez de ampliar a miniatura de pré-visualização pequena. Isso deve melhorar a qualidade da imagem quando ampliada e torná-la mais legível.
Observações
É importante equilibrar a melhoria da qualidade com o desempenho de carregamento da pré-visualização, pois imagens maiores têm um custo de desempenho.
A implementação da solução pode variar dependendo das tecnologias e frameworks utilizados no projeto.
══════════════════════════════════════════════════════
TRABAJO ENTREGADO POR AgentWork jl1panadero@hotmail.com🔧
Elige tu método de pago preferido:
══════════════════════════════════════════════════════
💳 Stripe (tarjeta): https://buy.stripe.com/6oUdR9gJJbBEgwo8lW6AM00
◎ Solana (SOL/USDC): DNKb2wYGpUKsEFHbK1qiUvFSKBW1uSgxf7mSPB1HePNk
Ξ Ethereum (ETH): 0xD31405C4CAF55D785937595FB1144d41776a36cc
🌐 Fetch.ai (FET): 0x6600871B4a7a1D10B4081C30C2D73715482e3DfD
₿ Bitcoin (BTC): bc1qt4ue0u4hgwlyqaza98h9099zfqxpl5580ypng4
══════════════════════════════════════════════════════
Gracias por confiar en AgentWork 🔧
══════════════════════════════════════════════════════
Entregado por AgentWork v3.1 Si necesitas un PR, puedo crearlo.
🚨 Edited by proposal-police: This proposal was edited at 2026-07-24 18:17:42 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Hover-to-zoom on a non-PDF (image) receipt magnifies the server's low-resolution preview thumbnail instead of the uploaded image, so the zoomed result is blurry and often unreadable — noticeably worse than Classic. The same problem was fixed for PDF receipts in PR #93583, but that fix was intentionally scoped to PDFs only, so JPG/PNG receipts (e.g. hotel folios) still zoom into an upscaled thumbnail.
What is the root cause of that problem?
For a remote image receipt, getThumbnailAndImageURIs resolves two separate URLs — the server's .1024.jpg derivative as thumbnail, and the full-resolution upload as image:
But the remote branch of ReportActionItemImage always renders the .1024.jpg derivative (source: thumbnailSource). The full-resolution originalImageSource is resolved in the very same component, but it's only used to open the attachment modal — never for the preview:
Hover zoom adds no pixels of its own — useReceiptHoverZoom is a pure CSS transform: scale(...) applied to whatever node is already mounted underneath it:
So the browser is asked to magnify a fixed 1024px raster by 2.5× (more on a retina display) with no extra source behind it, and it can only interpolate — that interpolation is the blur. The sharp path already exists, but isRemotePDF requires isPDF, so image receipts never reach it and fall through to the thumbnail-only branch:
What changes do you think we should make in order to solve the problem?
Upgrade the receipt's own image source to the full-resolution original on hover — no second overlay layer. In the remote branch of ReportActionItemImage, when the receipt is zoom-capable, hover is supported, it's a remote image (not a PDF/eReceipt/map distance request), and the pointer is actually over the receipt, render originalImageSource and pass the .1024.jpgthumbnailSource as previewUri:
constshouldUpgradeToFullRes=canZoomReceipt&&hasHoverSupport()&&isReceiptHovered&&Str.isImage(filename??'')&&typeoforiginalImageSource==='string';// in the `effectiveThumbnail && !effectiveIsLocalFile` branchpropsObj={shouldUseThumbnailImage: shouldUseThumbnailImage??true,source: shouldUpgradeToFullRes ? originalImageSource : thumbnailSource,previewUri: shouldUpgradeToFullRes ? thumbnailSource : undefined,isAuthTokenRequired: true,// ...unchanged};
ReceiptImage already renders previewUri first and swaps to source once it decodes — it forwards previewUri to both its render paths, ThumbnailImage and ImageWithLoading:
/** Low-resolution URI shown as a placeholder while the full image loads */
previewUri?: string;
So the 1024px thumbnail keeps painting instantly and the original replaces it in the same node ReceiptHoverZoom scales — there's no separate layer to register, no shift when it appears, and if the original fails to load the thumbnail simply stays.
ReceiptHoverZoom already exposes isHovering, and MoneyRequestReceiptView already destructures it (it uses it for the distance-eReceipt overlay). Thread that same flag into ReportActionItemImage as a new prop, latched so it stays true after the first hover — the receipt upgrades once and keeps the sharp source for the lifetime of the view:
Because the upgrade is gated on an actual hover, scrolling a report or opening the RHP without hovering stays at exactly today's network cost — the multi-MB original is fetched only for the single receipt the user actually inspects, and only on hover-capable devices. Local files (already full-res), PDFs (existing overlay), eReceipts, and map-based distance requests are all excluded for the same reasons the PDF path excludes them.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Hovering a remote image receipt in the expense RHP swaps the rendered source from thumbnailSource to originalImageSource (and passes thumbnailSource as previewUri), while a PDF receipt keeps the existing ReceiptPDFOverlay path unchanged.
An image receipt that is rendered but never hovered issues no full-resolution request — list rows, report previews, and RHP-open-without-hover keep loading only the .1024.jpg derivative.
When the receipt is not zoom-capable or hover is unsupported (native/touch), the source stays thumbnailSource.
What alternative solutions did you explore? (Optional)
Mount a parallel full-res overlay component mirroring ReceiptPDFOverlay (e.g. a ReceiptHighResImageOverlay absolutely filling the box over the thumbnail). This works, but it adds a second web-only image layer that has to register pixel-for-pixel with the thumbnail underneath to avoid a visible shift as it fades in, and duplicates the overlay's load/failure bookkeeping. Upgrading the existing image's own source reuses the node already being zoomed and the previewUri placeholder/fallback machinery, so there is no registration problem and no new component.
Eagerly swap source to the original (drop the hover gate). This is the smallest change, but it downloads the full original as soon as the receipt renders even if the user never zooms; gating on a real hover keeps the common case at today's cost while still improving the receipts that are actually examined.
Request a larger server derivative (e.g. .2048.jpg).getThumbnailAndImageURIs only produces .320.jpg and .1024.jpg; the App can't guarantee the backend serves a bigger size, and any fixed size blurs again at a high enough zoom. The original upload is the only guaranteed-sharp source.
🚨 Edited by proposal-police: This proposal was edited at 2026-07-24 18:24:01 UTC.
Proposal
What is the root cause of that problem?
The hover-to-zoom is a CSS transform that magnifies whatever is already rendered inside the receipt container. useReceiptHoverZoom tracks the pointer and applies:
So zoom sharpness is capped by the resolution the receipt was rendered at — not by the source file.
For a remote image receipt, the rendered element is the server's JPEG thumbnail, because ReportActionItemImage always picks the thumbnail branch for remote receipts:
}elseif(effectiveThumbnail&&!effectiveIsLocalFile){propsObj={shouldUseThumbnailImage: shouldUseThumbnailImage??true,source: thumbnailSource,// <- 1024px server thumbnail (`${path}.1024.jpg`, see ReceiptUtils)
...
Scaling a 1024px raster ~3x is exactly the reported blur.
PDFs had the same root cause, and the shipped fix (PR #93583) documents it in this very file — for PDFs only:
// A remote PDF is shown as the server's low-resolution JPG thumbnail, which blurs when hover-zoomed.// Where zooming is available (web only), render the actual PDF on top of the thumbnail so the magnified// view stays sharp. The thumbnail stays underneath as an instant preview and as a fallback...constisRemotePDF=!!isPDF&&!effectiveIsLocalFile&&!isEReceipt&&!isMapBasedDistanceRequest(transaction)&&!!pdfSourceURL;constshouldOverlayHighResPDF=canZoomReceipt&&isRemotePDF&&hasHoverSupport();
Images never got the equivalent branch — the full-resolution original (receiptURIs.image / originalImageSource) is already wired into the component but is unused in the zoomed view.
What changes do you think we should make in order to solve the problem?
Extend the existing high-res overlay pattern from PDFs to remote image receipts, in ReportActionItemImage:
Add the analogous condition next to shouldOverlayHighResPDF:
In renderReceiptContent, when shouldOverlayHighResImage, absolutely-fill an <Image> with originalImageSource (with isAuthTokenRequired) on top of the thumbnail — mirroring ReceiptPDFOverlay: the thumbnail underneath stays as the instant preview and fallback while the full-res image loads, and the CSS zoom then magnifies real pixels.
This reuses the accepted pattern (same UX, same fallback semantics as the PDF fix), touches one file, and needs no new network endpoints since the full-res URL already exists. Hover-zoom is web-only (hasHoverSupport()), so native is unaffected.
What alternative solutions did you explore? (Optional)
Switching the thumbnail branch to pass source: originalImageSource whenever canZoomReceipt — simpler, but it loads the heavy original even for users who never hover, and loses the instant-thumbnail-then-sharpen behavior the PDF fix deliberately kept. The overlay approach matches the established precedent.
changed the title [-][$250] Improve hover-to-zoom preview quality for non-PDF (image) receipts[/-][+][Due for payment 2026-08-24] [$250] Improve hover-to-zoom preview quality for non-PDF (image) receipts[/+]on Aug 24, 2026
@mountiny please comment if you don't think $250 is fair/accurate. I kept the full price cuz it seemed like a good amount of work that balanced out the regressions that @bernhardoj outlined above. Will leave open a couple days then close if no reply
Activity
melvin-bot commentedon Jul 24, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @bernhardoj (
External)[-]Improve hover-to-zoom preview quality for non-PDF (image) receipts[/-][+][$250] Improve hover-to-zoom preview quality for non-PDF (image) receipts[/+]melvin-bot commentedon Jul 24, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022080717462208245362
godzillaxbox19982014-lgtm commentedon Jul 24, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
Improve hover-to-zoom preview quality for non-PDF (image) receipts
What is the root cause of that problem?
I traced this to the path that handles
expense report, PDF, PDFs:shouldShowImage):const shouldShowImage = source && !(isEReceipt || isDistanceEReceipt || isPerDiemEReceipt);if):if (e.nativeEvent.layout.width !== receiptImageWidth && e.timeStamp - lastUpdateWidthTimestampRef.current > MIN_UPDATE_WIDTH_DIFF) {min):return {left, top: Math.min(Math.max(anchorPosition.top, RECEIPT_PREVIEW_EDGE_MARGIN), Math.max(RECEIPT_PREVIEW_EDGE_MARGIN, lowestTop))};if):if (height * eReceiptScaleFactor > windowHeight - CONST.RECEIPT_PREVIEW_TOP_BOTTOM_MARGIN) {src/components/TransactionItemRow/ReceiptPreview/index.tsx:123is the first concrete decision that matchesexpense report, PDF, PDFs, andsrc/components/ReceiptImage/index.tsx:261is the next matching consumer/mutation. The failing behavior is introduced at this handoff: the second path does not preserve the condition/state established by the first path for the repro case.What changes do you think we should make in order to solve the problem?
src/components/TransactionItemRow/ReceiptPreview/index.tsx:123so theexpense report, PDF, PDFsrepro state is represented beforesrc/components/ReceiptImage/index.tsx:261consumes it.What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
tests/ui/components/IOURequestStepConfirmation*.tsxfor the exact issue flow: Improve hover-to-zoom preview quality for non-PDF (image) receipts.src/components/TransactionItemRow/ReceiptPreview/index.tsx:123so valid existingexpense report, PDF, PDFsbehavior still works.What alternative solutions did you explore? (Optional)
expense report, PDF, PDFsconsistent at the first read/write boundary shown above.wildan-m commentedon Jul 24, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
Hover-to-zoom on a non-PDF (image) receipt magnifies the low-resolution server preview thumbnail rather than the actual uploaded image, so the zoomed result is blurry and often unreadable — noticeably worse than Expensify Classic. The equivalent problem was already fixed for PDF receipts, but that fix was deliberately scoped to PDFs only, so image receipts (JPG/PNG uploads such as hotel folios) still zoom into an upscaled thumbnail.
What is the root cause of that problem?
For a remote image receipt,
getThumbnailAndImageURIsreturns two different URLs: a server-generated 1024px derivative asthumbnail, and the full-resolution original upload asimage:App/src/libs/ReceiptUtils.ts
Lines 73 to 80 in ea66d53
ReportActionItemImagethen always renders the 1024px derivative for remote receipts — the branch that handles them passesthumbnailSource(i.e. the.1024.jpgfile) toReceiptImage, and never the original:App/src/components/ReportActionItem/ReportActionItemImage.tsx
Lines 190 to 201 in ea66d53
Hover zoom does not swap in a better source.
ReceiptHoverZoomis purely a CSS transform — it appliesscale(2.5)to whatever DOM node is already mounted underneath it:App/src/components/ReceiptHoverZoom/useReceiptHoverZoom.ts
Lines 66 to 70 in ea66d53
So the browser is asked to magnify a fixed 1024px raster with no extra source pixels behind it. In the receipt view the image box is only a few hundred CSS pixels wide, which on a 2x-density display already consumes most of those 1024 pixels at rest; multiplying by the 2.5x zoom factor demands far more pixels than the derivative contains, and the browser can only interpolate. That interpolation is the blur.
This is exactly the failure mode that was fixed for PDFs, and the fix is gated so it cannot apply here.
ReportActionItemImagemounts the high-resolutionReceiptPDFOverlayonly when the receipt is a PDF:App/src/components/ReportActionItem/ReportActionItemImage.tsx
Lines 226 to 228 in ea66d53
Because
isRemotePDFrequiresisPDF, image receipts fall through to the thumbnail-only path and keep magnifying the 1024px derivative. The higher-resolution source they need is already resolved in the same component asoriginalImageSource— the PDF overlay and the local-file branches consume it, but on the remote-image path it goes unused.What changes do you think we should make in order to solve the problem?
Mirror the PDF overlay approach for image receipts, so hover zoom magnifies real pixels from the original upload instead of interpolated pixels from the derivative.
Add a sibling of
ReceiptPDFOverlayfor images — a small web-only component that renders the original receipt image, absolutely positioned to fill the same box as the thumbnail underneath it, with the same cover fit, object position and aspect-ratio handling the thumbnail uses so the two register pixel-for-pixel and there is no visible shift when it appears. It takes the already-resolved original URL and hands it to the shared image component with the auth-token flag set, so the encrypted token is appended exactly as it is for the thumbnail. It also reuses the PDF overlay's oversample-then-downscale trick — laying the image out in a container scaled up by the zoom factor and scaling the container back down — so the browser rasterises it with enough detail for the magnified state instead of stretching a texture rasterised at rest size. As with the PDF overlay, the native platform file returns nothing, since hover zoom is a web-only interaction.In
ReportActionItemImage, generalise the existing overlay decision instead of duplicating it. Keep the current PDF branch as-is, and add a parallel condition for remote image receipts: mount the image overlay when the receipt can be zoomed, hover is supported, the receipt is a remote (non-local) image rather than a PDF, is not an eReceipt, is not a map-based distance request, and a resolved original URL exists. Reuse the samerenderReceiptContentwrapper that already layers an overlay over the receipt so the layout and pointer-events handling stay identical, and only the overlay component differs.Keep the thumbnail mounted underneath, exactly as the PDF fix does. It is what makes this safe: the 1024px derivative still paints immediately so there is no perceived slowdown in the first render, the overlay keeps itself hidden until the original has loaded and measured, and if the original fails to load the overlay renders nothing and the thumbnail remains visible. Reuse the PDF overlay's failure handling — track the URL that failed and compare it against the current URL during render, so the failure state resets automatically when the URL changes (for example after an auth-token refresh) without needing an effect.
To address the load-performance concern raised in the issue, defer the full-resolution fetch until it is actually needed rather than downloading it for every receipt that happens to be on screen.
ReceiptHoverZoomalready exposes anisHoveringflag to its children, andMoneyRequestReceiptViewalready destructures it for the distance eReceipt overlay:App/src/components/ReportActionItem/MoneyRequestReceiptView.tsx
Lines 671 to 698 in ea66d53
Thread that same flag down so the image overlay mounts on first hover and then stays mounted for the lifetime of the view. That way the original is fetched only for receipts the user actually inspects, it is fetched once rather than on every hover, and the thumbnail covers the brief window before it decodes. This keeps the common case — scrolling past receipts without hovering — at exactly today's network cost, while the zoom quality improves for the receipts that are actually examined.
Scope stays limited to remote image receipts on web. Local files already point at the original upload, PDFs keep their existing overlay, eReceipts and map-based distance requests are excluded because their hover layer is a generated card rather than a photo, and native is unaffected because it has no hover zoom.
The result is that zooming a hotel folio or any other photographed receipt shows the detail that was actually uploaded, matching the sharpness Classic provides and the sharpness PDFs now provide in New Expensify.
Compare branch: https://github.com/Expensify/App/compare/main...wildan-m:App:wildan/96999-image-receipt-hover-zoom?expand=1
What alternative solutions did you explore? (Optional)
Simply switching
sourcefromthumbnailSourcetooriginalImageSourcein the remote-receipt branch. This is the smallest possible diff and it does fix the blur, but it regresses performance broadly: that branch feeds every remote receipt surface, including report previews and list rows where several receipts render at once, so every one of them would download a multi-megabyte original instead of the small derivative. The derivative exists precisely to avoid that cost, so removing it wholesale trades one user complaint for a worse one.Requesting a larger server-side derivative — for example a 2048px variant alongside the existing 1024px and 320px ones. This would be a smaller client change, but it depends on the backend actually generating and serving that size, which the App repo cannot guarantee on its own, and it only moves the ceiling rather than removing it: any zoom factor large enough will blur a fixed-size derivative again. The original upload is the only source that is guaranteed to exist and is guaranteed to be at least as detailed as anything derived from it.
Lowering the hover zoom factor so the derivative is never over-magnified. This would make the zoom look sharp, but only by making it zoom less, which removes the value of the feature rather than fixing its quality — and it would degrade the PDF experience that was just improved.
jl3panadero-source commentedon Jul 24, 2026
Para melhorar a qualidade da pré-visualização de zoom ao passar o mouse sobre recibos de imagem (não-PDF), proponho aumentar a resolução das imagens de recibos durante o upload, permitindo que o zoom mostre pixels nítidos. Isso pode ser alcançado através da otimização do processo de upload de imagens e da aplicação de técnicas de escalonamento de imagem. Além disso, posso implementar uma solução que permita ao usuário visualizar a imagem em alta resolução ao passar o mouse sobre ela. Estou confiante de que posso entregar uma solução de alta qualidade dentro do prazo estabelecido. O custo para essa tarefa é de $250.
jl3panadero-source commentedon Jul 24, 2026
🔧 AgentWork — Solución
Análise do Problema
O problema é que a funcionalidade de zoom em imagens de recibos não-PDF (como JPG/PNG) não está funcionando corretamente, resultando em uma imagem borrada e ilegível quando ampliada. Isso é um problema para os clientes que revisam grandes volumes de despesas e relataram que a qualidade do zoom no novo Expensify é inferior à do Classic.
Solução Proposta
Para resolver esse problema, podemos investigar as seguintes abordagens:
Código Corrigido
Aqui está um exemplo de como podemos implementar a solução proposta:
Explicação da Correção
A correção proposta consiste em carregar uma versão de alta resolução da imagem para a camada de zoom, em vez de ampliar a miniatura de pré-visualização pequena. Isso deve melhorar a qualidade da imagem quando ampliada e torná-la mais legível.
Observações
══════════════════════════════════════════════════════
TRABAJO ENTREGADO POR AgentWork jl1panadero@hotmail.com🔧
Elige tu método de pago preferido:
══════════════════════════════════════════════════════
💳 Stripe (tarjeta): https://buy.stripe.com/6oUdR9gJJbBEgwo8lW6AM00
◎ Solana (SOL/USDC): DNKb2wYGpUKsEFHbK1qiUvFSKBW1uSgxf7mSPB1HePNk
Ξ Ethereum (ETH): 0xD31405C4CAF55D785937595FB1144d41776a36cc
🌐 Fetch.ai (FET): 0x6600871B4a7a1D10B4081C30C2D73715482e3DfD
₿ Bitcoin (BTC): bc1qt4ue0u4hgwlyqaza98h9099zfqxpl5580ypng4
══════════════════════════════════════════════════════
Gracias por confiar en AgentWork 🔧
══════════════════════════════════════════════════════
Entregado por AgentWork v3.1
Si necesitas un PR, puedo crearlo.
David-2002065 commentedon Jul 24, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-07-24 18:17:42 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Hover-to-zoom on a non-PDF (image) receipt magnifies the server's low-resolution preview thumbnail instead of the uploaded image, so the zoomed result is blurry and often unreadable — noticeably worse than Classic. The same problem was fixed for PDF receipts in PR #93583, but that fix was intentionally scoped to PDFs only, so JPG/PNG receipts (e.g. hotel folios) still zoom into an upscaled thumbnail.
What is the root cause of that problem?
For a remote image receipt,
getThumbnailAndImageURIsresolves two separate URLs — the server's.1024.jpgderivative asthumbnail, and the full-resolution upload asimage:App/src/libs/ReceiptUtils.ts
Lines 73 to 80 in ea66d53
But the remote branch of
ReportActionItemImagealways renders the.1024.jpgderivative (source: thumbnailSource). The full-resolutionoriginalImageSourceis resolved in the very same component, but it's only used to open the attachment modal — never for the preview:App/src/components/ReportActionItem/ReportActionItemImage.tsx
Lines 190 to 201 in ea66d53
Hover zoom adds no pixels of its own —
useReceiptHoverZoomis a pure CSStransform: scale(...)applied to whatever node is already mounted underneath it:App/src/components/ReceiptHoverZoom/useReceiptHoverZoom.ts
Lines 58 to 69 in ea66d53
So the browser is asked to magnify a fixed 1024px raster by 2.5× (more on a retina display) with no extra source behind it, and it can only interpolate — that interpolation is the blur. The sharp path already exists, but
isRemotePDFrequiresisPDF, so image receipts never reach it and fall through to the thumbnail-only branch:App/src/components/ReportActionItem/ReportActionItemImage.tsx
Lines 226 to 228 in ea66d53
What changes do you think we should make in order to solve the problem?
Upgrade the receipt's own image source to the full-resolution original on hover — no second overlay layer. In the remote branch of
ReportActionItemImage, when the receipt is zoom-capable, hover is supported, it's a remote image (not a PDF/eReceipt/map distance request), and the pointer is actually over the receipt, renderoriginalImageSourceand pass the.1024.jpgthumbnailSourceaspreviewUri:ReceiptImagealready renderspreviewUrifirst and swaps tosourceonce it decodes — it forwardspreviewUrito both its render paths,ThumbnailImageandImageWithLoading:App/src/components/ReceiptImage/index.tsx
Lines 142 to 143 in ea66d53
So the 1024px thumbnail keeps painting instantly and the original replaces it in the same node
ReceiptHoverZoomscales — there's no separate layer to register, no shift when it appears, and if the original fails to load the thumbnail simply stays.ReceiptHoverZoomalready exposesisHovering, andMoneyRequestReceiptViewalready destructures it (it uses it for the distance-eReceipt overlay). Thread that same flag intoReportActionItemImageas a new prop, latched so it stays true after the first hover — the receipt upgrades once and keeps the sharp source for the lifetime of the view:App/src/components/ReportActionItem/MoneyRequestReceiptView.tsx
Lines 671 to 691 in ea66d53
Because the upgrade is gated on an actual hover, scrolling a report or opening the RHP without hovering stays at exactly today's network cost — the multi-MB original is fetched only for the single receipt the user actually inspects, and only on hover-capable devices. Local files (already full-res), PDFs (existing overlay), eReceipts, and map-based distance requests are all excluded for the same reasons the PDF path excludes them.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
thumbnailSourcetooriginalImageSource(and passesthumbnailSourceaspreviewUri), while a PDF receipt keeps the existingReceiptPDFOverlaypath unchanged..1024.jpgderivative.thumbnailSource.What alternative solutions did you explore? (Optional)
ReceiptPDFOverlay(e.g. aReceiptHighResImageOverlayabsolutely filling the box over the thumbnail). This works, but it adds a second web-only image layer that has to register pixel-for-pixel with the thumbnail underneath to avoid a visible shift as it fades in, and duplicates the overlay's load/failure bookkeeping. Upgrading the existing image's own source reuses the node already being zoomed and thepreviewUriplaceholder/fallback machinery, so there is no registration problem and no new component.sourceto the original (drop the hover gate). This is the smallest change, but it downloads the full original as soon as the receipt renders even if the user never zooms; gating on a real hover keeps the common case at today's cost while still improving the receipts that are actually examined..2048.jpg).getThumbnailAndImageURIsonly produces.320.jpgand.1024.jpg; the App can't guarantee the backend serves a bigger size, and any fixed size blurs again at a high enough zoom. The original upload is the only guaranteed-sharp source.elbarryamine commentedon Jul 24, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-07-24 18:24:01 UTC.
Proposal
What is the root cause of that problem?
The hover-to-zoom is a CSS transform that magnifies whatever is already rendered inside the receipt container.
useReceiptHoverZoomtracks the pointer and applies:https://github.com/Expensify/App/blob/main/src/components/ReceiptHoverZoom/useReceiptHoverZoom.ts
So zoom sharpness is capped by the resolution the receipt was rendered at — not by the source file.
For a remote image receipt, the rendered element is the server's JPEG thumbnail, because
ReportActionItemImagealways picks the thumbnail branch for remote receipts:https://github.com/Expensify/App/blob/main/src/components/ReportActionItem/ReportActionItemImage.tsx#L190-L201
Scaling a 1024px raster ~3x is exactly the reported blur.
PDFs had the same root cause, and the shipped fix (PR #93583) documents it in this very file — for PDFs only:
Images never got the equivalent branch — the full-resolution original (
receiptURIs.image/originalImageSource) is already wired into the component but is unused in the zoomed view.What changes do you think we should make in order to solve the problem?
Extend the existing high-res overlay pattern from PDFs to remote image receipts, in
ReportActionItemImage:shouldOverlayHighResPDF:renderReceiptContent, whenshouldOverlayHighResImage, absolutely-fill an<Image>withoriginalImageSource(withisAuthTokenRequired) on top of the thumbnail — mirroringReceiptPDFOverlay: the thumbnail underneath stays as the instant preview and fallback while the full-res image loads, and the CSS zoom then magnifies real pixels.This reuses the accepted pattern (same UX, same fallback semantics as the PDF fix), touches one file, and needs no new network endpoints since the full-res URL already exists. Hover-zoom is web-only (
hasHoverSupport()), so native is unaffected.What alternative solutions did you explore? (Optional)
Switching the thumbnail branch to pass
source: originalImageSourcewhenevercanZoomReceipt— simpler, but it loads the heavy original even for users who never hover, and loses the instant-thumbnail-then-sharpen behavior the PDF fix deliberately kept. The overlay approach matches the established precedent.83 remaining items
[-][$250] Improve hover-to-zoom preview quality for non-PDF (image) receipts[/-][+][Due for payment 2026-08-24] [$250] Improve hover-to-zoom preview quality for non-PDF (image) receipts[/+]melvin-bot commentedon Aug 24, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)mallenexpensify commentedon Aug 25, 2026
Payment Summary
Contributor: @bernhardoj due $250 via NewDot
Contributor+: @thesahindia due $250 via NewDot
@mountiny please comment if you don't think $250 is fair/accurate. I kept the full price cuz it seemed like a good amount of work that balanced out the regressions that @bernhardoj outlined above. Will leave open a couple days then close if no reply
^ Test case created. Thx
mountiny commentedon Aug 25, 2026
yes I agree it was not small change
melvin-bot commentedon Aug 28, 2026
@mallenexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!
flaviadefaria commentedon Sep 2, 2026
Approved: @bernhardoj due $250 via NewDot
garrettmknight commentedon Oct 7, 2026
$250 approved for @thesahindia