Skip to content

Immediately fetch initial chat data in adapter (+fix customDataModel flakey UI test)#1168

Merged
JamesBurnside merged 2 commits intomainfrom
jaburnsi/immediately-fetch-initial-chat-data-in-adapter
Nov 26, 2021
Merged

Immediately fetch initial chat data in adapter (+fix customDataModel flakey UI test)#1168
JamesBurnside merged 2 commits intomainfrom
jaburnsi/immediately-fetch-initial-chat-data-in-adapter

Conversation

@JamesBurnside
Copy link
Copy Markdown
Member

@JamesBurnside JamesBurnside commented Nov 25, 2021

What

When creating chatAdapter, immediately call chatAdapter->fetchInitialData()

Why

Otherwise you can create a chat composite with missing information

  • Chat composite will load with no topic header (then suddenly populate it)
  • Chat composite will load with no previous messages (then suddenly populate them)
  • We have had flakey UI tests from this for over a month now and tripped us up - likely will trip up others.

Caveats

  • Chat adapter will now takes longer to construct as it has to wait for fetchInitialData to complete

Fixes

Flakey ui test where previous messages hadn't loaded before screenshot was taken:
image

@github-actions
Copy link
Copy Markdown
Contributor

@JamesBurnside
Copy link
Copy Markdown
Member Author

Completing this, cc @PorterNan for any issues this may cause

@JamesBurnside JamesBurnside merged commit e28a5d6 into main Nov 26, 2021
@JamesBurnside JamesBurnside deleted the jaburnsi/immediately-fetch-initial-chat-data-in-adapter branch November 26, 2021 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants