Skip to content

[Due for payment 2026-04-17] [Due for payment 2026-04-16] Scan - Confirm page shows old receipt when it is replaced with new receipt #87301

Closed

Description

@mitarachim

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: 9.3.54-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #84919
Email or phone of affected tester (no customers): sdoijndosodsons@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.2 / Chrome
App Component: Money Requests

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Click + > Create expense > Scan.
  4. Upload a receipt.
  5. On confirm page, click on the receipt.
  6. Click Replace.
  7. Upload a different receipt.
  8. Click on the receipt.

Expected Result:

Confirm page will show the replaced receipt.

Actual Result:

Confirm page shows old receipt when it is replaced with new receipt.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7124258_1775607797500.2.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

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

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #84919

  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. OSBotify commented on Apr 8, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #84919 - "feat: Add thumbnail support for receipts and improve image handling" by @kubabutkiewicz (High confidence)
    Related Issues: #83503 (the issue this PR was fixing)

    Recommendation: REVERT

    PR 84919 introduced a useLocalReceiptThumbnail hook and an initialLocalSourceRef that locks in the receipt image source on first render to avoid a flash. This freeze persists when the user replaces the receipt: initialLocalSourceRef.current is only written once (when it is undefined) and never updated, so the confirmation page keeps displaying the old receipt URI after replacement.

    Assigned: @kubabutkiewicz (PR author), @brunovjk (approving reviewer), @Julesssss (approving reviewer)

    Labels: DeployBlockerCash kept (App PR is the cause); DeployBlocker removed (no backend fix needed)

    Evidence:

    • Bug reproduces only on staging (not production), and version 9.3.54-0 matches the merge date of PR 84919 (2026-04-07T20:26:14Z).
    • PR 84919 is listed in the StagingDeployCash for 9.3.54-0.
    • melvin-bot automatically assigned the PR author to this deploy blocker, corroborating this as the causing PR.
    • Bug specifically hits the Replace receipt flow on the confirmation page, exactly the area this PR modified.

    Verification:

    • src/components/MoneyRequestConfirmationListFooter.tsx is directly modified by PR 84919.
    • src/hooks/useLocalReceiptThumbnail.ts (new file introduced by this PR) contains the thumbnail caching logic driving the broken behavior.

    Root Cause:
    PR 84919 introduced initialLocalSourceRef in MoneyRequestConfirmationListFooter.tsx to lock in the receipt image source on first render and avoid a source-swap flash during async thumbnail loading. Because useRef persists across re-renders and initialLocalSourceRef.current is only assigned when it equals undefined, replacing the receipt updates resolvedReceiptImage but does NOT update initialLocalSourceRef.current. effectiveReceiptSource therefore stays frozen on the original receipt URI for the component lifetime, causing the old receipt to remain displayed after replacement.

  7. removed
    DeployBlocker
    on Apr 8, 2026
  8. 9 remaining items

  9. added
    Weekly
    Awaiting Payment
    and removed
    Hourly
    on Apr 9, 2026
  10. changed the title [-]Scan - Confirm page shows old receipt when it is replaced with new receipt[/-] [+][Due for payment 2026-04-16] Scan - Confirm page shows old receipt when it is replaced with new receipt[/+] on Apr 9, 2026
  11. removed
    Reviewing
    on Apr 9, 2026
  12. melvin-bot commented on Apr 9, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  13. melvin-bot commented on Apr 9, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.54-7 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-04-16. 🎊

    For reference, here are some details about the assignees on this issue:

  14. melvin-bot commented on Apr 9, 2026

    @melvin-bot

    @brunovjk 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]

  15. melvin-bot commented on Apr 9, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  16. changed the title [-][Due for payment 2026-04-16] Scan - Confirm page shows old receipt when it is replaced with new receipt[/-] [+][Due for payment 2026-04-17] [Due for payment 2026-04-16] Scan - Confirm page shows old receipt when it is replaced with new receipt[/+] on Apr 10, 2026
  17. melvin-bot commented on Apr 10, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.57-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-04-17. 🎊

    For reference, here are some details about the assignees on this issue:

  18. melvin-bot commented on Apr 10, 2026

    @melvin-bot

    @brunovjk @mallenexpensify 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]

  19. brunovjk commented on Apr 17, 2026

    @brunovjk
    Contributor

    No payment due. This was caught in staging and fixed via a follow-up PR.

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

Metadata

Metadata

Labels

Awaiting PaymentBugEngineeringWeekly

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions