Skip to content

[Due for payment 2026-05-22] [Due for payment 2026-05-20] Chat - Message in expense report cannot be edited #90430

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.73-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: #76741
Email or phone of affected tester (no customers): sdiosjdnjdsoidjiosj@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.2 / Chrome
App Component: Chat Report View

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create an empty report.
  4. Open the report.
  5. Send the message.
  6. Right click on the message > Edit message.

Expected Result:

Message in expense report can be edited.

Actual Result:

Message in expense report cannot be edited.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7152552_1778657203898.3.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @hungvu193

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    DeployBlockerIndicates it should block deploying the API
    on May 13, 2026
  2. melvin-bot commented on May 13, 2026

    @melvin-bot

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

  3. melvin-bot commented on May 13, 2026

    @melvin-bot

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

  4. github-actions commented on May 13, 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.
  5. OSBotify commented on May 13, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #76741 - "New editing mechanism for small screens" by @Kureev (High confidence)
    Related Issues: None

    Recommendation: REVERT

    PR #76741 introduced a major refactor of the message editing mechanism. The bug report describes that messages in an expense report cannot be edited (right-click > Edit message does nothing visible). The PR fundamentally changed how editing is triggered — switching from Onyx-draft-based inline editing to a new ReportActionEditMessageContext + composer-based approach on narrow layouts. This is the only PR in the StagingDeployCash that touches message editing behavior, and the symptom (edit action not working) is a direct consequence of the changed edit initiation flow. The issue is staging-only and not reproducible in production, confirming it was introduced by this staging PR.

    Assigned: @Kureev (PR author), @adhorodyski @mountiny (approving reviewers from PR #76741)
    Labels: Keeping DeployBlockerCash (Frontend App bug). Removing DeployBlocker since this is a frontend issue requiring an App fix, not a backend fix.

    Detailed Analysis

    Evidence

    • The melvin-bot automatically assigned this issue to PR New editing mechanism for small screens #76741 as the causing PR.
    • PR New editing mechanism for small screens #76741 is listed in the current StagingDeployCash (version 9.3.73-0), matching the version number in the bug report.
    • The bug is reproducible on staging only (not production), confirming it was introduced in this staging deploy cycle.
    • The PR title is "New editing mechanism for small screens" — it directly changes message editing behavior, which is exactly what the bug report describes as broken.
    • The bug steps reproduce on MacOS/Chrome, which is treated as a "wide layout" by the app. However, PR New editing mechanism for small screens #76741 changed multiple shared paths including ContextMenuActions.tsx (the right-click context menu), ReportActionEditMessageContext.tsx (new context provider for edit state), ComposerProvider.tsx, and ComposerWithSuggestions.tsx, all of which are involved in the edit flow on all screen sizes.

    Verification

    • Affected files in the codebase: src/pages/inbox/report/ContextMenu/ContextMenuActions.tsx, src/pages/inbox/report/ReportActionEditMessageContext.tsx, src/pages/inbox/report/ReportActionCompose/ComposerProvider.tsx
    • PR New editing mechanism for small screens #76741 explicitly modifies all of these files (confirmed from the PR file list).
    • ContextMenuActions.tsx line 569-580: The editAction function now calls saveReportActionDraft which writes a draft to Onyx, relying on the new ReportActionEditMessageContext to pick it up and display the edit UI. If this context or the draft detection logic has a bug, the edit silently fails to display.
    • ReportActionEditMessageContext.tsx: New file introduced by this PR. It reads drafts from Onyx and drives the edit state. Any issue with how it reads the current report's drafts would prevent the edit mode from activating.

    Root Cause

    The PR replaced the previous inline editing mechanism (which directly set edit mode on the ReportActionItemMessageEdit component) with an indirect flow: right-clicking "Edit" now saves a draft to Onyx, and a new context provider (ReportActionEditMessageContext) detects that draft and populates the composer edit state. If the context provider fails to detect the draft for the current report (e.g., due to a bug in the reportDrafts lookup, the ancestorWithDraft logic, or the editingState state machine), the edit mode never activates — which is the observed symptom (message cannot be edited). The bug appears to affect expense report messages specifically, suggesting the isMoneyRequestAction check or the ancestor/child report ID lookup has a regression.

  6. 18 remaining items

  7. changed the title [-]Chat - Message in expense report cannot be edited[/-] [+][Due for payment 2026-05-20] Chat - Message in expense report cannot be edited[/+] on May 13, 2026
  8. melvin-bot commented on May 13, 2026

    @melvin-bot

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

  9. melvin-bot commented on May 13, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.73-4 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-05-20. 🎊

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

    • @hungvu193 requires payment through NewDot Manual Requests
    • @chrispader does not require payment (Contractor)
  10. melvin-bot commented on May 13, 2026

    @melvin-bot

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

  11. changed the title [-][Due for payment 2026-05-20] Chat - Message in expense report cannot be edited[/-] [+][Due for payment 2026-05-22] [Due for payment 2026-05-20] Chat - Message in expense report cannot be edited[/+] on May 15, 2026
  12. melvin-bot commented on May 15, 2026

    @melvin-bot

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

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

    • @hungvu193 requires payment through NewDot Manual Requests
    • @chrispader does not require payment (Contractor)
  13. melvin-bot commented on May 15, 2026

    @melvin-bot

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

  14. melvin-bot commented on May 15, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  15. lanitochka17 commented on May 15, 2026

    @lanitochka17

    Deploy Blocker ##90841 was identified to be related to the PR ##90516 that attempted to fix this issue.

  16. melvin-bot commented on May 15, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  17. melvin-bot commented on May 16, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  18. melvin-bot commented on May 16, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  19. jponikarchuk commented on May 16, 2026

    @jponikarchuk

    Deploy Blocker #90889 was identified to be related to the PR #90516 that attempted to fix this issue.

  20. melvin-bot commented on May 16, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  21. lanitochka17 commented on May 16, 2026

    @lanitochka17

    Deploy Blocker ##90891 was identified to be related to the PR ##90516 that attempted to fix this issue

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.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions