Skip to content

feat(desktop): add Pulse social notes surface#296

Merged
wesbillman merged 2 commits intomainfrom
pulse
Apr 11, 2026
Merged

feat(desktop): add Pulse social notes surface#296
wesbillman merged 2 commits intomainfrom
pulse

Conversation

@wesbillman
Copy link
Copy Markdown
Collaborator

Summary

  • New Pulse surface (/pulse) for viewing and posting kind:1 social notes (NIP-01) with follow/unfollow via NIP-02 contact lists
  • 4 tabs: For You (blended human + agent feed), People, Agents (with smart activity grouping), My Notes
  • Backend: 4 new Tauri commands (publish_note, get_contact_list, set_contact_list, get_notes_timeline) with kind:1/kind:3 event builders
  • Recent Notes widget on Home feed, kind:1 "Note" badge in Cmd+K search, profile notes "View all" toggle
  • Extracted shared UserAvatar component from MessageRow — now used in Pulse, forums, and channels for consistent avatar rendering

Key decisions

  • Race-condition-safe follow/unfollow: mutations re-fetch the contact list inside mutationFn before computing deltas (kind:3 is a full-snapshot replaceable event)
  • Bounded timeline requests (max 100 pubkeys) to prevent unbounded sequential HTTP requests
  • Stable query keys using sorted comma-joined pubkey strings to avoid reference-equality refetch churn
  • Agent notes grouped by sliding window (compare against previous note, not group start) to prevent unbounded collapse
  • Compose box at bottom (matching channel/forum layout), placeholder "Post to Pulse..." for clarity

Test plan

  • Navigate to Pulse via sidebar — verify 4 tabs render
  • Post a note from compose box — verify it appears in My Notes and For You
  • Follow/unfollow users — verify contact list updates and timeline reflects changes
  • Verify avatars match channel message avatars (rounded-lg, same colors)
  • Check Recent Notes widget on Home feed
  • Search for a note via Cmd+K — verify "Note" badge appears

🤖 Generated with Claude Code

Add a new "Pulse" surface for viewing and posting kind:1 social notes
(NIP-01) with follow/unfollow (NIP-02 contact lists), agent activity
grouping, and a "For You" blended feed.

Backend:
- 4 new Tauri commands: publish_note, get_contact_list, set_contact_list,
  get_notes_timeline
- kind:1 text note builder and kind:3 contact list builder in events.rs
- ContactListResponse / ContactEntry models

Frontend:
- /pulse route with PulseScreen, PulseView, ComposeNote, NoteCard,
  AgentActivityCard components
- 4 tabs: For You, People, Agents (with smart grouping), My Notes
- Agent filter dropdown, follow/unfollow with race-condition-safe
  mutations (re-fetch contact list inside mutationFn)
- Recent Notes widget on Home feed
- kind:1 "Note" badge in Cmd+K search results
- UserProfilePopover "View all / Show less" toggle for notes

Code quality:
- Extract shared UserAvatar component from MessageRow inline avatar;
  used in Pulse, forums, and channels for consistent avatar rendering
- Fix pubkey case-mismatch bug in profile lookups (lowercase normalization)
- Bounded timeline requests (max 100 pubkeys)
- Stable query keys (sorted comma-joined string)
- Timeline + contact list invalidation on publish/follow/unfollow

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@wesbillman
Copy link
Copy Markdown
Collaborator Author

Screenshot 2026-04-10 at 4 54 46 PM Screenshot 2026-04-10 at 4 54 49 PM

The UserAvatar extraction dropped the data-testid attributes that
MessageRow's inline avatar had. Add testId prop to UserAvatar that
generates {testId}-image and {testId}-fallback test IDs, matching
the original message-avatar-image / message-avatar-fallback selectors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@wesbillman wesbillman merged commit 1211b0e into main Apr 11, 2026
9 checks passed
@wesbillman wesbillman deleted the pulse branch April 11, 2026 00:09
tlongwell-block added a commit that referenced this pull request Apr 11, 2026
…ona-migration

* origin/main:
  feat(desktop): add Pulse social notes surface (#296)
  Fix flaky desktop smoke tests (#294)
  Add agent lifecycle controls to channel members sidebar (#291)
  Update nest_agents.md tagging info (#292)
  feat: add Sprout nest — persistent agent workspace at ~/.sprout (#290)
  Fix auth and SSRF vulns (#261)
  Add per-agent MCP toolset configuration to agent setup (#279)
  feat(desktop): team & persona import/edit flows (#288)
  Remove menu item subtitles and fix persona card overflow (#289)
  feat: Phase 1 video upload support (Blossom-compliant-ish) (#285)
  Add inline subtitles to menu items and field descriptions (#276)
  Improve ephemeral channel affordances and hide archived sidebar rows (#286)
  Fix @mention search to use word-boundary prefix matching (#278)
  Allow bot owners to remove their agents from any channel (#284)
  [codex] Polish agent selectors and settings layout (#283)

# Conflicts:
#	desktop/scripts/check-file-sizes.mjs
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