Commit Graph

310 Commits

Author SHA1 Message Date
Benjamin Bouvier
9be5bc1977 feat(multiverse): render display names for messages and latest thread event 2026-02-04 14:27:10 +01:00
Benjamin Bouvier
27965cf177 feat(multiverse): add a background job error observer in multiverse 2026-02-02 16:13:00 +01:00
Doug
59604713e8 chore: Re-use the existing track_read_receipts setting to hide receipts on state events.
# Conflicts:
#	bindings/matrix-sdk-ffi/CHANGELOG.md
2025-12-02 15:36:34 +01:00
Ivan Enderlin
8e93bb5373 chore: Replace unwrap by expect. 2025-11-25 15:41:27 +01:00
Ivan Enderlin
1cf0601ba3 refactor(sdk) Introduce RoomEventCacheStateLock and read/write guards.
This patch extracts fields from `RoomEventCacheState` and move them
into `RoomEventCacheStateLock`. This lock provides 2 methods: `read`
and `write`, respectively to acquire a read-only lock, and a write-only
lock, represented by the `RoomEventCacheStateLockReadGuard` and the
`RoomEventCacheStateLockWriteGuard` types.

All “public” methods on `RoomEventCacheState` now are facade to the read
and write guards.

This refactoring makes the code to compile with the last change in
`EventCacheStore::lock`, which now returns a `EventCacheStoreLockState`.
The next step is to re-load `RoomEventCacheStateLock` when the lock is
dirty! But before doing that, we need this new mechanism to centralise
the management of the store lock.
2025-11-25 15:41:27 +01:00
Damir Jelić
127154fcfa chore: Bump our deps and update the Cargo.lock file 2025-11-21 14:18:22 +01:00
Damir Jelić
49db60d951 feat: Allow events to be fetched by event type 2025-11-04 13:58:49 +01:00
Alexis Loiseau
0a0e31af83 feat(ui): add custom events to timeline when explicitly filtered
This allows custom message-like events (created by the `EventContent` macro from ruma) to be added to the timeline if they are explicitly allowed when building the timeline with a custom `event_filter`.

The custom event content is not available directly to the consumer, but it can still fetch it from the matrix-sdk client with its `event_id`, or display a "this type of event is not supported". 

Signed-off-by: Itess <me@aloiseau.com>

Fixes #5598.
2025-09-24 15:50:50 +00:00
Shrey Patel
a66e6822ed refactor(search): Add RoomIndexBuilder to create RoomIndex. 2025-09-19 16:37:09 +02:00
Shrey Patel
80390346b1 feat(multiverse): Add search indexing at startup. 2025-09-19 14:25:02 +02:00
Shrey Patel
4b87dfea0b feat(sdk): Lazily create RoomIndex on search. 2025-09-19 14:25:02 +02:00
Shrey Patel
a8ef44306a refactor(sdk): Move search index related code into its own module. 2025-09-19 14:25:02 +02:00
Benjamin Bouvier
da70aea5b0 feat(multiverse): allow not sharing pos at start
This is helpful to reproduce an initial sync response, and observe how
long it takes to process.
2025-09-18 18:00:27 +02:00
Ivan Enderlin
0bbefa000b chore(ui): Rename room_list_service::Room to RoomListItem.
This patch renames the `Room` type in `room_list_service` to
`RoomListItem` to avoid confusion with `matrix_sdk::Room`.
2025-09-18 15:38:16 +02:00
Ivan Enderlin
a84c97b292 feat(ui): Introduce room_list_service::Room to cache data.
This patch improves throughput by +710% in `room_list_service` sorters
and filters. It introduces a new `room_list_service::Room` type that
derefs to `matrix_sdk::Room`. However, it **caches** some data from
`matrix_sdk::Room`. Why doing so? Because filters, but more specifically
sorters!, are calling methods on `matrix_sdk::Room`, so likely on
`matrix_sdk::RoomInfo`, quite intensively. `RoomInfo` is behind a
`SharedObservable`, which means it's behind a lock. Each time a sorter
sorts 2 rooms, the lock on `RoomInfo` can be called twice or more.

By caching the data, `RoomInfo` is reached once per refresh data, but
not during the filtering nor the sorting. It greatly reduces contention
on the `RoomInfo` lock, which improves the throughput by +710%, and the
time by -87%.

The cached data are refreshed in `merge_stream_and_receiver` when
(i) the stream of `Room` is updated, or when (ii) the stream of
`RoomInfoNotableUpdate` is updated. It's a central place it happens,
which isolates the behaviour.
2025-09-18 15:38:16 +02:00
Valere Fedronic
681863423c feat(rtc): Remove deprecated CallNotify in favour of RtcNotification
`CallNotify` event has been deprecated in favour of `RtcNotification` event https://github.com/ruma/ruma/pull/2199
2025-09-16 16:06:39 +02:00
Shrey Patel
b0c0e0e0c4 feat(search): Add paginated search. 2025-09-09 16:24:25 +02:00
Shrey Patel
086233ad5f feat(multiverse): Show messages in search results. 2025-09-08 14:05:28 +02:00
Ivan Enderlin
b1c28f4bc1 feat(ui): sync_service::State::Error contains the cause error.
This patch updates the `State::Error` variant to contain the error that
led to this state.
2025-09-05 22:31:53 +02:00
Damir Jelić
0bed6afc29 fix(multiverse): Define the color of the placeholder text of the input line
This ensures that we're using the same color despite what your color
scheme of your terminal is. Some color schemes might produce unreadable
combinations of foreground color and background color.
2025-09-03 15:45:48 +02:00
Benjamin Bouvier
5fb728e8f0 feat(sdk): use local thread subscription data if it's accurate \o/ 2025-09-02 14:57:49 +02:00
Damir Jelić
1e30916754 chore: Bump most of our deps 2025-09-01 16:33:10 +02:00
Benjamin Bouvier
8c0a918e6e refactor(sdk): introduce a lightweight ThreadSubscription for external consumers, and rename previous one to StoredThreadSubscription
External consumers are likely not interested about unsubscriptions and
the bump stamp values themselves, so let's not expose these to them.
2025-09-01 10:38:34 +02:00
Benjamin Bouvier
33c317e6d2 refactor(sdk): put the subscription status + bumpstamp back into the stored thread subscription 2025-09-01 10:38:34 +02:00
Eric Eastwood
371ed49670 Document --proxy option in the multiverse client
To be able to inspect network requests flying around as you interact

Spawning from https://github.com/matrix-org/matrix-rust-sdk/issues/5600#issuecomment-3238128112
2025-08-30 09:56:33 +02:00
dragonfly1033
385f1a824f feat(multiverse): Add search feature to multiverse 2025-08-21 14:50:11 +01:00
dragonfly1033
dfc0ef8b35 refactor(multiverse): Create generic PopupInput widget 2025-08-21 14:50:11 +01:00
Benjamin Bouvier
4fc28c4701 feat(multiverse): enable threading support for multiverse with subscriptions 2025-08-18 15:10:50 +02:00
dragonfly1033
683f0f4027 feat(multiverse): Add room creation to multiverse 2025-08-08 12:33:48 +01:00
Benjamin Bouvier
0cdec9d912 refactor(threads): flatten the ThreadStatus enum 2025-08-06 15:28:43 +02:00
Benjamin Bouvier
d180d49c07 refactor(threads): do not store the unsubscribed state in the DB 2025-08-06 15:28:43 +02:00
Benjamin Bouvier
ebb7059d55 refactor(threads): adapt to Ruma API changes for thread subscriptions 2025-08-06 15:28:43 +02:00
Benjamin Bouvier
d57d3c4124 feat(sdk): save the unsubscribed status in the store, and use it to return something more precise than unknown when fetching a subscription 2025-07-30 12:07:07 +02:00
Benjamin Bouvier
770f65ede0 feat(multiverse): add support for subscribing/unsubscribing/showing the current sub status 2025-07-28 10:39:38 +02:00
Benjamin Bouvier
5ae7d0f60f feat(timeline): Timeline::send() automatically includes the thread relationship for thread foci 2025-07-23 15:05:23 +02:00
Ivan Enderlin
d7550ec645 feat(ui): RoomListService::subscribe_to_rooms calls LatestEvents::listen_to_room.
This patch updates `RoomListService::subscribe_to_rooms` to call
`LatestEvents::listen_to_room` automatically. This method becomes async,
which propagates to a couple of callers.

The idea is that when one is interested by a specific room, a
subscription will be applied. This is an opportunity to also “activate”
the computation of the `LatestEvent` for this specific room, so that the
user doesn't have to do that manually (except if room subscription is
never used).
2025-07-09 12:31:22 +02:00
Benjamin Bouvier
40c08335ee feat(multiverse): add support for read receipts 2025-07-09 11:05:09 +02:00
Benjamin Bouvier
935ffa5aea chore(multiverse): paginate fewer events, to better test the behavior of pagination 2025-07-07 11:40:18 +02:00
Benjamin Bouvier
6a1576a085 refactor(timeline): make use of the threaded event cache in the timeline 2025-07-07 11:40:18 +02:00
Jonas Platte
07808b4301 refactor: Enable extra code style clippy lints 2025-07-05 21:20:34 +02:00
Jonas Platte
115c7578d4 refactor(multiverse): Rewrite condition for readability 2025-06-29 09:42:27 +02:00
Jonas Platte
9f3e7debb1 refactor(multiverse): Use let chains 2025-06-29 09:42:27 +02:00
Jonas Platte
58d2ae4c39 chore(multiverse): Upgrade to Rust edition 2024 2025-06-29 09:42:27 +02:00
Damir Jelić
145d6c5782 refactor(multiverse): Use a paragraph to render an individual read receipt 2025-06-16 12:54:40 +02:00
Damir Jelić
a955af61e1 refactor(multiverse): Simplify the selected read receipt rendering
This patch simplifies the selected read receipt rendering by the fact
that we can simply fetch the selected timeline item instead of the event
ID and then do a search for the selected item.

Co-authored-by: Benjamin Bouvier <benjamin@bouvier.cc>
Signed-off-by: Damir Jelić <poljar@termina.org.uk>
2025-06-16 12:54:40 +02:00
Damir Jelić
2a78b5b67a chore: Fix a clippy lint 2025-06-16 12:54:40 +02:00
Damir Jelić
9d29c36531 feat(multiverse): Only render read receipts for a single event if one is selected 2025-06-16 12:54:40 +02:00
Damir Jelić
ed9c7d90b4 feat(multiverse): Allow event selection even if the details view is open 2025-06-16 12:54:40 +02:00
Damir Jelić
2af23d052c feat(multiverse): Show the selected event in the read receipts view 2025-06-16 12:54:40 +02:00
Damir Jelić
fb80e06839 feat(multiverse): Show read receipts for individual messages 2025-06-16 12:54:40 +02:00