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
Message - Edited compose box is not kept in Big screens #90842
Version Number: 9.3.75 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):testpayment935@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Critical User Impact Device used: Windows 11 pro /Chrome App Component: Chat Report View
👋 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.
Classification: Frontend bug Causing PR: #76741 - "Adapt message editing behavior based on screen size to match Slack-style UX" by @Kureev (High confidence) Related Issues: N/A
Recommendation: REVERT
PR #76741 introduced a hook (useClearReportActionDraftsOnReportChange) that clears all report action edit drafts on mount and cleanup whenever reportIDFromRoute changes. This directly causes the edit message composer box to be discarded when navigating to another chat and returning, because the effect fires on remount/route change and wipes the draft state that powers the edit composer.
Assigned: @Kureev (PR author), @hungvu193, @adhorodyski, @mountiny (approving reviewers) Labels: DeployBlockerCash kept (Frontend bug — App PR caused the issue). DeployBlocker not present, no change needed.
The bug is reproducible on staging but NOT production, consistent with a regression introduced in this staging release.
The PR description explicitly changes how message editing works: it adapts the behavior to use the bottom composer for editing on narrow layouts.
Verification
Affected files: src/pages/inbox/report/useClearReportActionDraftsOnReportChange.ts and src/pages/inbox/ReportScreen.tsx
PR New editing mechanism for small screens #76741 introduces useClearReportActionDraftsOnReportChange (a new hook file created by this PR) and calls it in ReportScreen.tsx at line 104.
The hook calls clearAllReportActionDrafts() on mount and on cleanup whenever reportIDFromRoute changes, which runs when navigating away and back to a report.
PR New editing mechanism for small screens #76741 modifies both src/pages/inbox/ReportScreen.tsx and src/pages/inbox/report/ReportActionItemMessageEdit.tsx — the core files governing edit message composer behavior.
Root Cause
useClearReportActionDraftsOnReportChange runs clearAllReportActionDrafts() (an Onyx setCollection call that sets REPORT_ACTIONS_DRAFTS to {}) both when the effect mounts and in its cleanup function. The edit message composer state is stored as a report action draft in Onyx (COLLECTION.REPORT_ACTIONS_DRAFTS). When a user opens the edit composer, navigates to another chat, and returns, the ReportScreen remounts or reportIDFromRoute changes, triggering the effect and wiping all edit drafts — including the one for the open edit composer — before the user has a chance to submit or cancel their edit.
Yeah I believe this is expected now, I dont really see benefit of keeping it in the edit mode for the added complexity of such solution, I would love final double check from @Expensify/design before closing
Yes, this was intentional. The current composer editing solution would be quite a lot more complex, it we want to keep the edited message open when navigating away from the report because of the following reasons:
We would have to scroll to the edited message when navigating to the report again
Potentially, when re-opening the report, we are opening a different report actions page, so this would need additional logic for pagination
Editing messages in threads and IOU reports would get more complex, since right now the report doesn't distinguish between a thread message being edited in the original report or in the thread
Agree. Yeah I seem to remember we did this by choice. Don't think it makes sense to have a bunch of potential edit composers so I think this is expected 👍
Activity
melvin-bot commentedon May 15, 2026
@mountiny recently merged #76741, but they are OOO right now, so I'll auto-assign someone else.
melvin-bot commentedon May 15, 2026
Triggered auto assignment to @arosiclair (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.github-actions commentedon May 15, 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:
melvin-bot commentedon May 15, 2026
💬 A slack conversation has been started in #expensify-open-source
OSBotify commentedon May 15, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #76741 - "Adapt message editing behavior based on screen size to match Slack-style UX" by @Kureev (High confidence)
Related Issues: N/A
Recommendation: REVERT
PR #76741 introduced a hook (
useClearReportActionDraftsOnReportChange) that clears all report action edit drafts on mount and cleanup wheneverreportIDFromRoutechanges. This directly causes the edit message composer box to be discarded when navigating to another chat and returning, because the effect fires on remount/route change and wipes the draft state that powers the edit composer.Assigned: @Kureev (PR author), @hungvu193, @adhorodyski, @mountiny (approving reviewers)
Labels:
DeployBlockerCashkept (Frontend bug — App PR caused the issue).DeployBlockernot present, no change needed.Detailed Analysis
Evidence
StagingDeployCash(9.3.75-1) checklist.Verification
src/pages/inbox/report/useClearReportActionDraftsOnReportChange.tsandsrc/pages/inbox/ReportScreen.tsxuseClearReportActionDraftsOnReportChange(a new hook file created by this PR) and calls it inReportScreen.tsxat line 104.clearAllReportActionDrafts()on mount and on cleanup wheneverreportIDFromRoutechanges, which runs when navigating away and back to a report.src/pages/inbox/ReportScreen.tsxandsrc/pages/inbox/report/ReportActionItemMessageEdit.tsx— the core files governing edit message composer behavior.Root Cause
useClearReportActionDraftsOnReportChangerunsclearAllReportActionDrafts()(an OnyxsetCollectioncall that setsREPORT_ACTIONS_DRAFTSto{}) both when the effect mounts and in its cleanup function. The edit message composer state is stored as a report action draft in Onyx (COLLECTION.REPORT_ACTIONS_DRAFTS). When a user opens the edit composer, navigates to another chat, and returns, theReportScreenremounts orreportIDFromRoutechanges, triggering the effect and wiping all edit drafts — including the one for the open edit composer — before the user has a chance to submit or cancel their edit.4 remaining items
mountiny commentedon May 16, 2026
Yeah I believe this is expected now, I dont really see benefit of keeping it in the edit mode for the added complexity of such solution, I would love final double check from @Expensify/design before closing
chrispader commentedon May 16, 2026
Yes, this was intentional. The current composer editing solution would be quite a lot more complex, it we want to keep the edited message open when navigating away from the report because of the following reasons:
Let's see what Design team says 🙌🏼
dubielzyk-expensify commentedon May 18, 2026
Agree. Yeah I seem to remember we did this by choice. Don't think it makes sense to have a bunch of potential edit composers so I think this is expected 👍
shawnborton commentedon May 18, 2026
Yup, agree with all of that.
chrispader commentedon May 18, 2026
Awesome. @mountiny i think we can close this out then 👍🏼
mountiny commentedon May 18, 2026
🙌