Skip to content

[Due for payment 2026-09-23] [$250] chat - Unexpected error still shown on "Reply in thread" for legitimate moved system messages #99653

Closed

Description

@MelvinBot

Problem

The merged fix (Expensify/App#95979) for #95866 only closed the narrow repro — creating a report from a draft expense. Moved system messages that legitimately appear (e.g. moving an expense between already-submitted reports) still offer "Reply in thread." Tapping it kicks off a thread-creation call against an action the server never adopted, which fails and renders "Unexpected error creating this chat. Please try again later."

So the underlying user-visible error can still occur outside the one path that was patched.

Proposed FE fix — gate moved system messages out of the thread UI

Gate MOVED / MOVED_TRANSACTION out of the thread UI the same way CREATED already is, so the doomed thread-creation call is never made:

  • src/libs/ReportUtils.ts:11595 — shouldDisableThread checks CONST.REPORT.ACTIONS.THREAD_DISABLED. MOVED / MOVED_TRANSACTION aren't in that list today, so reply-in-thread is still offered on them.
  • Two approaches (both raised on the original proposals):
    • Blanket: add MOVED + MOVED_TRANSACTION to THREAD_DISABLED. Simplest, but disables threading on every moved action.
    • Guarded: disable only when the action isn't already threaded (e.g. !reportAction?.childVisibleActionCount), preserving any moved actions users have legitimately threaded. Slightly more code, safer.
  • Scope: small, isolated to ReportUtils.ts + a unit test.

Scope note

This FE change is a defensive fix that stops the user-facing error. There's also a separate backend root-cause angle (why the moved action can't be threaded at all) that's being tracked internally and is not App-contributor work — so a frontend volunteer can proceed on the above independently.

Follow-up to #95866 (comment).

Issue OwnerCurrent Issue Owner: @mkhutornyi

Activity

  1. added
    Bug
    on Aug 27, 2026
  2. mkhutornyi commented on Aug 28, 2026

    @mkhutornyi

    @MelvinBot implement this

  3. MelvinBot commented on Aug 28, 2026

    @MelvinBot
    ContributorAuthor

    🤖 Draft PR created: #99721

    Please mark it as "Ready for review" when it is ready.

    What I did: Gated MOVED / MOVEDTRANSACTION system messages out of the thread UI in shouldDisableThread, so tapping "Reply in thread" no longer fires the doomed thread-creation call that produced "Unexpected error creating this chat. Please try again later."

    I used the guarded approach from the proposal (safer of the two): threading is disabled only when the moved action has no threaded child (!reportAction?.childVisibleActionCount), mirroring how deleted/archived actions are already handled — so any moved actions users have legitimately threaded keep working.

    Changes & tests
    • src/libs/ReportUtils.ts — add isMovedSystemMessage && !childVisibleActionCount to shouldDisableThread.
    • tests/unit/ReportUtilsTest.ts — 4 new cases covering both action types, disabled when unthreaded / enabled when already threaded.

    AI tests run locally:

    • npm test -- tests/unit/ReportUtilsTest.ts -t "shouldDisableThread" → pass (17 tests)
    • npm run typecheck → pass
    • eslint on changed files → 0 errors

    Live web verification couldn't be completed — the test session rendered a blank page (a test-infra issue, not an App bug), so I wasn't able to reproduce the moved-message flow in the browser. The unit tests directly cover the gating logic; manual/QA steps are in the PR for a human to confirm.


    view run

  4. melvin-bot commented on Aug 30, 2026

    @melvin-bot

    📣 @NEXAITECHAU! 📣
    Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
    Please follow these steps:

    1. Make sure you've read and understood the contributing guidelines.
    2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
    3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
    4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
      Screen Shot 2022-11-16 at 4 42 54 PM
      Format:
    Contributor details
    Your Expensify account email: <REPLACE EMAIL HERE>
    Upwork Profile Link: <REPLACE LINK HERE>
    
  5. added
    Reviewing
    Weekly
    and removed on Aug 31, 2026
  6. melvin-bot commented on Sep 6, 2026

    @melvin-bot

    Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.

  7. melvin-bot commented on Sep 6, 2026

    @melvin-bot

    Triggered auto assignment to @marcochavezf, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

  8. added
    Daily
    and removed
    Reviewing
    Weekly
    on Sep 8, 2026
  9. changed the title [-][$250] chat - Unexpected error still shown on "Reply in thread" for legitimate moved system messages[/-] [+][Due for payment 2026-09-15] [$250] chat - Unexpected error still shown on "Reply in thread" for legitimate moved system messages[/+] on Sep 8, 2026
  10. 8 remaining items

  11. added
    Daily
    Awaiting Payment
    on Sep 14, 2026
  12. melvin-bot commented on Sep 14, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  13. melvin-bot commented on Sep 14, 2026

    @melvin-bot

    Payment Summary

    Resolving PRs:

    BugZero Checklist (@mallenexpensify)

    • I have confirmed assignees, roles, and Upwork contracts look correct
    • I have paid out Upwork contracts / manual NewDot requests
    • [BugZero Assignee] I have created a GH issue for creating/updating the regression test once above steps have been agreed upon
  14. changed the title [-][Due for payment 2026-09-15] [$250] chat - Unexpected error still shown on "Reply in thread" for legitimate moved system messages[/-] [+][Due for payment 2026-09-23] [$250] chat - Unexpected error still shown on "Reply in thread" for legitimate moved system messages[/+] on Sep 16, 2026
  15. melvin-bot commented on Sep 16, 2026

    @melvin-bot

    @mkhutornyi @mallenexpensify

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

    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]

  16. melvin-bot commented on Sep 17, 2026

    @melvin-bot

    @mkhutornyi Whoops! This issue is 2 days overdue. Let's get this updated quick!

  17. mkhutornyi commented on Sep 17, 2026

    @mkhutornyi

    This is ready for payment. 2nd PR is just doc updates.

  18. mallenexpensify commented on Sep 18, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @mkhutornyi due $250 via NewDot

  19. mallenexpensify commented on Sep 29, 2026

    @mallenexpensify
    Contributor

    @marcochavezf @mkhutornyi do either of you know what's up with

    It spun off this issue, unsure what to do with it

  20. trjExpensify commented on Oct 1, 2026

    @trjExpensify
    Contributor

    approved $250 for @mkhutornyi

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

Metadata

Metadata

Labels

Awaiting PaymentBugDaily

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions