ChatClient migration#145
Merged
Merged
Conversation
87044f0 to
af92d09
Compare
osmaczko
approved these changes
Jun 23, 2026
osmaczko
left a comment
Contributor
There was a problem hiding this comment.
I like the builder pattern 👷♂️
b1f2e2f to
42bdfa8
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.
This PR continue preparing Cli-Client for group chats. Specifically It introduces a Builder pattern which allows clients to be constructed with both testing and production components.
Relating to De-MLS, this PR:
Summary
ChatClientBuilder, a typestate builder for constructingChatClientthat makes all four configuration slots (identity,transport,registration,storage) explicit at the type level, with sensible defaults for any unset fieldChatClientfrom a 2-param<T, R>type to a fully generic<I, T, R, S>type, making the identity provider and storage backend first-class type parameters; removes the oldopen/open_with_registryconstructors in favour of the builderstorage_config()on the builder as a convenience that accepts aStorageConfigand constructsChatStorageinline, so callers don't need to importChatStoragedirectlyGroupV1Convo: echoed outbound messages (including MLS Commits fromadd_member) are now suppressed via a bounded hash cache (OUTBOUND_HASH_CACHE_SIZE = 25) to prevent the sender from re-processing its own messages on loopback transportsChatStorage,ChatStore, andIdentityProviderfromlogos-chatso downstream crates don't need to reach into internal dependencieschat-cli(app.rs,ui.rs,main.rs) and themessage-exchangeexample to use the new 4-paramChatApp<I, T, R, S>and builder API