Repository navigation
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2b07d499bf
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, | ||
| value: {[optimisticCreatedAction.reportActionID]: {pendingAction: null}}, | ||
| }); | ||
| if (shouldKeepPersonalDetailsOnFailure) { |
There was a problem hiding this comment.
Keep failure rollback outside the personal-detail guard
When shouldKeepPersonalDetailsOnFailure is false (for example, toggleSubscribeToChildReport() creates a child report with newReportObject.parentReportID but does not set isNewThread), the failure path no longer adds errorFields.createChat or clears the optimistic created report action’s pendingAction; the guarded block below is now the only place those updates are pushed. If OpenReport fails for that flow, the optimistic chat/thread stays pending and does not show the generic create-chat error/dismiss affordance that existed before this change. Please keep only the personal-detail rollback conditional and still apply the report/report-action failure updates for all created reports.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
I've addressed it.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 97e5f43ad9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const personalDetailsToRemove: PersonalDetailsList = {}; | ||
|
|
||
| for (const accountID of Object.keys(report?.participants ?? {}).map(Number)) { | ||
| if (accountID === currentUserAccountID || !allPersonalDetails?.[accountID]?.isOptimisticPersonalDetail) { |
There was a problem hiding this comment.
Restrict cleanup to details created by this chat
When the failed chat reuses an optimistic personal-detail record that was already in Onyx, such as the same unknown email already present in a pending group chat, openReport() never owned that record or added it to settledPersonalDetails; however this cleanup deletes any optimistic participant in the failed report. Dismissing the failed direct chat can therefore remove the shared personal detail and make the other pending chat/invite lose the participant email again. Track and remove only the account IDs created for this failed report instead of all optimistic participants.
Useful? React with 👍 / 👎.
|
@MelvinBot review |
Review — looks good, verified working ✅The change is well-scoped and does what it says: for a failed new direct chat, it skips the optimistic personal-details rollback ( I verified the flow on web: with Simulate failing network requests on, starting a chat with a brand-new email fails with the red error and the participant email stays visible in both the LHN and the chat header — it no longer goes blank. Dismissing the error removes the failed chat and navigates to Concierge. A few things worth a look before merge (non-blocking)
Simulate failing network requests toggle ONFailed chat keeps participant email visible in LHN and headerAfter dismissing the error, failed chat removed → Concierge |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safarichrome.mp4 |
|
🚧 deetergp has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/deetergp in version: 9.4.50-0 🚀
|
|
🤖 Help site review — no changes required. I reviewed the changes in this PR against the help site content under This is a bug fix for internal state-handling: when a new direct chat fails to create, The only related help article, Create a New Chat, documents the happy-path steps for starting private/group/room chats and does not describe failure-state behavior. Nothing in it becomes inaccurate as a result of this PR. Because no documented behavior changed, I did not create a draft help site PR. @nabi-ebrahimi, if you believe a help article should document the failed-chat behavior (or if I've misjudged the scope), reply with |
|
🚀 Deployed to production by https://github.com/arosiclair in version: 9.4.50-3 🚀
Bundle Size Analysis (Sentry): |



Explanation of Change
When a new direct chat creation fails,
openReport()rolls back the optimistic personal-detail record before the failed chat is dismissed. The LHN and RHP use that record to display the participant email, so the failed chat appears without an identity.This change retains the optimistic participant detail for failed new direct chats and removes it when the user dismisses the failed optimistic chat. Threads, transaction reports, and existing chats continue to use the existing rollback behavior.
Fixed Issues
$ #95864
PROPOSAL: #95864 (comment)
Tests
Offline tests
QA Steps
Same as Tests.
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screencast.From.2026-07-31.14-34-02.mp4