[Payment due @jayeshmangwani] [No QA] Fix Concierge draft completion pacing#94714
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
@jayeshmangwani Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a514edfa42
ℹ️ 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".
|
@inimaga I'm not sure whether this PR needs a C+ review, and there are no Tests to verify. Please let me know if it requires a C+ review. |
|
@jayeshmangwani Yes the C+ review is needed for the code. This covers an edge case for which there isn't a useful manual QA step, hence why no manual test steps and reliance on automated tests. |
…aft-completion-pacing # Conflicts: # src/pages/inbox/ConciergeDraftContext.tsx
…aft-completion-pacing # Conflicts: # src/pages/inbox/ConciergeDraftContext.tsx
…github.com/Expensify/App into issa/fix-Concierge-draft-completion-pacing
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 05d767ec4f
ℹ️ 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".
…aft-completion-pacing # Conflicts: # config/eslint/eslint.seatbelt.tsv # src/pages/inbox/usePusherDraftPacing.ts # tests/unit/pages/inbox/ConciergeDraftContext.test.tsx
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
@marcochavezf Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
🎯 @jayeshmangwani, thanks for reviewing and testing this PR! 🎉 A payment issue will be created for your review once this PR is deployed to production. If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created. |
|
🚧 marcochavezf 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/marcochavezf in version: 9.4.29-0 🚀
|
|
🤖 No help site changes required. I reviewed the changes in this PR against Expensify's help site content under Why: This is a purely internal frontend fix to how streamed Concierge responses render. It makes in-app chat converge to the full final Concierge response instead of getting stuck on an early streamed prefix, by remembering terminal draft events (so stale lower-sequence chunks can't overwrite the draft) and keeping the synthetic draft bubble active long enough to reveal the authoritative persisted report action. The changed files are all implementation-level — React components, hooks, context/state, a There is no user-facing feature, setting, tab, button, or workflow change here. The help site does not document Concierge message streaming/draft-pacing behavior (the only Concierge mentions in If you believe a specific article should describe this behavior, let me know which one and I'll draft the update. |
|
🚀 Deployed to staging by https://github.com/marcochavezf in version: 9.4.31-0 🚀
|
|
🤖 Help site review — no changes required. I reviewed the changes in this PR and confirmed that no updates to the help site files under Why: This PR is a purely internal, client-side bug fix for how streamed Concierge responses are rendered/paced in in-app chat. It makes the chat converge to the full final Concierge response instead of getting stuck on an early streamed prefix, by tracking terminal draft events and keeping the synthetic draft bubble active long enough to reveal the persisted report action content. The changes are confined to streaming/pacing internals ( Docs verification
@inimaga, since no help site changes are required, there is no linked docs PR to review. If you believe a user-facing behavior change here should be documented, let me know and I'll draft the article. |
|
🚀 Deployed to production by https://github.com/grgia in version: 9.4.31-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Payment issue created: #95680 |
Explanation of Change
This fixes Concierge draft pacing when the backend sends a terminal draft completion without final content and the persisted report action arrives separately through Onyx. The client now remembers terminal draft events so stale lower-sequence chunks cannot overwrite the visible draft, and it keeps the synthetic draft bubble active long enough to reveal the authoritative persisted report action content for the same
reportActionID.This lets in-app chat converge to the full final Concierge response instead of getting stuck on an early streamed prefix.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/651819
Part of $#94479
PROPOSAL: N/A
Tests
Offline tests
N/A
QA Steps
N/A
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, 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