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
Distance - Different zoom level when hovered on receipt when opened from LHN #93746
Version Number: 9.4.9-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:#93102 Email or phone of affected tester (no customers):#93102 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.
Open the expense.
Hover over the receipt.
Remember the zoom level when hovered.
Send a message to the expense and close the RHP.
Open the expense from LHN.
Hover over the receipt.
Expected Result:
Receipt zoom level should be the same when hovered on report RHP and report central pane.
Actual Result:
Receipt zoom level is lower when hovered on report central pane compared to report RHP.
👋 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.
Please re-state the problem that we are trying to solve in this issue.
The full distance e-receipt overlay (shown on hover, added in #93102) appears at a different zoom level depending on where the expense is opened: lower zoom in the report central pane than in the RHP.
boxWidth/boxHeight come from onOverlayLayout, i.e. the receipt container's rendered size. That container's size is not the same in both layouts because receiptStyle depends on the fillSpace prop:
Because the box has different width/height (and a different aspect ratio) in each layout, Math.min(...) resolves to a different scale, so the e-receipt is fit to each box differently and the perceived zoom changes between RHP and central pane.
The base map thumbnail looks consistent across layouts because it scales as a contained image, but the hover overlay re-derives its own scale from the variable container box, so it does not stay consistent.
The outer ReceiptHoverZoom magnification (2.5×) is constant in both contexts, so it is not the cause — the difference comes entirely from the fit-to-box scale in HoveredDistanceEReceipt.
What changes do you think we should make in order to solve the problem?
Make the overlay's zoom independent of the layout-driven container size so it renders at the same effective scale in both RHP and central pane. Options, in order of preference:
Anchor the overlay to the rendered receipt image, not the container box. Measure the underlying DistanceEReceipt map image's displayed dimensions and compute scale against those, so the overlaid full e-receipt always aligns 1:1 with the map thumbnail beneath it in every layout.
Normalize the overlay box aspect ratio. Constrain the overlay (or the source dimensions feeding Math.min) to the same aspect ratio in both layouts (e.g. apply the 16/9 constraint used by expenseViewImage to the central-pane case) so the fit ratio is identical.
Given this is a re-landed feature on a deploy blocker, reverting #93102 again is the fast fallback if a clean fix can't land in the deploy window.
Confidence
High on root cause (layout-dependent fit-to-box scale, with file:line evidence above). Medium on the exact fix — the precise normalization should be validated visually against both layouts.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/93746) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
Regarding this issue:
For testing purposes, I adjusted the receipt window to the size displayed in the full-screen report, resulting in the same zoom scale in both cases. The difference between the reports in RHP and full-screen mode is due to the different sizes of the receipt windows, so the scale is adjusted accordingly. Let me know if this is ok for you :) If the behavior is still incorrect we can investigate how to make it more consistent, but I believe it works fine cc: @mountiny@QichenZhu
I've just changed it only for testing purposes to show that zoom level depends on the receipt window size, the windows are different so the scale is different as well
Activity
applause-bot commentedon Jun 16, 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/4cbf5ed5153592e469486f011bd861ee63bc2a68c327c45e24b7e3c1e58fde78
melvin-bot commentedon Jun 16, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #93102
melvin-bot commentedon Jun 16, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jun 16, 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:
MelvinBot commentedon Jun 16, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
The full distance e-receipt overlay (shown on hover, added in #93102) appears at a different zoom level depending on where the expense is opened: lower zoom in the report central pane than in the RHP.
What is the root cause of that problem?
HoveredDistanceEReceiptsizes the overlaid e-receipt with a pure fit-to-box ratio:boxWidth/boxHeightcome fromonOverlayLayout, i.e. the receipt container's rendered size. That container's size is not the same in both layouts becausereceiptStyledepends on thefillSpaceprop:fillSpace=false) →expenseViewImage: fixedmaxWidth: 360,aspectRatio: 16/9.fillSpace=true, set byMoneyRequestReportView.tsx:266) →flexibleHeight:height: auto,minHeight: 200, full available width and no fixed aspect ratio.Because the box has different width/height (and a different aspect ratio) in each layout,
Math.min(...)resolves to a differentscale, so the e-receipt is fit to each box differently and the perceived zoom changes between RHP and central pane.Why the box differs — evidence
fillSpaceis only passedtruefrom the central-pane report view (MoneyRequestReportView.tsx:266) and Wide RHP (WideRHPReceiptPanel.tsx:82). A normal RHP money-request view leaves itfalse.ReceiptHoverZoommagnification (2.5×) is constant in both contexts, so it is not the cause — the difference comes entirely from the fit-to-boxscaleinHoveredDistanceEReceipt.What changes do you think we should make in order to solve the problem?
Make the overlay's zoom independent of the layout-driven container size so it renders at the same effective scale in both RHP and central pane. Options, in order of preference:
DistanceEReceiptmap image's displayed dimensions and computescaleagainst those, so the overlaid full e-receipt always aligns 1:1 with the map thumbnail beneath it in every layout.Math.min) to the same aspect ratio in both layouts (e.g. apply the16/9constraint used byexpenseViewImageto the central-pane case) so the fit ratio is identical.Given this is a re-landed feature on a deploy blocker, reverting #93102 again is the fast fallback if a clean fix can't land in the deploy window.
Confidence
High on root cause (layout-dependent fit-to-box scale, with file:line evidence above). Medium on the exact fix — the precise normalization should be validated visually against both layouts.
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/93746)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
mountiny commentedon Jun 16, 2026
Looks like a minor issue, I dont think we need to block the deploy on this
WojtekBoman commentedon Jun 18, 2026
Regarding this issue:
For testing purposes, I adjusted the receipt window to the size displayed in the full-screen report, resulting in the same zoom scale in both cases. The difference between the reports in RHP and full-screen mode is due to the different sizes of the receipt windows, so the scale is adjusted accordingly. Let me know if this is ok for you :) If the behavior is still incorrect we can investigate how to make it more consistent, but I believe it works fine cc: @mountiny @QichenZhu
Screen.Recording.2026-06-18.at.12.25.21.mov
QichenZhu commentedon Jun 18, 2026
@WojtekBoman I'm not sure about the design change in your video.
Before
After
WojtekBoman commentedon Jun 18, 2026
I've just changed it only for testing purposes to show that zoom level depends on the receipt window size, the windows are different so the scale is different as well
QichenZhu commentedon Jun 18, 2026
Oh I see, my bad.
This makes sense to me.
mountiny commentedon Jun 18, 2026
Ok thanks