-
Notifications
You must be signed in to change notification settings - Fork 324
feat(sdk): Spaces #5509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(sdk): Spaces #5509
Conversation
655477a
to
f52ebdb
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #5509 +/- ##
==========================================
+ Coverage 88.57% 88.61% +0.04%
==========================================
Files 340 344 +4
Lines 93690 94389 +699
Branches 93690 94389 +699
==========================================
+ Hits 82989 83646 +657
- Misses 6568 6602 +34
- Partials 4133 4141 +8 ☔ View full report in Codecov by Sentry. |
CodSpeed Performance ReportMerging #5509 will not alter performanceComparing Summary
|
eab6c0c
to
0b14496
Compare
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.
First fast review. Keep going!
let handle = tokio::spawn(async move { | ||
pin_mut!(all_room_updates_receiver); | ||
|
||
loop { | ||
match all_room_updates_receiver.recv().await { | ||
Ok(_) => { | ||
let new_spaces = Self::joined_spaces_for(&client_clone); | ||
if new_spaces != joined_spaces_clone.get() { | ||
joined_spaces_clone.set(new_spaces); | ||
} | ||
} | ||
Err(err) => { | ||
error!("error when listening to room updates: {err}"); | ||
} | ||
} | ||
} | ||
}); |
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.
Be careful to use AbortOnDrop
here, we don't want the task to be detached.
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.
Oh, isn't manually aborting it in Drop for SpaceService
enough? 🤔
5024faa
to
a2a4ef8
Compare
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.
aff6435
to
8dc94da
Compare
8dc94da
to
2e0ed68
Compare
cde1a3d
to
e761648
Compare
Something weird is going on with the latest version, all of my There's a branch here if you want to test the updates with diffing: |
e761648
to
6f0c641
Compare
Went ahead and fixed the remaining issues with VectorDiffs, seems fine now on your branch. Thanks for testing! |
…d `sync_events` to the `EventFactory`
…provides reactive interfaces to its rooms and pagination state
…::joined_spaces` and its reactive counterpart
…states change i.e. they get joined or left.
…ted uniffi version - automatic Arc inference was introduced in 0.27 and complement is using 0.25
…state events in the sliding sync required state as they're both required to build a full view of the space room hierarchy
…tions to correctly detect all the edges and be able to remove any cycles. - cycle removing is done through DFS and keeping a list of visited nodes
…ceServiceRoomList::paginate`
…ption methods so it can be retained on the client side
…alls so only the direct children are fetche
…` responses and `SpaceServiceRoomList` instances
…tead automatically setup a client subscription when requesting the joined services subscription
…d components on both the UI and the FFI crates
…ned spaces and space room list subscriptions
3d541e6
to
e8325fe
Compare
This series of patches introduces a top level UI oriented interface for interacting with spaces.
The
SpaceService
offers:joined_spaces
and asubscribe_to_joined_spaces
stream that automatically updates based on client activitym.space.parent
andm.space.children
state events it knows about, removing cycles and then only keeping parent spacesSpaceRoomList
that can be used to interact with the rooms hierarchy endpoint and retrieve rooms referencing a certain parentsubscribe_to_room_updates
publisher (e.g. when joining one of the rooms)Ongoing: