Skip to content

feat: expose GroupV2 group conversations (contract 0.2.0)#43

Merged
osmaczko merged 3 commits into
masterfrom
feat/groupv2
Jul 10, 2026
Merged

feat: expose GroupV2 group conversations (contract 0.2.0)#43
osmaczko merged 3 commits into
masterfrom
feat/groupv2

Conversation

@osmaczko

@osmaczko osmaczko commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

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-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.

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.

  • 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.

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.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

Doc-test report

Headless chat_module instances built against this commit, driven through the 1:1 round-trip and the three-instance group conversation, rendered alongside the commands actually run and their output (updated each run, commit aafa5b4):

Pages can take a minute to update after the run finishes.

@osmaczko osmaczko force-pushed the feat/bump-libchat-threaded-client branch from a27ef1c to 5565d6f Compare July 4, 2026 08:00
@osmaczko osmaczko changed the title feat: expose GroupV2 group conversations feat: expose GroupV2 group conversations (contract 0.2.0) Jul 6, 2026
Base automatically changed from feat/bump-libchat-threaded-client to master July 6, 2026 11:13
@osmaczko osmaczko force-pushed the feat/groupv2 branch 7 times, most recently from 3f780cf to d0b278b Compare July 9, 2026 19:47
@osmaczko osmaczko marked this pull request as ready for review July 9, 2026 19:56
@osmaczko osmaczko requested review from igor-sirotin and jazzz July 9, 2026 19:56

@jazzz jazzz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Send IT!

Comment thread rust-lib/src/actions.rs
Ok(chat_id)
}

/// Create a GroupV2 conversation with this installation as its only member;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[Sand] This function is not tied directly to GroupV2, and may in the future be a different type.

Comment thread rust-lib/src/inbound.rs
/// shape (PrivateV1 / DirectV1) is `direct`, GroupV2 is `group`.
fn kind_for_class(class: ConversationClass) -> ConversationKind {
match class {
ConversationClass::Private => ConversationKind::Direct,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[!] ConversationClass::Private should be renamed to ::Direct in the future at some point

Comment on lines +66 to +70
pub(crate) enum ConversationKind {
#[default]
Direct,
Group,
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
pub(crate) enum ConversationKind {
#[default]
Direct,
Group,
}
pub(crate) enum ConversationClass {
#[default]
Private,
Group,
}

[Sand] Keep it consistent with libchat's wording.

osmaczko added 3 commits July 9, 2026 23:06
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.
@osmaczko osmaczko merged commit c9542d8 into master Jul 10, 2026
7 checks passed
@osmaczko osmaczko deleted the feat/groupv2 branch July 10, 2026 07:25
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