Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Send initialization data in the NewReport message (#2317)
Removes `ForwardMsg.initialize`. All initialization data is now carried in every `ForwardMsg.new_report` message. This lets us remove the state from the server that stores whether a given client has already received the initialize message. This flag had a race condition - it was possible for the flag to be set to true, but the client not to actually have received the message, if a script used the `st.experimental_rerun` function towards the top of a script. - (Python) `report_session. _maybe_enqueue_initialize_message` (and its associated flag) is gone. - (frontend) `App.handleNewReport` now conditionally calls through to a new `App.handleOneTimeInitialization` function for the first new report message. There's logic that detects and errors if the initialize data unexpectedly changes from message to message. - (frontend) Several new `App.test.tsx` tests that make sure initialization/newReport handling is correct. Fixes #2226
- Loading branch information
Showing
11 changed files
with
333 additions
and
238 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.