Skip to content

[Due for payment 2026-09-15] Report- Canceled disappeared after navigate away and back #99093

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: v9.4.57-2
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: #98758
Email or phone of affected tester (no customers): applausetester+dk31@applause.expensifail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Critical User Impact
Device used: Windows 11 Home/Chrome
App Component: Chat Report View

Action Performed:

  1. Open https://staging.new.expensify.com/
  2. Navigate to workspace chat
  3. Create an expense report
  4. Submit, approve and paid
  5. Open the report
  6. Cancel the payment
  7. Navigate back to workspace chat
  8. Navigate to other chat
  9. Navigate back to workspace chat

Expected Result:

Canceled appears at the report level next to the expense count (e.g. [Approved] Canceled • 1 expense),

Actual Result:

Canceled disappears

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7238475_1787246215252.navigate_away_and_back_canceled_disappeared.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Svetlana Lazutkina
Bug ID: 7238475

Issue OwnerCurrent Issue Owner: @Krishna2323

Activity

  1. added
    DeployBlockerCash
    on Aug 20, 2026
  2. applause-bot commented on Aug 20, 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/303481c7f6cbc80327b8ccf1e0042a55ec7013b7af82bcbc84e5ce2a81cf4538

  3. added
    Bug
    on Aug 20, 2026
  4. melvin-bot commented on Aug 20, 2026

    @melvin-bot

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

  5. melvin-bot commented on Aug 20, 2026

    @melvin-bot

    @JS00001 @situchan you have been assigned to this deploy blocker because you reviewed the offending PR: #98758

  6. github-actions commented on Aug 20, 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.
  7. melvin-bot commented on Aug 20, 2026

    @melvin-bot

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

  8. melvin-bot commented on Aug 20, 2026

    @melvin-bot

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

  9. MelvinBot commented on Aug 20, 2026

    @MelvinBot
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #98758 - "refactor: align expense preview card metadata line with mobile row styling, fix scanning and split layouts" by @Krishna2323 (High confidence)
    Related Issues: #96475 (the feature this PR shipped — "Canceled" at the report level)

    Recommendation: ROLL FORWARD

    This PR introduced the report-level "Canceled" label, so it is the cause, but it is a large layout refactor that also fixed 4 separate preview regressions (#96475, #98221, #98206, #98329). A full revert would reintroduce all of those, which is broader harm than this one status label disappearing on navigation, so a targeted fix is preferable. Keeping DeployBlockerCash (App deploy is blocked); no DeployBlocker label is present.

    Assigned: @Krishna2323 (PR author), @situchan and @JS00001 (approving reviewers) from the causing PR
    Labels: No changes. DeployBlockerCash kept (App PR caused it; bug is not reproducible in production only because the feature is new). No DeployBlocker present, so nothing to remove.

    📋 Detailed Analysis

    Evidence

    Verification

    • Affected file for the disappearing label: src/components/ReportActionItem/MoneyRequestReportPreview/ReportPreviewHeader.tsx#L69-L70
      // A cancelled payment is a report level event and it isn't surfaced by the status badge, so we show it next to the expense count.
      const supportingText = iouReport?.isCancelledIOU ? `${translate('iou.canceled')} ${CONST.DOT_SEPARATOR} ${expenseCount}` : expenseCount;
    • Confirmed via gh pr diff 98758 that this exact supportingText line was added by the PR.
    • The iouReport feeding this line is read in ReportActionItem.tsx via getStableReportSelector, which does include isCancelledIOU, so the selector is not dropping the field — the field itself is transient (see Root Cause).

    Root Cause

    The report-level label is wired directly to the transient, optimistic iouReport?.isCancelledIOU flag:

    ReportPreviewHeader.tsx:70
    const supportingText = iouReport?.isCancelledIOU ? ... : expenseCount;

    isCancelledIOU is only ever written by client-side optimistic/failure action data — it is set true when a payment is cancelled and is never re-derived when the report is (re)loaded from the server:

    • Optimistic set: src/libs/actions/IOU/PayMoneyRequest.ts#L552 and #L697
      {
      onyxMethod: Onyx.METHOD.MERGE,
      key: `${ONYXKEYS.COLLECTION.REPORT}${iouReport.reportID}`,
      value: {
      isWaitingOnBankAccount: false,
      isCancelledIOU: true,
      // These reports belong to the sender's personal policy, which approves optionally, so cancelling
      // returns the report to submitted and closed rather than approved.
      stateNum: CONST.REPORT.STATE_NUM.SUBMITTED,
      statusNum: CONST.REPORT.STATUS_NUM.CLOSED,
      lastVisibleActionCreated: optimisticIOUCancelAction.created,
      lastMessageText: getReportActionText(optimisticIOUCancelAction),
      lastMessageHtml: getReportActionHtml(optimisticIOUCancelAction),
      },
    • The only other writers are ReportWorkflow.ts (retract) and the false resets in failure data.

    When you navigate away and back to the workspace chat, OpenReport refreshes the chat and its IOU report; the fresh server payload does not carry the optimistic isCancelledIOU: true, so the flag is lost and the report-level "Canceled" label vanishes. The report status badge (stateNum/statusNum) survives the reload, which is why "[Approved]" stays but "Canceled" disappears.

    Suggested targeted fix (for @Krishna2323): drive the report-level "Canceled" from a durable source that survives a reload — e.g. derive it from the presence of the cancel-payment report action (the same signal used to build the optimistic flag) rather than reading the ephemeral iouReport.isCancelledIOU, or have the backend persist/return the cancelled state on OpenReport. If a durable fix can't land quickly under deploy-blocker time pressure, fall back to reverting #98758.


    view run

  10. situchan commented on Aug 20, 2026

    @situchan
    Contributor

    This is also reproducible in production. We can demote this

    prod.mp4
  11. 11 remaining items

  12. m-natarajan commented on Sep 3, 2026

    @m-natarajan

    Chrome / v9.4.69-0
    Reproduces

    REC-20260903153448.mp4
  13. JS00001 commented on Sep 3, 2026

    @JS00001
    Contributor

    @Krishna2323 this is still reproducible, can you work on a fix please

  14. situchan commented on Sep 3, 2026

    @situchan
    Contributor

    #99097 is not merged yet

  15. melvin-bot commented on Sep 3, 2026

    @melvin-bot

    @JS00001 @Krishna2323 @situchan this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

  16. added
    Weekly
    and removed
    Daily
    on Sep 7, 2026
  17. melvin-bot commented on Sep 7, 2026

    @melvin-bot

    This issue has not been updated in over 14 days. @JS00001, @Krishna2323, @situchan eroding to Weekly issue.

  18. added
    Daily
    and removed
    Weekly
    on Sep 7, 2026
  19. changed the title [-]Report- Canceled disappeared after navigate away and back[/-] [+][Due for payment 2026-09-15] Report- Canceled disappeared after navigate away and back[/+] on Sep 8, 2026
  20. melvin-bot commented on Sep 8, 2026

    @melvin-bot

    @Krishna2323 / @situchan

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.73-3 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-09-15. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ 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]. If no checklist is needed for this issue, you can click: [no checklist button]

  21. JS00001 commented on Sep 9, 2026

    @JS00001
    Contributor

    this was a blocker, so payment isnt needed here

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

Metadata

Metadata

Labels

BugDailyEngineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions