Skip to content

feat: integrate Nostroots community notes into search map and profiles#2733

Open
leon-wbr wants to merge 29 commits into
mainfrom
feature/nostroots-integration
Open

feat: integrate Nostroots community notes into search map and profiles#2733
leon-wbr wants to merge 29 commits into
mainfrom
feature/nostroots-integration

Conversation

@leon-wbr

@leon-wbr leon-wbr commented Jun 5, 2026

Copy link
Copy Markdown

Summary

  • Surface Nostr community notes as pins on the search map with a threaded sidebar view
  • Add Nostroots badge and recent notes to user profiles
  • Action-gate modal prompts users to get the Nostroots app (iOS TestFlight, Android APK, or web) when they want to reply
  • Polish pass: brand-consistent colors, keyboard accessibility, hover states, design token alignment

Test plan

  • Toggle "Community Notes" in search sidebar filters — pins appear on map
  • Click a pin — sidebar opens with threaded notes for that location (same plus code)
  • Click a pin cluster — map zooms in to expand the cluster
  • Click "Reply" in the sidebar — action-gate modal opens with iOS/Android/Web download links
  • Press Escape or click backdrop — modal dismisses
  • Visit a profile with Nostr activity — badge and recent notes appear
  • Verify component tests pass (npx jest --testPathPattern="(CommunityNotesSidebar|NostrootsAction|ProfileNostr|nostr\.client\.service)")

leon-wbr and others added 20 commits June 5, 2026 12:44
Implements framework-agnostic NostrService class with connect/disconnect,
map notes subscription, user notes fetch, and username resolution via
kind 10390 events. Adds moduleNameMapper for nostr-tools/relay subpath
to support Jest 26 resolution.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Wire up the NostrService to SearchMap so that enabling the Community Notes
toggle subscribes to map notes for the visible area and renders them as
blue circle markers via a new GeoJSON source and layer set.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds CommunityNotesPopup component that renders note content, verified
indicator, relative timestamp, and Nostroots attribution when a pin is
clicked; wires it into SearchMap via react-map-gl Popup with async
Trustroots username resolution.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Creates NostrootsActionModal component that prompts users to open the
Nostroots web app when they try to perform actions requiring Nostroots,
wires it into SearchMap via the CommunityNotesPopup onActionGate prop.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Webpack 4 doesn't support package.json exports field, so
nostr-tools/relay and nostr-tools/nip19 need explicit aliases
to their CJS builds.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ring

Subscribe to kind 30398 events from the Nostroots validation server
pubkey instead of filtering by plus-code prefixes. This fetches all
verified map notes globally in a single subscription, removing the
need to re-subscribe on map pan/zoom.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Clicking a community note pin now opens the sidebar (like hosts/meetups)
showing all notes sharing the same plus code as a thread. Replaces the
map popup approach. Also broadens filters to fetch all verified notes
and adds debug logging.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Greenfield Nostr-native hospitality exchange platform with WoT-based
encrypted offers, privacy by default, and legacy network connectors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
15 tasks covering monorepo setup, all packages/apps scaffolded,
CI/CD pipeline, Nostr key gen + relay client, and user stories checklist.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…profile badge

Align styles with Trustroots brand (replace hard-coded Material blue with
@brand-primary), add keyboard accessibility to the action-gate modal (Escape,
focus management, close button), rework modal to prioritize iOS/Android
downloads matching notes.trustroots.org, add hover states and loading
indicators to sidebar note cards, fix popup class name mismatch with LESS
styles, and tighten spacing to use design tokens throughout.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@guaka guaka added the run-e2e add this label to a PR if you want the e2e tests to run label Jun 6, 2026
@leon-wbr

leon-wbr commented Jun 6, 2026

Copy link
Copy Markdown
Author
Screenshot 2026-06-06 at 16 27 02

K and others added 4 commits June 12, 2026 16:20
Remove unrelated superpowers planning docs and dead CommunityNotesPopup
code. Share a single nostrService singleton, close ephemeral relay
subscriptions after EOSE, and drop debug logging. Clean up stale sidebar
template attribute and unused openfreemap CSP entry. Add
CommunityNotesSidebar tests and shared timeAgo helper.

Co-authored-by: Cursor <cursoragent@cursor.com>
@guaka guaka deleted the branch main June 12, 2026 21:28
@guaka guaka closed this Jun 12, 2026
@guaka guaka reopened this Jun 12, 2026
@guaka guaka changed the base branch from master to main June 12, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-e2e add this label to a PR if you want the e2e tests to run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants