feat: expose GroupV2 group conversations (contract 0.2.0)#43
Merged
Conversation
Doc-test reportHeadless Pages can take a minute to update after the run finishes. |
a27ef1c to
5565d6f
Compare
3f780cf to
d0b278b
Compare
jazzz
approved these changes
Jul 9, 2026
| Ok(chat_id) | ||
| } | ||
|
|
||
| /// Create a GroupV2 conversation with this installation as its only member; |
Collaborator
There was a problem hiding this comment.
[Sand] This function is not tied directly to GroupV2, and may in the future be a different type.
| /// shape (PrivateV1 / DirectV1) is `direct`, GroupV2 is `group`. | ||
| fn kind_for_class(class: ConversationClass) -> ConversationKind { | ||
| match class { | ||
| ConversationClass::Private => ConversationKind::Direct, |
Collaborator
There was a problem hiding this comment.
[!] ConversationClass::Private should be renamed to ::Direct in the future at some point
osmaczko
commented
Jul 9, 2026
Comment on lines
+66
to
+70
| pub(crate) enum ConversationKind { | ||
| #[default] | ||
| Direct, | ||
| Group, | ||
| } |
Contributor
Author
There was a problem hiding this comment.
Suggested change
| pub(crate) enum ConversationKind { | |
| #[default] | |
| Direct, | |
| Group, | |
| } | |
| pub(crate) enum ConversationClass { | |
| #[default] | |
| Private, | |
| Group, | |
| } |
[Sand] Keep it consistent with libchat's wording.
The group ops this module builds on (create_group_conversation / add_group_members, injectable GroupV2 timing, the group_members roster, the honest DirectV1 display class, the last-resort InboxV2 key package, and list_conversations dedup) landed on libchat main in #167. Pin the three libchat crates to that rev (e7e122b). #166 split the threaded client: the transport-generic surface this module uses moved to a new `logos-generic-chat` crate, while `logos-chat` became a facade that bundles an embedded logos delivery. The module brings its own delivery (logoscore's delivery_module), so switch the dependency and imports to `logos-generic-chat` and stay off the embedded-delivery facade. libchat floats de-mls on `branch = "main"`, so the lock also holds de-mls at libchat's own rev (2b3eed17); a bare `cargo update` floats it forward to an incompatible API that won't compile against this libchat.
The module surfaced only 1:1 DirectV1 conversations, but the UI needs group
chats. Expose libchat's GroupV2 surface through the IPC contract, bumped to
0.2.0.
- create_group_conversation() opens a GroupV2 group with this installation
as its only member; add_group_member(convo_id, peer_address) grows it one
peer at a time (the group's steward commits the add asynchronously, so a
peer joins some time after the call returns).
- list_group_members(convo_id) returns the roster as a [GroupMember] list,
each carrying the member's directory-verified account address (empty when
the member claims no confirmed account), read from libchat's MLS state.
- The Conversation record and the conversation_created event carry a kind
("direct" or "group") distinguishing the two shapes; received messages
carry a sender (the directory-verified account address, or the device id
when the sender claims no account) on the Message record and the
message_received event.
Exercise the new GroupV2 contract end to end: three headless logoscore instances create a group, grow it member by member, and fan out messages with sender attribution over the live delivery network, documenting the group API by example. Wire it into the doctests workflow alongside the two-instance exchange spec so it runs on every PR as both an executable tutorial and an integration check.
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.
feat: expose GroupV2 group conversations (contract 0.2.0)
build: pin libchat to the merged GroupV2 rev (#167)
The group ops this module builds on (create_group_conversation / add_group_members,
injectable GroupV2 timing, the group_members roster, the honest DirectV1 display
class, the last-resort InboxV2 key package, and list_conversations dedup) landed on
libchat main in #167. Pin the three libchat crates to that rev (e7e122b).
#166 split the threaded client: the transport-generic surface this module uses moved
to a new
logos-generic-chatcrate, whilelogos-chatbecame a facade that bundlesan embedded logos delivery. The module brings its own delivery (logoscore's
delivery_module), so switch the dependency and imports to
logos-generic-chatandstay off the embedded-delivery facade.
libchat floats de-mls on
branch = "main", so the lock also holds de-mls atlibchat's own rev (2b3eed17); a bare
cargo updatefloats it forward to anincompatible API that won't compile against this libchat.
feat: expose GroupV2 group conversations (contract 0.2.0)
The module surfaced only 1:1 DirectV1 conversations, but the UI needs group
chats. Expose libchat's GroupV2 surface through the IPC contract, bumped to
0.2.0.
as its only member; add_group_member(convo_id, peer_address) grows it one
peer at a time (the group's steward commits the add asynchronously, so a
peer joins some time after the call returns).
each carrying the member's directory-verified account address (empty when
the member claims no confirmed account), read from libchat's MLS state.
("direct" or "group") distinguishing the two shapes; received messages
carry a sender (the directory-verified account address, or the device id
when the sender claims no account) on the Message record and the
message_received event.
docs: add a three-party group-chat doc-test
Exercise the new GroupV2 contract end to end: three headless logoscore
instances create a group, grow it member by member, and fan out messages
with sender attribution over the live delivery network, documenting the
group API by example. Wire it into the doctests workflow alongside the
two-instance exchange spec so it runs on every PR as both an executable
tutorial and an integration check.
Note (not part of the commit history): the three libchat crates are rev-pinned to
merged libchat main (logos-messaging/libchat#167, e7e122b) rather than a published
version, since GroupV2 has no release tag yet; re-thread to a tag once one is cut.
Base is master.