Skip to content

No page count when expense is submitted from self DM and receipt is added on confirm page #100375

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.4.72-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: #97813
Email or phone of affected tester (no customers): jsdoijnodsdisojo@gmail.com
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:

  1. Go to staging.new.expensify.com
  2. Go to self DM.
  3. Create a manual expense without receipt.
  4. Click Submit to a friend.
  5. Select workspace chat.
  6. On confirm page, add a multi page PDF receipt.
  7. Click Create expense.
  8. Open the expense.

Expected Result:

Page count will appear on receipt preview when expense is submitted from self DM and receipt is added on confirm page.

Actual Result:

Page count does not appear on receipt preview when expense is submitted from self DM and receipt is added on confirm page.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7250800_1788499877625.7.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7250800

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 4, 2026
  2. applause-bot commented on Sep 4, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/3401afb1baa5d63335b5d0181957a558eabbbce1bd69ce78f289c3066519a30c

  3. melvin-bot commented on Sep 4, 2026

    @melvin-bot

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

  4. melvin-bot commented on Sep 4, 2026

    @melvin-bot

    @MonilBhavsar @abzokhattab you have been assigned to this deploy blocker because you reviewed the offending PR: #97813

  5. melvin-bot commented on Sep 4, 2026

    @melvin-bot

    @ishpaul777 you have been assigned to this deploy blocker because you authored the offending PR: #97813

  6. melvin-bot commented on Sep 4, 2026

    @melvin-bot

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

  7. github-actions commented on Sep 4, 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.
  8. MelvinBot commented on Sep 4, 2026

    @MelvinBot
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #97813 - "Show a page count badge on multi-page PDF receipts" by @ishpaul777 (High confidence)
    Related Issues: #100350, #100336, #100342 — three other open blockers on this same checklist, all from #97813

    Recommendation: REVERT

    The page count badge shipped wired up for a single expense-creation path, and this is the fourth deploy blocker on 9.4.72-0 from that one PR; patching each remaining flow individually needs backend work too and keeps growing under deploy-blocker time pressure. Reverting #97813 removes a badge that never existed in production, so nothing regresses, and it clears #100336, #100342, #100350 and this issue at once.

    Assigned: @ishpaul777 (PR author), @MonilBhavsar and @abzokhattab (approving reviewers) from the causing PR — already assigned by melvin-bot, no change made.
    Labels: No changes. DeployBlockerCash stays (an App PR caused this); DeployBlocker was not present and was not added.

    📋 Detailed Analysis

    Evidence

    Verification

    Affected files, all confirmed against ae9d6a6:

    gh pr view 97813 --json files confirms the PR modifies the first two and not the last two — which is precisely the gap.

    Root Cause

    The badge only renders when transaction.receipt.pageCount > 1. The client never computes that value; it is backend-provided (as #97813's own description says, the badge is inert until its backend dependencies ship). #97813 plumbed it for the ordinary "upload a receipt onto an expense" path only, so every other way an expense can acquire a receipt drops it:

    1. This flow. The expense starts as a self-DM tracked expense with no receipt. Submitting it to a workspace chat sends the confirm-page receipt as part of the tracked-expense conversion (TrackExpense.ts#L1816-L1824) rather than through the standard receipt-upload path, so the created expense comes back without a page count and the > 1 gate at MoneyRequestReceiptView.tsx#L560 never passes. This is the same class of gap @ishpaul777 already found for split bills in [Due for payment 2026-09-30] Expense - No page count on multi page PDF receipt when created from split scan expense #100350, on a different command.
    2. A latent second copy of the bug on the same flow. Even when a page count is already present, the conversion discards it client-side: buildOptimisticTransaction rebuilds receipt as {source, filename, state, isTestDriveReceipt}, and that rebuilt transaction is written with Onyx.METHOD.SET at MoneyRequestBuilder.ts#L605-L608, replacing the stored receipt wholesale. Prediction worth testing: create the self-DM expense with the multi-page PDF (badge shows), then submit it to a workspace chat — the badge should disappear.

    Rolling forward means fixing both halves, on this flow and on every other creation path, with backend changes for each. Given the feature is brand new, cosmetic, and invisible in production, reverting #97813 and relanding it once the count survives all creation paths is the lower-risk option.


    view run

  9. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Sep 4, 2026
  10. MonilBhavsar commented on Sep 4, 2026

    @MonilBhavsar
    Contributor

    New feature, so demoting

  11. ishpaul777 commented on Sep 5, 2026

    @ishpaul777
    Contributor
  12. MonilBhavsar commented on Sep 8, 2026

    @MonilBhavsar
    Contributor

    Thanks!
    PR was merged

  13. melvin-bot commented on Sep 15, 2026

    @melvin-bot

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

  14. melvin-bot commented on Sep 17, 2026

    @melvin-bot

    @MonilBhavsar, @abzokhattab, @ishpaul777 Huh... This is 4 days overdue. Who can take care of this?

  15. melvin-bot commented on Sep 21, 2026

    @melvin-bot

    @MonilBhavsar, @abzokhattab, @ishpaul777 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!

  16. ishpaul777 commented on Sep 22, 2026

    @ishpaul777
    Contributor

    this was fixed, closing

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringReviewingHas a PR in review

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions