element-web/test
Robin d0cddc5b66
Feed events to widgets as they are decrypted (even if out of order) (#28376)
* Refactor feeding of events to widgets

This is a pure refactor with (hopefully) no behavior changes.

* Feed events to widgets as they are decrypted (even if out of order)

The code that feeds events to widgets tries to enforce that only events from the end of the timeline will be passed through. This is to prevent old, irrelevant events from being passed to widgets as the timeline is back-filled. However, since encrypted events need to be decrypted asynchronously, it's not possible to feed them to a widget in a strictly linear order without introducing some kind of blocking or unreliable delivery. This code has been dropping events when they're decrypted out of order, which we consider to be an undesirable behavior.

The solution provided here is that, to reflect the asynchronous nature of decryption, encrypted events that arrive at the end of the timeline will be fed to a widget whenever they finish decrypting, even if this means feeding them out of order. For now we're not aware of any widgets that care about knowing the exact order of events in the timeline, but if such a need reveals itself later, we can explore adding ordering information to this part of the widget API.

* Add braces to if
2024-11-08 14:35:47 +00:00
..
@types Change license (#13) 2024-09-09 13:57:16 +00:00
app-tests Merge matrix-react-sdk into element-web 2024-10-15 15:32:09 +01:00
components/views/dialogs/security Refactor CreateCrossSigningDialog (#28218) 2024-10-22 11:42:07 +00:00
setup Merge matrix-react-sdk into element-web 2024-10-15 15:32:09 +01:00
test-utils Switch secondary React trees to the createRoot API (#28296) 2024-11-06 12:44:54 +00:00
unit-tests Feed events to widgets as they are decrypted (even if out of order) (#28376) 2024-11-08 14:35:47 +00:00
CreateCrossSigning-test.ts Refactor CreateCrossSigningDialog (#28218) 2024-10-22 11:42:07 +00:00
globalSetup.ts Change license (#13) 2024-09-09 13:57:16 +00:00
jest-mocks.ts Update license files 2024-09-06 15:44:31 +01:00
setupTests.ts Update to React 18 (#24763) 2024-10-21 13:50:06 +00:00
slowReporter.cjs Change license (#13) 2024-09-09 13:57:16 +00:00