Files
buzz/mobile/test/features/channels
morgmart ed29172fbb fix(mobile): name blocked agents clearly, let owners remove their agent from a DM (#9921)
## Problem

Two follow-ups to growable DMs on mobile, matching desktop
block/buzz-app#3744:

1. When an agent's add policy blocks a DM, the message names the agent
by display name only, so two agents called "Scout" read the same, and it
never says whose owner to ask.
2. Once you add your own agent to a DM, you can't take it out. The relay
allows it, but mobile hid Remove in every DM.

## Change

**Name the blocked agent clearly.** The refusal now uses the app's
identity labels for the agent and its owner:

- Only its owner can add it, owner known: "Only Morgan can add Scout to
a DM."
- Only its owner can add it, owner unknown: "Only the owner of Scout can
add it to a DM."
- No one can add it: "Scout can't be added to a DM."
- When adding to an existing DM, all start with "Couldn't add them."
- If the name can't be read, it says "this agent".

Labels are compared against the people in the DM, so two same-named
agents read as "Morgan's Scout", and an agent that shares a person's
name reads as "Scout (agent)". The owner is named only when it is
verified from the agent's signed profile.

**Let owners remove their own agent from a DM.** On a DM member's
profile, an agent you verifiably own now has "Remove from DM", confirmed
with "Remove from DM?". People never get Remove in a DM, and admin and
role actions stay out of DMs, matching the relay rule.

## Screenshots

Temporary widget renders with test data, not committed. The refusal
render passes the shared wording a known owner and a disambiguated agent
label; label resolution itself is covered by the tests below.

### Blocked agent

| | Light | Dark |
|---|---|---|
| Narrow | ![refusal light
narrow](https://github.com/user-attachments/assets/fe6b08c4-01d0-43c5-b6ba-5416ac07cecb)
| ![refusal dark
narrow](https://github.com/user-attachments/assets/ef30bd2a-4a3b-45dd-829c-25f956f023ed)
|
| Wide | ![refusal light
wide](https://github.com/user-attachments/assets/9a193a12-5a6c-491d-af30-a95afb649b5e)
| ![refusal dark
wide](https://github.com/user-attachments/assets/eeab3f52-1556-4248-adc3-0e55b6511720)
|

### Remove from DM

| | Light | Dark |
|---|---|---|
| Row, narrow | ![row light
narrow](https://github.com/user-attachments/assets/a4ec6a75-f749-4cb8-be0d-13c82427a292)
| ![row dark
narrow](https://github.com/user-attachments/assets/9ac8ee1d-152e-47ec-813b-7a61ccdbe15d)
|
| Row, wide | ![row light
wide](https://github.com/user-attachments/assets/bf465fe0-8b3c-462b-82ce-2b1527056656)
| ![row dark
wide](https://github.com/user-attachments/assets/bc991265-3e49-4241-a3aa-c499aac4f3ee)
|
| Confirm, narrow | ![confirm light
narrow](https://github.com/user-attachments/assets/8088a4da-a665-4591-95ae-1ecc984f77b1)
| ![confirm dark
narrow](https://github.com/user-attachments/assets/11a52247-dcf0-4105-be4d-9f3ba3f14838)
|
| Confirm, wide | ![confirm light
wide](https://github.com/user-attachments/assets/281ba908-d187-4b8e-889e-baa4c81bd44d)
| ![confirm dark
wide](https://github.com/user-attachments/assets/537b2b49-78f6-4074-9ba8-fbce2f55b9a8)
|

## Tests

- Wording for every case, plus opening and adding with a verified owner,
two same-named agents, an agent sharing a person's name, and owner
unknown.
- Remove from DM: the owner removes their agent after confirming; no
Remove for another person's agent, an unowned agent, or a person.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
Signed-off-by: Tom Brow <tomb@block.xyz>
Co-authored-by: Carl <c217fe6b9d958f41c3a5e030dccc7f626775a923089cb6491305eade75ea1f1b@buzz.block.builderlab.xyz>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Tom Brow <tomb@block.xyz>
Co-authored-by: studio <dc2fc481343672df31a689840c09299972e704dac592e0da6f18486646a7ee3e@localhost>
2026-11-23 17:34:54 -08:00
..