14089 Commits

Author SHA1 Message Date
Johannes Marbach
1e30d5f0b0 feat(oauth): expose session expiration errors when granting login with a QR code
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2025-11-26 09:50:11 +01:00
Johannes Marbach
4ab12543ce feat(testing): allow specifying expiration duration in MockedRendezvousServer
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2025-11-26 09:50:11 +01:00
Johannes Marbach
a82ccf1069 fix(oauth): expose client API errors when receiving messages on rendezvous channel
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2025-11-26 09:50:11 +01:00
Ivan Enderlin
45a9d96573 chore(sdk): Remove an unwrap in debug_string. 2025-11-25 15:41:27 +01:00
Ivan Enderlin
c9324b2f30 refactor(sdk): Change a Semaphore(permit=1) for a Mutex.
This patch changes the `Semaphore(permit=1)` for a `Mutex`: the
semantics is strictly equivalent, but it removes the need to guarantee
there is a single permit.
2025-11-25 15:41:27 +01:00
Ivan Enderlin
8e93bb5373 chore: Replace unwrap by expect. 2025-11-25 15:41:27 +01:00
Ivan Enderlin
8df55fa3e7 test(sdk): Add a test for dirtiness handling in RoomEventCacheStateLock::new. 2025-11-25 15:41:27 +01:00
Ivan Enderlin
478df4af33 test(sdk): Ensure EventCacheStoreLockGuard::clear_dirty is called!
This patch ensures that the `EventCacheStoreLockGuard::clear_dirty`
method is correctly called.
2025-11-25 15:41:27 +01:00
Ivan Enderlin
04fdf7f2f6 feat(sdk): Send updates when RoomEventCacheStateLock is reloaded.
This patch updates the reloading of `RoomEventCacheStateLock`
when the cross-process lock over the store is dirty to broadcast
`RoomEventCacheUpdate` and `RoomEventCacheGenericUpdate`. That way the
`Timeline` and other components can react to this reload.
2025-11-25 15:41:27 +01:00
Ivan Enderlin
179136a9a4 refactor(sdk): Rename RoomEventCacheInner::sender to update_sender.
This patch renames the `sender` field of `RoomEventCacheInner` to
`update_sender` to clarify what the sender is about.
2025-11-25 15:41:27 +01:00
Ivan Enderlin
e51996a47c test(sdk): Add the test_reset_when_dirty test.
This patch adds the new `test_reset_when_dirty` test, which ensures
the state is correctly reset when the cross-process lock over the store
becomes dirty.
2025-11-25 15:41:27 +01:00
Ivan Enderlin
12e5614fc8 feat(sdk): Allow shared access on RoomEventCacheStateLock::read.
This patch fixes a problem found in a test (not commited yet) where it
was impossible to do multiple calls to `read` if the first guard was
still alive. See the comments to learn more.
2025-11-25 15:41:27 +01:00
Ivan Enderlin
14d550739a feat(sdk): Implement RoomEventCacheStateLockWriteGuard::downgrade.
This patch implements `RoomEventCacheStateLockWriteGuard::downgrade` to
simplify the code a little bit.
2025-11-25 15:41:27 +01:00
Ivan Enderlin
fbcd8ef546 test(common): Make tests run faster.
This patch replaces `sleep` by `yield_now`, which has the same effect in
this case, and makes the tests run faster.
2025-11-25 15:41:27 +01:00
Ivan Enderlin
e5f6153f54 test(common): Test dirtiness of the cross-process lock. 2025-11-25 15:41:27 +01:00
Ivan Enderlin
badba6eebc fix(sdk): Remove a warning for wasm32. 2025-11-25 15:41:27 +01:00
Ivan Enderlin
72f2296809 doc(sdk): Add missing or fix documentation. 2025-11-25 15:41:27 +01:00
Ivan Enderlin
b1af16ef09 feat(sdk): Reset RoomEventCacheState when the cross-process lock is dirty.
This patch updates the `RoomEventCacheStateLock::read` and `write`
methods to reset the state when the cross-process lock is dirty.
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
Ivan Enderlin
e034a51b7b test(sdk): Update to use EventCacheStoreLockState. 2025-11-25 15:41:27 +01:00
Ivan Enderlin
9e6a6c0e71 fix(base): Use the EventCacheStoreLockState. 2025-11-25 15:41:27 +01:00
Ivan Enderlin
d1633f2a78 feat(base): EventCacheStoreLockGuard can be cloned.
This patch implements `Clone` for `EventCacheStoreLockGuard`.
2025-11-25 15:41:27 +01:00
Ivan Enderlin
4dbee471ac feat(common): CrossProcessLockGuard can be cloned.
This patch implements `Clone` for `CrossProcessLockGuard`.
2025-11-25 15:41:27 +01:00
Ivan Enderlin
997f992d15 refactor(base): EventCacheStoreLockState owns a clone of the inner store.
This patch changes `EventCacheStoreLockState` to own a clone of
the inner store. It helps to remove the `'a` lifetime, and so it
“disconnects” from the lifetime of the store.
2025-11-25 15:41:27 +01:00
Ivan Enderlin
3d5b32494e feat(base): Add EventCacheStoreLockGuard::clear_dirty. 2025-11-25 15:41:27 +01:00
Ivan Enderlin
c5893f882c feat(common): Add CrossProcessLockGuard::is_dirty and ::clear_dirty.
This patch replicates the `is_dirty` and `clear_dirty` methods from
`CrossProcessLock` to `CrossProcessLockGuard`. It allows to get an
access to this API from a guard when one doesn't have the cross-process
lock at hand.
2025-11-25 15:41:27 +01:00
Ivan Enderlin
68e8866bcf chore(sdk): Clean up imports. 2025-11-25 15:41:27 +01:00
Ivan Enderlin
c98d9db185 feat(base) Create the EventCacheStoreLockState type.
This patch updates `EventCacheStoreLock::lock()` to return an
`EventCacheStoreLockState` instead of an `EventCacheStoreLockGuard`, so
that the caller has to handle dirty locks.
2025-11-25 15:41:27 +01:00
Ivan Enderlin
cee2b1bebf feat(common): Add CrossProcessLockState::map.
This patch adds the `CrossProcessLockState::map` method along with its
companion `MappedCrossProcessLockState` type. The idea is to facilitate
the creation of custom `CrossProcessLockState`-like type in various
usage of the cross-process lock.
2025-11-25 15:41:27 +01:00
Ivan Enderlin
19a96b41df feat(common) Add #[must_use] on CrossProcessLockGuard and *State.
This patch adds a `#[must_use]` attribute on `CrossProcessLockGuard` and
`CrossProcessLockState` to avoid a misuse.
2025-11-25 15:41:27 +01:00
Ivan Enderlin
80decaebf4 chore(common) Rename CrossProcessLockKind to CrossProcessLockState.
This patch renames the `CrossProcessLockKind` type to
`CrossProcessLockState`.
2025-11-25 15:41:27 +01:00
Jorge Martín
20ee85bd0f fix: Remove unnecessary options from sentry::ClientOptions 2025-11-25 14:19:49 +01:00
Jorge Martín
813c5fc9f9 misc: Bump Sentry SDK to v0.46.0 2025-11-25 14:19:49 +01:00
Jorge Martín
a349b8e753 misc: Add support for bridge spans
These will use `bridge_trace_id` to map an exising client transaction/span to this one so they'll be displayed as a single one in Sentry.

This is done through the `sentry.trace` field, which will be used by `sentry-tracing` to differentiate these kinds of special spans.

The special fields need to be added on the Span creation, that's why we do it in the constructor instead of just using `span.record(...)` later.
2025-11-25 14:19:49 +01:00
Damir Jelić
ec44c74d53 ci: Generate and upload junit files for the integration tests 2025-11-25 11:22:55 +01:00
dependabot[bot]
7475f03b13 chore(deps): bump actions/checkout from 5 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-25 10:48:12 +01:00
Ivan Enderlin
f13dc4b070 doc: Add AI policy.
This patch adds AI policy. For the moment, it's a copy-paste (modulo
emphasises) from Forgejo's.
2025-11-25 10:34:11 +01:00
Ivan Enderlin
9757ff54ba doc: Format and fix the CONTRIBUTING.md document.
This patch formats the `CONTRIBUTING.md` file, plus it fixes some links,
lists, block of code etc.
2025-11-25 10:34:11 +01:00
Doug
aa79e34794 chore: Add forgotten tests for removing space child.
Make sure to also check the Option inside the Result when looking for the event.
2025-11-24 17:37:33 +02:00
Doug
d5f09dffaa spaces: Fix an incorrect early return introduced at the last minute. 2025-11-24 17:37:33 +02:00
Johannes Marbach
ae9070815c fix(oauth): use ruma::time::instant for wasm compatibility
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2025-11-24 14:11:57 +01:00
Doug
f49c588ade spaces: Add a method to get the joined parents of a given child. 2025-11-24 14:57:21 +02:00
Doug
8e0dba641d spaces: Add methods to add/remove space children. 2025-11-24 14:57:21 +02:00
Damir Jelić
2f7d2b3b9b chore: Bump our sentry-tracing deps 2025-11-21 17:00:44 +01:00
Ivan Enderlin
d228bde8ef doc(ui): Merge a duplicated Refactor Section. 2025-11-21 16:17:09 +01:00
Ivan Enderlin
83a7d591bd doc(ui,ffi): Update CHANGELOG.md. 2025-11-21 16:17:09 +01:00
Ivan Enderlin
247bb4960e feat(ui,ffi): Add LatestEventValue::Local { sender, .. }.
This patch adds a `sender: OwnedUserId` field to
`LatestEventValue::Local` in `matrix_sdk_ui::timeline` (and the
corresponding `matrix_sdk_ffi` type).
2025-11-21 16:17:09 +01:00
Ivan Enderlin
83f9d74626 feat(ui,ffi): Add LatestEventValue::Local { profile, .. }.
This patch adds a `profile: TimelineDetails<Profile>` field to
`LatestEventValue::Local` in `matrix_sdk_ui::timeline` (and the
corresponding `matrix_sdk_ffi` type).
2025-11-21 16:17:09 +01:00
Damir Jelić
eed5f11f26 Merge pull request #5881 from matrix-org/poljar/event-cache/fix-race-condition
Fix a race condition in the redecryptor leading to missed decryption attempts
2025-11-21 15:22:00 +01:00
Damir Jelić
75a977cc47 ci: Free up disk space for the benchmark jobs as well 2025-11-21 14:18:22 +01:00