Skip to content

Conversation

@Hywan
Copy link
Member

@Hywan Hywan commented Oct 29, 2025

This is a reboot of #5245.

This patch introduces the sqlite and indexeddb feature flag, enabling the use of SQLite or IndexedDB for the session store. This patch also introduces the ability to use non-persistent, in-memory session store.

The new ClientBuilder::session_store_in_memory, ClientBuilder::session_store_with_sqlite and ClientBuilder::session_store_with_indexeddb methods are introduced to configure the session store. This patch adds new SqliteSessionStoreBuilder and IndexedDbSessionStoreBuilder structure.

@Hywan Hywan requested a review from a team as a code owner October 29, 2025 11:05
@Hywan Hywan requested review from poljar and removed request for a team October 29, 2025 11:05
@Hywan Hywan changed the title feat(ffi): Add IndexedDB en in-memory session stores support feat(ffi): Add IndexedDB and in-memory session stores support Oct 29, 2025
@codecov
Copy link

codecov bot commented Oct 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.50%. Comparing base (9af8fad) to head (1815eb9).
⚠️ Report is 9 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5811   +/-   ##
=======================================
  Coverage   88.50%   88.50%           
=======================================
  Files         360      360           
  Lines      100723   100723           
  Branches   100723   100723           
=======================================
+ Hits        89141    89142    +1     
  Misses       7398     7398           
+ Partials     4184     4183    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 29, 2025

CodSpeed Performance Report

Merging #5811 will not alter performance

Comparing Hywan:pr-5245-reboot (1815eb9) with main (c3e01a6)

Summary

✅ 50 untouched

Copy link
Contributor

@poljar poljar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I would perhaps remove the session_ prefix from the various functions and just call it ClientBuilder::sqlite_store() or something along those lines.

I don't think the deprecated warning passes over the FFI, but don't mind it either.

Hywan added 4 commits October 29, 2025 14:46
This patch introduces the `sqlite` and `indexeddb` feature flag,
enabling the use of SQLite or IndexedDB for the stores. This patch also
introduces the ability to use non-persistent, in-memory stores.

The new `ClientBuilder::in_memory_store`, `ClientBuilder::sqlite_store`
and `ClientBuilder::indexeddb_store` methods are introduced to
configure the stores. This patch adds new `SqliteStoreBuilder` and
`IndexedDbStoreBuilder` structure.
These two methods are used only once, it's fine to get a large error
here.
This method restores and marks `ClientBuilder::session_paths` as
deprecated.
@Hywan
Copy link
Member Author

Hywan commented Oct 29, 2025

Thanks for the renaming suggestion. Here are the new names:

  • ClientBuilder::in_memory_store
  • ClientBuilder::sqlite_store
  • ClientBuilder::indexeddb_store

@poljar
Copy link
Contributor

poljar commented Oct 29, 2025

Thanks for the renaming suggestion. Here are the new names:

* `ClientBuilder::in_memory_store`

* `ClientBuilder::sqlite_store`

* `ClientBuilder::indexeddb_store`

Looking good.

@Hywan Hywan merged commit 12e39f5 into matrix-org:main Oct 29, 2025
54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants