refactor: replace group store with dedicated caches [WPB-22782]#2145
Merged
Conversation
ce4e179 to
42db2ca
Compare
fewerner
reviewed
May 18, 2026
e88c7c2 to
401ac72
Compare
Member
SimonThormeyer
left a comment
There was a problem hiding this comment.
This is great, but I'd like to see the breaking change explained (removal of proteusReloadSessions() in the book)
SimonThormeyer
approved these changes
May 18, 2026
Split the 848-line crypto/src/proteus.rs into crypto/src/proteus/ with files grouped by concern (conversation_session, session, message, prekey, core_crypto), co-locating tests with the code they exercise. Public API unchanged: ProteusCentral, ProteusConversationSession, and SessionIdentifier remain reachable at crate::proteus::* via mod.rs re-exports. Prerequisite for the upcoming group_store refactor. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
These accessors were never used and exposed implementation details.
This is much simpler than the old `GroupStore` stuff!
The group store is overly complicated for what we want from it. So now that we have a dedicated proteus session store, use that instead. Note that unlike the group store, we no longer eagerly load sessions into the cache. This is becuase eager loading only made sense when it would load all the conversations; above that limit, the selection loaded would be the oldest-established (sqlite) or effectively random (indexeddb). Neither of those are "most used".
This is intended to replace the group store, which was overly complicated for what we needed.
Didn't check interop when removing an API. But really we shouldn't be publishing APIs only for interop anyway. So this just uses the more normal API instead.
Proteus sessions now act the way MLS sessions do: they load dynamically on first use with no preload. The `proteusReloadSessions` function has therefore been removed.
This slipped through the cracks because we used to transparently create a default GroupStoreValue for MLS conversations when one did not already exist. The new implementation is stricter, which caused this test to fail.
This slipped through the cracks because we used to transparently create a default GroupStoreValue for MLS conversations when one did not already exist. The new implementation is stricter, which caused this test to fail.
505f9a0 to
775390c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's new in this PR
Get rid of the whole group store module and its contents. These were meant to be reusable caches for conversation data to reduce DB accesses and deserialization costs, but we were trying to get too much flexibility out of them, leading to high complexity.
This PR replaces those with two independent purpose-built caches, one for Proteus and one for MLS.
PR Submission Checklist for internal contributors
SQPIT-764feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.