Repository navigation
Description
If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.
Version Number: v9.5.1-9
Issue reported by: mkhutornyi (rescoped from Applause Bug ID 7276806)
App Component: Chat Report View
Precondition:
Web, with the browser window wider than 1300px. At 1300px or narrower the side panel is a modal, so you can't use the central chat while it's open.
Action Performed:
- Open any chat other than Concierge. The Help button is hidden in the Concierge chat.
- Send a message, for example
hello. - Click Help in the chat header. The Concierge side panel opens docked on the right, and the central chat stays usable.
- In the central chat, hover over
hello, open the context menu and choose Edit comment. - Change the text to
hello world, and don't save. - Click Close (the X) in the side panel header.
Expected Result:
The inline editor stays open with hello world.
Actual Result:
The editor closes and the message shows hello again, so the unsaved edit is lost.
Workaround:
Save or cancel the edit before closing the side panel.
Platforms:
- Android: App
- Android: mWeb Chrome
- iOS: App
- iOS: mWeb Safari
- iOS: mWeb Chrome
- Windows: Chrome
- MacOS: Chrome / Safari
Screenshots/Videos
bug.mov
Original Applause report (intended behavior on native)
Reproducible in staging?: Yes
Reproducible in production?: Yes
Regression test: https://test-management.browserstack.com/projects/2219752/test-runs/76795563/folder/13177078/41237914/1820739544?sort=%2Bidentifier
Email or phone of affected tester (no customers): leungbratt6@gmail.com
Device used: Pixel 7 Pro/Android 17
- Open the Hybrid app
- Navigate to any chat and send a message
- Press the Edit button in the newly added message
- Empty the draft message input
- Navigate to a different report
- Return to the first report
- Verify that the composer is focused and edit mode is dismissed
Actual: The composer is not focused. This is intended on native: the composer only auto-focuses on return when it has text.
Bug7276806_1791081283557.focus.mp4
Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7276806
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022107104987405035552
- Upwork Job ID: 2107104987405035552
- Last Price Increase: 2026-10-05
Issue Owner
Current Issue Owner: @mallenexpensifyMetadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
applause-bot commentedon Oct 5, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/f8512b09554b9f94556affe6f4aa72a78cb4bc87b9f635de0ee334d736049f30
MelvinBot commentedon Oct 5, 2026
Proposal
TL;DR: On native, this looks like intended behavior, not a regression. Native apps only auto-focus the composer on return when it has text, so the keyboard doesn't pop up. Here the composer is empty, so it isn't focused. I recommend updating the test case's expected result instead of changing code.
What is the root cause of that problem?
useClearReportActionDraftsOnReportChange.ts:7-13. This ends edit mode, and the composer goes back to the normal draft. That draft is empty because the message was already sent.shouldAutoFocus(ComposerWithSuggestions.tsx:366) orwillBlurTextInputOnTapOutside(ComposerWithSuggestions.tsx:922-927). On native, both are false unless the composer has text, becausecanFocusInputOnScreenFocus/index.native.tsreturnsfalse. The code comment at line 923 says native skips this on purpose.useEditComposerToggle.ts:97-100runs while the first report is hidden. That screen's input was just blurred atComposerWithSuggestions.tsx:893-895, so the focus call has no effect when you return.Emptying the draft doesn't matter. The result should be the same on native if you leave text in the edit input.
What changes do you think we should make in order to solve the problem?
Update the test case's expected result: "Edit mode is dismissed. The composer is focused on web and desktop, but not on native." This matches fix:67029: allow focus composer on mobile when there is a draft message, whose test steps say an empty composer is "not focused on mobile devices".
What alternative solutions did you explore? (Optional)
If product wants focus on native here:
useEditComposerToggle, check whether the screen is focused when editing ends. If it isn't, set a "pending focus" ref instead of callingonFocus.ComposerWithSuggestions.tsx:925, so the composer focuses when the screen is shown again.This fix only works if the first report stays mounted. If the report remounts, the pending focus would also need to survive the remount.
Investigation details
ChatMessageContent.tsx:64).Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/103036)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
view run
melvin-bot commentedon Oct 5, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mkhutornyi (
External)[-]Threads -Composer isn't focused after empty the message navigate to another report and return[/-][+][$175] Threads -Composer isn't focused after empty the message navigate to another report and return[/+]melvin-bot commentedon Oct 5, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022107104987405035552
melvin-bot commentedon Oct 7, 2026
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
melvin-bot commentedon Oct 8, 2026
@mkhutornyi Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Oct 12, 2026
@mkhutornyi 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
mkhutornyi commentedon Oct 13, 2026
Agree with Melvin. It's intentional composer isn't focused on mobile.
While testing this flow, I found related bug on web.
Precondition: web, with the browser window wider than 1300px. At 1300px or narrower the side panel is a modal, so you can't use the central chat while it's open.
hello.hello, open the context menu and choose Edit comment.hello world, and don't save.Expected: the inline editor stays open with
hello world.Actual: the editor closes and the message shows
helloagain, so the unsaved edit is lost.bug.mov
@MelvinBot update PR title and description, and propose solution
16 remaining items
mkhutornyi commentedon Oct 26, 2026
Contributor+ Checklist:
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to the comment on the PR:
Link to the comment on the Issue:
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal
Precondition:
Web, with the browser window wider than 1300px. At 1300px or narrower the side panel is a modal, so you can't use the central chat while it's open.
Test:
hello.hello, open the context menu and choose Edit comment.hello world, and don't save.hello world.Do we agree 👍 or 👎
melvin-bot commentedon Oct 27, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Oct 27, 2026
Payment Summary
Resolving PRs:
Keep unsaved message edit when closing the Concierge side panel #103950
Reviewer: @mkhutornyi owed $175 via NewDot
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon Oct 30, 2026
Payment Summary
Contributor+: @mkhutornyi due $175 via NewDot