This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix room history not being visible even if we have historical keys #8563
Fix room history not being visible even if we have historical keys #8563
Changes from 1 commit
33092f1
cebd65b
8792fcd
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious how this fixes element-hq/element-web#16983
What stopped it from working before?
What changes were made to make history visible now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We weren't re-checking
checkForPreJoinUISI
when we decrypted events, there's a comment incheckForPreJoinUISI
which says it treats on-going decryptions the same as failed decryptions. This created a race condition between rendering and decryption. So if you receive keys after the initial render, its almost guaranteed to go down the unhappy path.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This specific bit doesn't do it; the
recheck
method does the trick - now when an event is decrypted we check if we can show older events, we didn't do that beforeThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beat me to it (again today :D)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to write a test for this scenario so we don't regress? This stuff seems very order dependent and tricky to get right
How were you testing locally to confirm the change works? (reproduction steps)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can regression test the single edge we identified and fixed here, but there are so many edges, you will struggle to cover them all. Even hitting 100% coverage won't cover all the possible races & scenarios.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be possible - I'll have a look into it, would you mind creating an issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
element-hq/element-web#22155 ⏩