Smooth Concierge draft streaming#91092
Conversation
|
🚧 @inimaga has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
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.
|
|
@dmkt9 This is ready for review |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6e48f1ed1b
ℹ️ 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 targetBodyMarkdown = event.bodyMarkdown ?? ''; | ||
| if (!targetBodyMarkdown) { | ||
| return; |
There was a problem hiding this comment.
Process empty started updates to advance stream session
Do not return early on started/updated events with empty bodyMarkdown while a previous draft is active. This early return skips switching the active streamSessionID, so if the new stream then emits failed or completed before sending a non-empty update, isStalePusherDraftEvent() treats those terminal events as stale (because currentDraftRef still points to the old stream) and drops them. In that sequence, the old synthetic draft can remain stuck instead of being cleared or finalized.
Useful? React with 👍 / 👎.
|
Hi @inimaga, do I need a specific account? I noticed that streaming data does not seem to occur with my test account. 2026-05-20.16-01-30.mp4 |
|
@dmkt9 Yes, you need to login with an Expensifail account (Or with an account that is added to the explicit streaming beta). Could you dm me your account and I'll add it to the Beta? |
Explanation of Change
Adds a frontend pacing buffer for live Concierge draft events so server-delivered chunks are rendered progressively instead of snapping in as received. The draft provider now stores the latest server body as the target, reveals visible text character by character with catch-up/complete acceleration, preserves draft state across remounts, and keeps existing markdown cleanup so partial markdown does not render broken syntax.
Fixed Issues
$#89857
PROPOSAL: N/A
Tests
Offline tests
N/A
QA Steps
Same as manual test steps above
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, 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.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps./** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)Screenshots/Videos
Letter.by.letter.streaming.demo.mp4