Skip to content

[Due for payment 2026-05-07] iOS - Distance - Receipt view remains zoomed after landscape to portrait rotation #87356

Closed

Description

@nlemma

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: v9.3.54-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: #85229
Email or phone of affected tester (no customers): htad26+etreti@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: iOS 26.3/iPhone 13
App Component: Money Requests

Action Performed:

  1. Launch the app
  2. Navigate to a workspace chat
  3. Create a map distance expense
  4. Open the expense details in landscape mode and tap the receipt thumbnail
  5. While the receipt thumbnail view is open, rotate the device to portrait mode

Expected Result:

The receipt view adjusts to portrait orientation and displays the full receipt.

Actual Result:

The receipt remains zoomed in and does not adjust to display the full content in portrait mode.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

Bug7124341_1775616317232.video_2026-04-08_05-44-23.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    DeployBlockerCash
    Daily
    Bug
    on Apr 8, 2026
  2. melvin-bot commented on Apr 8, 2026

    @melvin-bot

    @mjasikowski recently merged #85229, but they are OOO right now, so I'll auto-assign someone else.

  3. melvin-bot commented on Apr 8, 2026

    @melvin-bot

    Triggered auto assignment to @neil-marcellini (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  4. melvin-bot commented on Apr 8, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  5. github-actions commented on Apr 8, 2026

    @github-actions
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  6. MelvinBot commented on Apr 8, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    MultiGestureCanvas (index.tsx:104-122) manages zoom and pan state via Reanimated shared values (zoomScale, offsetX, offsetY, panTranslateX/Y, pinchTranslateX/Y). These values are only reset when isActive becomes false (e.g., swiping to another image in a carousel). When the device rotates, canvasSize updates via onLayout and minContentScale recalculates, but the zoom/translation shared values are never reset. Since totalScale = zoomScale * minContentScale, a stale zoomScale from landscape combined with a new portrait minContentScale produces an incorrect zoom level.

    This affects all images viewed through the Lightbox, not just distance receipts — distance map receipts just make the misalignment more obvious due to their aspect ratio.

    What changes do you think we should make in order to solve the problem?

    Add an effect in MultiGestureCanvas that calls reset(true) (animated) when canvasSize changes, similar to the existing reset on isActive change. This ensures zoom and pan state are reset to fit the new canvas dimensions after rotation.

    Additionally, usePanGesture.ts has module-level constants SCREEN_HEIGHT/SNAP_POINT/SNAP_POINT_HIDDEN (line 17-19) that use Dimensions.get('screen').height at import time and never update on rotation. These should be moved inside the hook or use a listener so swipe-to-close thresholds stay correct after rotation.

    What alternative solutions did you explore? (Optional)

    • Adjusting zoomScale proportionally to the canvas size ratio change (preserving relative zoom) — rejected because it adds complexity and users generally expect a clean reset on rotation.
    • Handling the reset in Lightbox rather than MultiGestureCanvas — rejected because MultiGestureCanvas owns the zoom state and already has the reset function, so it's the natural place for this logic.

    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.

  7. 27 remaining items

  8. melvin-bot commented on May 7, 2026

    @melvin-bot

    Payment Summary

    Upwork Job

    • Contributor: @GCyganek does not require payment (Contractor)
    • Reviewer: @truph01 owed $250 via NewDot

    BugZero Checklist (@mallenexpensify)

    • (if NewFeature) I have created a PR for any necessary HelpDot updates, or I confirmed no updates are necessary.
    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
    • I have verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  9. mallenexpensify commented on May 8, 2026

    @mallenexpensify
    Contributor
  10. melvin-bot commented on May 11, 2026

    @melvin-bot

    @mallenexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  11. melvin-bot commented on May 18, 2026

    @melvin-bot

    @mallenexpensify Eep! 4 days overdue now. Issues have feelings too...

  12. truph01 commented on May 19, 2026

    @truph01
    Contributor

    @mallenexpensify It is related to #77280.
    So, we can close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDailyEngineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions