Skip to content

feat(mobile): add people and agents to a DM - #9153

Draft
morgmart wants to merge 3 commits into
mainfrom
morganm/growable-dms-mobile
Draft

morgmart wants to merge 3 commits into
mainfrom
morganm/growable-dms-mobile

Conversation

@morgmart

@morgmart morgmart commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Mobile part of growable DMs. A DM's details page now has an Add action where channels show Edit.

  • Adding only agents joins them to this DM with its history. No question is asked, matching desktop.
  • Adding a person asks first. Include history adds them to this DM with its earlier messages. Start new DM opens a DM with everyone and no history, and the app moves to it. If that DM already exists, the relay returns it.
  • In a DM of just you and your agents, adding a person skips the question and opens the DM of everyone, as on main. The relay enforces this too.
  • Both choices send kind 41011. Only Include history carries the ["history","include"] tag, per the relay's opt-in rule in feat(relay): grow DMs in place, identified by their people #9125. Without the tag, the relay forks.
  • iOS shows a native alert. Android uses the standard adaptive dialog.
  • The relay's moderation DM shows no Add, recognized by the relay's NIP-11 signer key. The relay refuses adds there anyway.
  • Leave stays as it is. feat(relay): grow DMs in place, identified by their people #9125 lets the relay accept a member's own leave from a DM.

The question is asked before the sheet shows its busy state, so "Adding…" only appears after a choice.

Related issue

Depends on #9125 (relay) and pairs with block/buzz-app#2670 (desktop). Spec: Growable DMs.

Testing

  • New widget tests: agents join with history and no question; adding a person to a DM of two or more people asks; adding a person to an agent-only DM opens a new DM without asking; Include history keeps this DM; Start new DM sends no tag and opens the new DM; Cancel adds no one and leaves Add enabled; a DM member sees Add (not Edit) on the details page and it opens the add sheet; the moderation DM shows no Add.
  • flutter analyze is clean. The DM sheet, details and confirmation dialog tests pass on 90d9c56 (rebased on main). The iOS alert merged with main's non-destructive confirm option. The 90d9c56 push skipped the pre-push hook because flutter analyze fails on main itself (native_media_headers_test.dart references an undefined videoPreviewFrameLoaderProvider, from test(mobile): check posterless video previews renew the relay assertion #9144); the full channels suite passed on 9421a79, and the push hook runs the mobile checks.
  • The screenshots below come from a temporary headless widget render with test data. It is not committed. The iOS native alert can't render headlessly, so the dialog shots show the Android dialog.
Light Dark
Details, narrow DM details light narrow DM details dark narrow
Details, wide DM details light wide DM details dark wide
Choice, narrow History choice light narrow History choice dark narrow
Choice, wide History choice light wide History choice dark wide

Not yet done: a human test on a device against a relay running #9125.

🤖 Generated with Claude Code

@morgmart
morgmart force-pushed the morganm/growable-dms-mobile branch 2 times, most recently from 9b1a1f0 to 90d9c56 Compare November 6, 2026 01:11
morgmart and others added 3 commits November 6, 2026 16:53
A DM's details page gets an Add action. Adding only agents joins them
in place with the DM's history. Adding a person asks first: Include
history keeps this DM and its messages; Start new DM opens a DM with
everyone and no history, and the app moves to it. Both send kind 41011
with the history tag only for the in-place choice, per the relay's
opt-in rule.

Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
Co-authored-by: Carl <c217fe6b9d958f41c3a5e030dccc7f626775a923089cb6491305eade75ea1f1b@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A DM of at most one person and their agents never gains a person in
place, matching the relay and main. Adding a person there skips the
Include history / Start new DM question and opens the DM of everyone.

Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
Co-authored-by: Carl <c217fe6b9d958f41c3a5e030dccc7f626775a923089cb6491305eade75ea1f1b@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The moderation DM only carries the relay's notices, and the relay
refuses every add to it, so its details page shows no Add action.
The relay is recognized by its NIP-11 signer key.

Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
Co-authored-by: Carl <c217fe6b9d958f41c3a5e030dccc7f626775a923089cb6491305eade75ea1f1b@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@morgmart
morgmart force-pushed the morganm/growable-dms-mobile branch from 90d9c56 to 12d9843 Compare November 7, 2026 01:06

This branch has not been deployed

No deployments
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