Skip to content

refactor(skychat): share the group controller (move to pkg/skychat/group) + expose Leave/Delete/Invite in wasm - #3595

Open
0pcom wants to merge 3 commits into
skycoin:developfrom
0pcom:feat/skychat-group-shared
Open

refactor(skychat): share the group controller (move to pkg/skychat/group) + expose Leave/Delete/Invite in wasm#3595
0pcom wants to merge 3 commits into
skycoin:developfrom
0pcom:feat/skychat-group-shared

Conversation

@0pcom

@0pcom 0pcom commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

Step 1 of sharing the skychat controller.

  1. The group Manager already IS a shared controller (compiles under js/wasm with CXO in-memory; imported by pkg/visor, cmd/wasm-visor, and the CLI) — it just lived in cmd/apps/skychat/group. Moved to pkg/skychat/group next to the already-shared message/xfer/voice cores (pure move, 9 importers updated, group + visor tests pass).
  2. Surfaced three Manager methods the wasm binding was missing — skychatGroupLeave/Delete/Invite — closing the leave/delete-group + invite-link gaps in the native-vs-wasm table, no new controller logic.

Native + js/wasm both build. Follow-ups: delete-group-message (needs nano-ts surfaced), group history backfill, then the DM controller.

0pcom added 2 commits July 26, 2026 15:34
… core, step 1)

The group Manager is already a shared controller — it compiles under js/wasm
(CXO tree in-memory), and is imported by pkg/visor, cmd/wasm-visor/group_js.go
AND the CLI. It just lived in cmd/apps/skychat/group (the native app's internal
tree), which is the wrong home for a library three subsystems depend on.

Move it to pkg/skychat/group, alongside the already-shared wire cores
(message/xfer/voice). Pure move + import-path update across 9 consumers; no
behavior change (group + visor group tests pass, native + js/wasm both build).

This is step 1 of extracting the skychat controller to a shared core: it makes
the group core's shared status structurally real and gives the wasm side a
clean import to consume the FULL Manager surface (Leave/Delete/AddMember/invite)
in follow-ups, closing the group feature gaps in the wasm-vs-native comparison.
…rface)

The shared group Manager (now pkg/skychat/group) already implements Leave,
Delete and BuildInvite; the wasm binding just didn't surface them. Wire them as
skychatGroupLeave/Delete/Invite — closing the leave/delete-group + invite-link
gaps in the native-vs-wasm skychat comparison, with zero new controller logic
(the Manager owns the CXO teardown, roster update and invite signing).

Stacked on skycoin#3595 (the group-core move).
@0pcom 0pcom changed the title refactor(skychat): move group controller to pkg/skychat/group (shared core, step 1) refactor(skychat): share the group controller (move to pkg/skychat/group) + expose Leave/Delete/Invite in wasm Jul 26, 2026
… message nano-ts

Closes the delete-group-message gap in the native-vs-wasm table. The shared
Manager already publishes signed tombstones (Unsend); the wasm binding lacked it
because the JS side only had the message ts in milliseconds — from which the
exact UnixNano the tombstone must match can't be reconstructed. Surface a
ts_nano STRING field (JS numbers lose precision past 2^53) on each group message
and bind skychatGroupUnsend(id, tsNano). Still no new controller logic.
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.

1 participant