Skip to content

[Due for payment 2026-04-14] [Due for payment 2026-04-14] Expense-Incorrect “Submitted” status in LHN & hold message in header after Mark as Done #87074

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.52
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: #86460
Email or phone of affected tester (no customers): Dreamnitethedragon vi7@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Redmi note 10s android 13
App Component: Left Hand Navigation (LHN)

Action Performed:

Pre-condition-Login new gmail account via track & budget expense

  1. Launch app
  2. Open workspace chat
  3. Create track distance manual expense
  4. Long press preview and select hold
  5. Hold the expense entering a reason
  6. Open the expense - header and pin the report
  7. Navigate back to lhn and open the chat
  8. Tap more - mark as done
  9. Note header shows hold message after mark as done.
  10. Note system message below shows mark as done as last message
  11. Navigate to Lhn and note "submitted" message is shown incorrectly

Expected Result:

After marking the held expense as done, the header must not show the hold message and the LHN should reflect the correct latest status (e.g., “Marked as Done” .

Actual Result:

After marking the held expense as done, the header incorrectly shows the hold message and the system message shows “mark as done” as the latest update. However, in the LHN, the chat incorrectly displays the status as “Submitted.”

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7120550_1775205216369.Screenrecorder-2026-04-03-13-49-42-941.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

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

    @melvin-bot

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

  4. melvin-bot commented on Apr 3, 2026

    @melvin-bot

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

  5. github-actions commented on Apr 3, 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 3, 2026

    @OSBotify
    Contributor

    Investigation Summary: Classification: Frontend bug. Causing PR: 86460 (Update CTA and workspace chat copy for track-intent users by MelvinBot, High confidence). Related Issues: 86223. Recommendation: REVERT. PR 86460 added Mark as done copy for track-intent users in several places but missed updating the LHN last-message text logic, causing the LHN to still show Submitted instead of Marked as done. Reverting the PR is the cleanest fix. Labels: No label changes needed. DeployBlockerCash is correctly set and kept. This is a staging-only regression introduced by an App PR. Evidence: PR 86460 merged on 2026-04-01 and is included in the v9.3.52-0 staging deploy. Bug is staging-only (new feature). Melvin-bot already identified this PR. Root Cause: getLastMessageTextForReport in src/libs/OptionsListUtils/index.ts generates the LHN last-message preview. For SUBMITTED or SUBMITTED_AND_CLOSED action types it always returns iou.submitted translation with no check for isTrackIntentUser. PR 86460 added the marked as done text to PureReportActionItem.tsx (chat view system message) but omitted the same check in getLastMessageTextForReport, leaving the LHN showing Submitted even after Mark as done. The header hold message persisting after marking as done is a secondary symptom also attributable to this PR.

  7. MelvinBot commented on Apr 3, 2026

    @MelvinBot
    Contributor

    Issue Analysis

    There are two separate root causes here, both related to PR #86460 not updating all the places that need track-intent-aware copy.

    Root Cause 1: LHN shows "Submitted" instead of "Marked as Done"

    getLastMessageTextForReport() in src/libs/OptionsListUtils/index.ts:769-783 unconditionally translates SUBMITTED/SUBMITTED_AND_CLOSED actions as iou.submitted. PR #86460 added isTrackIntentUser && isSubmitAndClose(policy) checks to PureReportActionItem.tsx (system message display) but missed OptionsListUtils, which generates the LHN preview text. The translation key iou.markedAsDone already exists (src/languages/en.ts:1409) but is never used in this code path.

    Fix: Add the same isTrackIntentUser && isSubmitAndClose(policy) check to getLastMessageTextForReport() so it uses translate('iou.markedAsDone') instead of translate('iou.submitted') for track-intent users. The function signature will need to accept the onboarding intent and policy.

    Root Cause 2: Header still shows hold message after Mark as Done

    useMoneyReportHeaderStatusBar (src/hooks/useMoneyReportHeaderStatusBar.ts:77-105) determines the ON_HOLD status bar purely based on hasOnlyHeldExpenses, which only checks transaction.comment.hold via isOnHold (src/libs/TransactionUtils/index.ts:1894-1899). When "Mark as done" fires submitReport, the report status changes to CLOSED/APPROVED (src/libs/actions/IOU/index.ts:10989-10990), but transaction.comment.hold is never cleared. The hook doesn't consider report state, so it keeps showing the hold bar.

    Fix: In useMoneyReportHeaderStatusBar, suppress the ON_HOLD status when the report is already in a closed/approved state (i.e., when stateNum >= APPROVED). Alternatively, submitReport could optimistically clear transaction.comment.hold for Submit & Close policies.

    Data flow trace

    LHN path:

    1. Track-intent user holds expense, then clicks "Mark as done"
    2. Backend creates SUBMITTED_AND_CLOSED report action
    3. SidebarUtils.getOptionData() → getLastMessageTextForReport() in OptionsListUtils/index.ts
    4. Line 769-783 matches the action type, calls translate('iou.submitted') → shows "Submitted" in LHN

    Header path:

    1. putOnHold sets transaction.comment.hold to a reportActionID
    2. "Mark as done" calls submitReport → sets stateNum=APPROVED, statusNum=CLOSED on the report
    3. transaction.comment.hold is never cleared
    4. useMoneyReportHeaderStatusBar → hasOnlyHeldExpenses → isOnHold still returns true → shows hold bar

    Next Steps: Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this analysis.

  8. jasperhuangg commented on Apr 3, 2026

    @jasperhuangg
    Contributor

    reverting #86460 in #87106, should fix this

  9. m-natarajan commented on Apr 3, 2026

    @m-natarajan

    CHrome / v9.3.52-3, Galaxy A55/ Android 16, PR:87106
    No Mark as done option

    repro-issue.87074.mp4
    bandicam.2026-04-03.21-30-26-641.mp4
  10. 3 remaining items

  11. removed
    DeployBlockerCash
    on Apr 7, 2026
  12. added
    Weekly
    Awaiting Payment
    and removed
    Hourly
    on Apr 7, 2026
  13. melvin-bot commented on Apr 7, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.52-9 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-14. 🎊

  14. changed the title [-]Expense-Incorrect “Submitted” status in LHN & hold message in header after Mark as Done[/-] [+][Due for payment 2026-04-14] Expense-Incorrect “Submitted” status in LHN & hold message in header after Mark as Done[/+] on Apr 7, 2026
  15. melvin-bot commented on Apr 7, 2026

    @melvin-bot

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

  16. melvin-bot commented on Apr 7, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  17. added
    Weekly
    and removed
    Weekly
    on Apr 7, 2026
  18. changed the title [-][Due for payment 2026-04-14] Expense-Incorrect “Submitted” status in LHN & hold message in header after Mark as Done[/-] [+][Due for payment 2026-04-14] [Due for payment 2026-04-14] Expense-Incorrect “Submitted” status in LHN & hold message in header after Mark as Done[/+] on Apr 7, 2026
  19. melvin-bot commented on Apr 7, 2026

    @melvin-bot

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

  20. melvin-bot commented on Apr 7, 2026

    @melvin-bot

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

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