Mobile: compose, render, and notify for @channel/@here channel mentions
- Dominant language
- Rust
- Stars
- 32.7k
- Forks
- 4.3k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 253
Description
> 🤖 Filed by kray's AI agent on his behalf.
## Problem
#3197 adds `@channel` and `@here` channel-wide mentions (NIP-CM, `["notify","channel"|"here"]` marker tag) with relay, CLI, SDK, and desktop support. Mobile is the missing surface — mirroring how #2792 tracked mobile support for user groups (#2728).
Today on mobile:
- A received `@channel`/`@here` renders as plain text — no mention chip, no visual signal that the message notified the channel.
- `@channel` events **do** reach mobile users' Home mention feed (the feed is relay-side, one row per event), so mobile already benefits passively — but the message body doesn't explain *why* it's in the feed.
- The composer has no way to send a channel mention: no autocomplete rows for the reserved tokens, no `notify` tag attached on send.
- Notification handling: mobile's `should_notify_for_event` ladder needs the same two NIP-CM rules the desktop ladder got — `@channel`/`@here` escalate to mention-tier for channel members, and **channel mutes suppress them** (direct p-tag mentions keep piercing mutes). `@here` is observation-time live-only (own presence online AND within the 120s freshness window; no retroactive badge).
## Scope
1. **Render**: chip `@channel`/`@here` when the event carries the corresponding notify tag (reserved tokens resolve ahead of display names, per NIP-CM).
2. **Notify ladder**: extend `mobile/lib/features/channels/unread_badge/should_notify_for_event.dart` with the NIP-CM escalation + mute-suppression rules (see `desktop/src/features/notifications/lib/channelNotifyEscalation.ts` and `lib/feed.ts` for the reference semantics, including the direct-mention-pierces-mute precedence).
3. **Compose**: autocomplete rows + confirmation prompt, mirroring desktop (`"Notify everyone in this channel"` / online-only copy for `@here`), attaching the `["notify", mode]` tag on send.
4. Keep event kinds in sync: `mobile/lib/shared/relay/nostr_models.dart` mirrors `desktop/src/shared/constants/kinds.ts`.
Render + notify ladder (1+2) are the user-facing gap and can land before compose (3) — receiving correctly matters more than sending, and CLI/desktop already cover authoring.
## References
- Spec: `docs/nips/NIP-CM.md` (in-repo)
- Desktop implementation: #3197
- Prior art for the mobile-follow-up pattern: #2792 (mobile user groups)
Contributor guide
Research direction
Start with docs/nips/NIP-CM.md and mobile/lib/features/channels/unread_badge/should_notify_for_event.dart, comparing the desktop escalation reference in desktop/src/features/notifications/lib/channelNotifyEscalation.ts and lib/feed.ts. Inspect the mobile channel rendering and composer entry points, plus mobile/lib/shared/relay/nostr_models.dart; done means mobile renders tagged mentions, applies the specified notification rules, and can compose the correct notify tags.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100