You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-06-03] [Due for payment 2026-05-26] [Due for payment 2026-05-26] Unable to edit sent message in narrow screen when room posting permission is disabled #90889
Version Number: 9.3.75-1 Reproducible in staging?: Yes Reproducible in production?: No If this was caught during regression testing, add the test name, ID and link from BrowserStack:#90516 Email or phone of affected tester (no customers):sdjoinsjdosjiondsoj2@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:
Precondition:
Admin creates a room and invites member to the room.
Go to staging.new.expensify.com
[Member] Send a message in the invited room.
[Admin] Click on the room header > Settings > Who can post.
[Admin] Select Admins only.
[Member] Wait for "Only admins can send messages in this room" to show up in the room.
[Member] Resize screen to narrow on web. Skip this step on mweb, Android and iOS.
[Member] Right click on the message from Step 2 > Edit comment.
Expected Result:
Member can edit sent message in narrow screen when room posting permission is disabled.
Actual Result:
Member cannot edit sent message in narrow screen when room posting permission is disabled.
👋 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:
Identify the pull request that introduced this issue and revert it.
PR #90516 introduced narrow-screen editing that routes the edit flow through the bottom composer, but non-admin members in admins-only rooms never have the bottom composer rendered — they see only an admins-only banner. Reverting this PR restores the previous inline editing behavior, which worked correctly for this case.
Assigned: @chrispader (PR author), @hungvu193, @mountiny (approving reviewers) Labels: DeployBlockerCash kept (Frontend bug — App PR is the cause). No label changes made.
The bug is reproducible on staging only (not production), meaning it was introduced by one of the PRs in this staging cycle.
The PR explicitly changes narrow-screen message editing to use the bottom composer instead of inline editing within the message list.
Verification
ReportFooter.tsx is the affected file. When isAdminsOnlyPostingRoom returns true and the user is not a policy admin, shouldHideComposer is true and the ReportActionCompose component (bottom composer) is never rendered. Instead, an admins-only banner is shown.
canUserPerformWriteAction calls isAllowedToComment, which calls isAdminsOnlyPostingRoom (checks writeCapability === CONST.REPORT.WRITE_CAPABILITIES.ADMINS). For non-admin members this returns false, causing the composer to be hidden.
PR Allow editing messages in Composer on narrow screens V2 #90516 modifies ReportActionCompose/, ReportFooter.tsx, ReportActionsList.tsx, ReportActionItemMessageEdit.tsx, and introduces useEditComposerToggle.ts and useActiveDraftReportAction.ts — all directly related to the editing flow in narrow vs. wide screens.
The PR's ComposerProvider.tsx sets isEditingInComposer = shouldUseNarrowLayout && editingState !== 'off', routing all narrow-screen edits through the bottom composer.
Root Cause
Before PR #90516, message editing on narrow screens used inline editing within the message list (the ReportActionItemMessageEdit component). This worked regardless of the room's posting permissions because editing an existing message does not require the bottom composer.
PR #90516 changed narrow-screen editing to use the bottom composer instead. However, for non-admin members in admins-only posting rooms, canUserPerformWriteAction returns false because isAllowedToComment returns false for the admins-only write capability. This means ReportFooter renders only the admins-only banner and does not render ReportActionCompose. When a non-admin member tries to edit their previously sent message on a narrow screen, the edit state is triggered but the bottom composer is absent, so the edit cannot be completed.
PR #90516 moved narrow-screen message editing from an inline editor (rendered per-message) to the main bottom composer. In admin-only rooms, ReportFooter never mounts ReportActionCompose for non-admin members — it renders an "Only admins can send messages" banner instead (ReportFooter.tsx:155-170). When the user clicks "Edit comment", a draft is saved to Onyx, but no mounted component consumes it because the composer tree (ComposerProvider → useEditComposerToggle) is absent.
The key line is in ChatMessageContent.tsx:82: const isEditingInline = !shouldUseNarrowLayout && draftMessage !== undefined; — on narrow screens isEditingInline is always false, so inline editing never activates, and the edit relies entirely on the bottom composer which isn't rendered.
What changes do you think we should make in order to solve the problem?
In ReportFooter.tsx, when the composer is hidden (admin-only room, non-admin user) but the user has an active edit draft, we should still render ReportActionCompose so the edit-in-composer flow works. The admin-only restriction should block new messages but not editing of the user's own existing messages.
Concretely: in the admin-only branch (~line 155), check if there is an active edit draft (via useActiveDraftReportAction or equivalent). If so, render ReportActionCompose instead of the banner. The composer's edit mode will handle showing the edit UI, and useEditComposerToggle will correctly populate it with the draft.
What alternative solutions did you explore? (Optional)
An alternative is to allow inline editing on narrow screens when the composer is hidden — i.e., modify ChatMessageContent.tsx:82 to fall back to inline editing when shouldHideComposer is true. This avoids touching ReportFooter but partially reverses the intent of #90516 for this edge case.
On narrow screens: isEditingInline is always false → draft should be consumed by useEditComposerToggle in the bottom composer
But ReportFooter.tsx:75-76 sets shouldHideComposer=true because canUserPerformWriteAction returns false for non-admins in admin-only rooms
ReportFooter.tsx:155 renders the banner instead of ReportActionCompose → no composer mounted → draft has no consumer → nothing happens
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.77-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@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]
changed the title [-][Due for payment 2026-05-26] [Due for payment 2026-05-26] Unable to edit sent message in narrow screen when room posting permission is disabled[/-][+][Due for payment 2026-06-03] [Due for payment 2026-05-26] [Due for payment 2026-05-26] Unable to edit sent message in narrow screen when room posting permission is disabled[/+]on May 27, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.83-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@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]
Activity
melvin-bot commentedon May 16, 2026
@mountiny recently merged #90516, but they are OOO right now, so I'll auto-assign someone else.
melvin-bot commentedon May 16, 2026
Triggered auto assignment to @mjasikowski (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon May 16, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon May 16, 2026
👋 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:
OSBotify commentedon May 16, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #90516 - "Allow editing messages in Composer on narrow screens V2" by @chrispader (High confidence)
Related Issues: #64085, #90512, #90444, #90492, #90435, #90433, #90431, #90430
Recommendation: REVERT
PR #90516 introduced narrow-screen editing that routes the edit flow through the bottom composer, but non-admin members in admins-only rooms never have the bottom composer rendered — they see only an admins-only banner. Reverting this PR restores the previous inline editing behavior, which worked correctly for this case.
Assigned: @chrispader (PR author), @hungvu193, @mountiny (approving reviewers)
Labels:
DeployBlockerCashkept (Frontend bug — App PR is the cause). No label changes made.Detailed Analysis
Evidence
9.3.75-1).Verification
ReportFooter.tsxis the affected file. WhenisAdminsOnlyPostingRoomreturnstrueand the user is not a policy admin,shouldHideComposeristrueand theReportActionComposecomponent (bottom composer) is never rendered. Instead, an admins-only banner is shown.canUserPerformWriteActioncallsisAllowedToComment, which callsisAdminsOnlyPostingRoom(checkswriteCapability === CONST.REPORT.WRITE_CAPABILITIES.ADMINS). For non-admin members this returnsfalse, causing the composer to be hidden.ReportActionCompose/,ReportFooter.tsx,ReportActionsList.tsx,ReportActionItemMessageEdit.tsx, and introducesuseEditComposerToggle.tsanduseActiveDraftReportAction.ts— all directly related to the editing flow in narrow vs. wide screens.ComposerProvider.tsxsetsisEditingInComposer = shouldUseNarrowLayout && editingState !== 'off', routing all narrow-screen edits through the bottom composer.Root Cause
Before PR #90516, message editing on narrow screens used inline editing within the message list (the
ReportActionItemMessageEditcomponent). This worked regardless of the room's posting permissions because editing an existing message does not require the bottom composer.PR #90516 changed narrow-screen editing to use the bottom composer instead. However, for non-admin members in admins-only posting rooms,
canUserPerformWriteActionreturnsfalsebecauseisAllowedToCommentreturnsfalsefor the admins-only write capability. This meansReportFooterrenders only the admins-only banner and does not renderReportActionCompose. When a non-admin member tries to edit their previously sent message on a narrow screen, the edit state is triggered but the bottom composer is absent, so the edit cannot be completed.MelvinBot commentedon May 16, 2026
Proposal
What is the root cause of that problem?
PR #90516 moved narrow-screen message editing from an inline editor (rendered per-message) to the main bottom composer. In admin-only rooms,
ReportFooternever mountsReportActionComposefor non-admin members — it renders an "Only admins can send messages" banner instead (ReportFooter.tsx:155-170). When the user clicks "Edit comment", a draft is saved to Onyx, but no mounted component consumes it because the composer tree (ComposerProvider→useEditComposerToggle) is absent.The key line is in
ChatMessageContent.tsx:82:const isEditingInline = !shouldUseNarrowLayout && draftMessage !== undefined;— on narrow screensisEditingInlineis alwaysfalse, so inline editing never activates, and the edit relies entirely on the bottom composer which isn't rendered.What changes do you think we should make in order to solve the problem?
In
ReportFooter.tsx, when the composer is hidden (admin-only room, non-admin user) but the user has an active edit draft, we should still renderReportActionComposeso the edit-in-composer flow works. The admin-only restriction should block new messages but not editing of the user's own existing messages.Concretely: in the admin-only branch (~line 155), check if there is an active edit draft (via
useActiveDraftReportActionor equivalent). If so, renderReportActionComposeinstead of the banner. The composer's edit mode will handle showing the edit UI, anduseEditComposerTogglewill correctly populate it with the draft.What alternative solutions did you explore? (Optional)
An alternative is to allow inline editing on narrow screens when the composer is hidden — i.e., modify
ChatMessageContent.tsx:82to fall back to inline editing whenshouldHideComposeris true. This avoids touchingReportFooterbut partially reverses the intent of #90516 for this edge case.Investigation details
Data flow on narrow screens after PR #90516:
canEditReportActiondoesn't check write permissions)saveReportActionDraft()setsREPORT_ACTIONS_DRAFTSin OnyxChatMessageContent.tsx:82setsisEditingInline=true→ inline editor renders ✅isEditingInlineis alwaysfalse→ draft should be consumed byuseEditComposerTogglein the bottom composerReportFooter.tsx:75-76setsshouldHideComposer=truebecausecanUserPerformWriteActionreturnsfalsefor non-admins in admin-only roomsReportFooter.tsx:155renders the banner instead ofReportActionCompose→ no composer mounted → draft has no consumer → nothing happensNext Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.15 remaining items
melvin-bot commentedon May 19, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.77-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-05-26. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon May 19, 2026
@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]
[-][Due for payment 2026-05-26] [Due for payment 2026-05-26] Unable to edit sent message in narrow screen when room posting permission is disabled[/-][+][Due for payment 2026-06-03] [Due for payment 2026-05-26] [Due for payment 2026-05-26] Unable to edit sent message in narrow screen when room posting permission is disabled[/+]melvin-bot commentedon May 27, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon May 27, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.83-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
ReportActionComposeinto more compositional components to allow for separateEditOnlyReportActionCompose#90915If no regressions arise, payment will be issued on 2026-06-03. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon May 27, 2026
@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]