mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-04-08 22:47:02 +02:00
c52e783fce0d9d69246604acd0860f78299cb229
* fix(nip-29): fetch admin and member lists in parallel and correctly tag admins This commit improves NIP-29 group member fetching with two key changes: 1. **Parallel fetching**: Admins (kind 39001) and members (kind 39002) are now fetched in parallel using separate subscriptions, improving performance 2. **Correct admin role tagging**: Users in kind 39001 events now correctly default to "admin" role instead of "member" when no explicit role tag is provided, as per NIP-29 spec Changes: - Split participantsFilter into separate adminsFilter and membersFilter - Use Promise.all to fetch both kinds in parallel - Updated normalizeRole helper to accept a defaultRole parameter - Process kind 39001 with "admin" default, kind 39002 with "member" default - Added clearer logging for admin/member event counts Related: src/lib/chat/adapters/nip-29-adapter.ts:192-320 * refactor(nip-29): simplify parallel fetch using pool.request Use pool.request() with both filters in a single call instead of manual subscription management. This is cleaner and more idiomatic: - Auto-closes on EOSE (no manual unsubscribe needed) - Fetches both kinds (39001 and 39002) in parallel with one request - Reduces code complexity significantly * fix(nip-29): use limit 1 for replaceable participant events Kinds 39001 and 39002 are replaceable events with d-tag, so there should only be one valid event of each kind per group. Changed limit from 5 to 1. * fix(chat): change "Sign in to send messages" to "Sign in to post" Simplified the login prompt text in chat interface for clarity. --------- Co-authored-by: Claude <noreply@anthropic.com>
…
Grimoire
A Nostr protocol explorer and developer tool with a tiling window manager interface.
Features
- Tiling Windows - Each window is a Nostr "app" (profile viewer, event feed, NIP docs, etc.)
- Command Palette - Unix-style commands via
Cmd+Kto open apps and navigate - Multi-workspace - Virtual desktops with independent layouts
- Real-time - Reactive event subscriptions with automatic updates
Stack
React 19, TypeScript, Vite, TailwindCSS, Jotai, Dexie, Applesauce
Getting Started
npm install
npm run dev
Scripts
| Command | Description |
|---|---|
npm run dev |
Start dev server |
npm run build |
Build for production |
npm test |
Run tests in watch mode |
npm run lint |
Lint code |
npm run format |
Format code |
License
MIT
Languages
TypeScript
98.9%
CSS
0.8%
JavaScript
0.3%