element-web/test/unit-tests/stores
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
..
__snapshots__
notifications Merge matrix-react-sdk into element-web 2024-10-15 15:32:09 +01:00
oidc Merge matrix-react-sdk into element-web 2024-10-15 15:32:09 +01:00
right-panel Merge matrix-react-sdk into element-web 2024-10-15 15:32:09 +01:00
room-list Migrate to stylistic 2024-10-18 14:34:01 +01:00
widgets Feed events to widgets as they are decrypted (even if out of order) (#28376) 2024-11-08 14:35:47 +00:00
AccountPasswordStore-test.ts Merge matrix-react-sdk into element-web 2024-10-15 15:32:09 +01:00
ActiveWidgetStore-test.ts Merge matrix-react-sdk into element-web 2024-10-15 15:32:09 +01:00
AutoRageshakeStore-test.ts Merge matrix-react-sdk into element-web 2024-10-15 15:32:09 +01:00
BreadcrumbsStore-test.ts Migrate to stylistic 2024-10-18 14:34:01 +01:00
LifecycleStore-test.ts Merge matrix-react-sdk into element-web 2024-10-15 15:32:09 +01:00
MemberListStore-test.ts Merge matrix-react-sdk into element-web 2024-10-15 15:32:09 +01:00
OwnBeaconStore-test.ts Merge matrix-react-sdk into element-web 2024-10-15 15:32:09 +01:00
OwnProfileStore-test.ts Migrate to stylistic 2024-10-18 14:34:01 +01:00
ReleaseAnnouncementStore-test.tsx Merge matrix-react-sdk into element-web 2024-10-15 15:32:09 +01:00
RoomNotificationStateStore-test.ts Merge matrix-react-sdk into element-web 2024-10-15 15:32:09 +01:00
RoomViewStore-test.ts Migrate to stylistic 2024-10-18 14:34:01 +01:00
SetupEncryptionStore-test.ts Replace IBootstrapCrossSigningOpts by BootstrapCrossSigningOpts to use CryptoApi type instead of old crypto type. (#28263) 2024-10-22 09:18:30 +00:00
SpaceStore-test.ts Merge matrix-react-sdk into element-web 2024-10-15 15:32:09 +01:00
ToastStore-test.ts Merge matrix-react-sdk into element-web 2024-10-15 15:32:09 +01:00
TypingStore-test.ts Merge matrix-react-sdk into element-web 2024-10-15 15:32:09 +01:00
UserProfilesStore-test.ts Merge matrix-react-sdk into element-web 2024-10-15 15:32:09 +01:00
VoiceRecordingStore-test.ts Merge matrix-react-sdk into element-web 2024-10-15 15:32:09 +01:00
WidgetLayoutStore-test.ts Merge matrix-react-sdk into element-web 2024-10-15 15:32:09 +01:00