Skip to content

feat(mobile): add Pulse social feed tab#772

Merged
wesbillman merged 3 commits into
mainfrom
mobile-pulse-feature
May 28, 2026
Merged

feat(mobile): add Pulse social feed tab#772
wesbillman merged 3 commits into
mainfrom
mobile-pulse-feature

Conversation

@wesbillman

Copy link
Copy Markdown
Collaborator

Summary

Adds the Pulse social feed as a new top-level tab in the mobile app, porting the desktop feature to Flutter.

What's included

  • New Pulse tab at nav index 1 (Home / Pulse / Activity / Search)
  • 5 sub-tabs: Everyone, Following, Liked, Agents, Mine
  • Note cards with avatar, display name, relative time, markdown content, reply context, and action row (heart, reply, share, DM)
  • Agent activity cards with grouped notes and online status dots
  • Compact composer ("What's on your mind?") with send button and loading state
  • Follow/unfollow via kind:3 contact list (read-before-write to prevent data loss)
  • Reactions (kind:7 with kind:5 deletion filtering for accurate counts)
  • Share via nostr:nevent URI copy
  • Pull-to-refresh on all tabs

Technical details

  • Stable Riverpod family provider keys (sorted comma-joined strings) to prevent provider churn
  • Deleted reactions filtered via kind:5 before aggregation (liked notes + counts)
  • Agent discovery from both kind:10100 profiles AND kind:13534 relay membership (role=bot)
  • Contact list mutations fetch fresh kind:3 before write (atomic-ish read/merge/write)
  • Single multi-author relay query for timelines (no N+1 fan-out)
  • Reuses existing MessageContent/GptMarkdown rendering and channelActionsProvider for reactions

Files changed (12 files, +1532/-8)

  • mobile/lib/features/pulse/ — new feature module (7 files)
  • mobile/lib/features/home/home_page.dart — nav integration
  • mobile/lib/shared/relay/nostr_filters.dart — new filter constructors
  • mobile/lib/shared/relay/nostr_models.dart — kind constants

Validation

  • flutter analyze: no issues
  • flutter test: all 336 tests pass
  • dart format: clean
  • Pre-commit hooks (lefthook): all green

Follow-up items

  • Managed-agent status parity (desktop has local Tauri source; mobile uses relay-only)
  • @mention autocomplete in composer (v2)

Add a full-featured Pulse tab to the mobile app, porting the desktop
social feed experience. Includes:

- New bottom nav tab (Home, Pulse, Activity, Search)
- Tab bar with Everyone, Following, Liked, Agents, Mine sections
- Note cards with heart, reply, share, and DM actions
- Inline reply composer
- Note composer for publishing kind:1 notes
- Follow/unfollow via contact list (kind:3) management
- Reaction support (kind:7) with optimistic UI
- Agent activity cards with grouped notes and status dots
- Pull-to-refresh, loading skeletons, empty states
- New NostrFilter helpers for social queries
- EventKind.note and EventKind.contactList constants

Signed-off-by: Wes <wesbillman@users.noreply.github.com>
- Use stable sorted comma-joined string keys for Riverpod family
  providers (notesTimelineProvider, noteReactionsProvider) to prevent
  identity-based key mismatches causing repeated fetches
- Filter deleted reactions (kind:5) in both likedNotesProvider and
  noteReactionsProvider so unlikes persist across refreshes
- Fetch fresh contact list from relay in followUser/unfollowUser
  before mutating to prevent stale-cache data loss
- Add NostrFilters.deletionsByTargetIds helper

Signed-off-by: Wes <wesbillman@users.noreply.github.com>
- Change composer placeholder from "What's pulsing?" to "What's on your mind?"
  to match desktop.
- Increase top padding above filter tab bar (4px → 12px) so there's more
  breathing room above than below.
- Fix Agents tab showing no posts by also extracting bot pubkeys from the
  relay membership list (kind:13534). Previously only kind:10100 agent profile
  events were queried, which misses managed agents that haven't published
  their own profile event.

Signed-off-by: Wes <wesbillman@users.noreply.github.com>
@wesbillman wesbillman requested a review from a team as a code owner May 28, 2026 17:41
@wesbillman

Copy link
Copy Markdown
Collaborator Author

Will improve styling in a bit:

Screenshot 2026-05-28 at 10 40 49 AM

@wesbillman wesbillman merged commit 1218572 into main May 28, 2026
15 checks passed
@wesbillman wesbillman deleted the mobile-pulse-feature branch May 28, 2026 18:09
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