Claude d0345d74a8 feat: Add thread command for NIP-22 comment threads
Implements a new `thread` command that displays NIP-22 comment threads with expandable tree visualization.

**New Command:**
- `thread <identifier>` - Display comment thread for any Nostr event
- Accepts nevent, naddr, note, hex IDs, and kind:pubkey:d-tag formats
- Reuses parseOpenCommand for argument parsing

**ThreadViewer Component** (`src/components/ThreadViewer.tsx`):
- Displays root event at top followed by comment tree
- Fetches all kind 1111 comments that reference the root event
- Builds hierarchical tree structure from flat comment list
- Distinguishes top-level comments (root === parent) from nested replies
- Expandable/collapsible tree nodes with chevron indicators

**Comment Tree Features:**
- Two-level reply visualization (root → reply → nested replies)
- Automatic sorting by created_at (oldest first)
- Shows reply count and relative timestamps
- Focus support for highlighting specific comments
- Empty state when no comments exist

**Technical Implementation:**
- Uses NIP-22 helpers: getCommentRootPointer, getCommentReplyPointer
- Reactive timeline subscription via use$ and eventStore.timeline
- Proper pointer matching for both event IDs and address pointers
- Custom CommentReply renderer with UserName and RichText integration
- BaseEventContainer integration for consistent event display

**Integration:**
- Added "thread" to AppId type
- Registered in WindowRenderer with lazy loading
- Added thread command to man pages with examples
- Cross-referenced with "open" command in seeAlso

This implements the foundation for NIP-22 thread exploration. Future enhancements can include reply UI, thread depth visualization, and better focus/scroll behavior.
2026-01-17 17:27:35 +00:00
2025-12-18 15:46:02 +01:00
👶
2025-12-09 16:26:31 +01:00
2025-12-19 12:49:29 +01:00
2025-12-13 15:06:05 +01:00
2025-12-10 13:00:39 +01:00
2025-12-22 20:40:16 +00:00
2025-12-20 14:25:40 +01:00
2026-01-14 19:24:37 +01:00
👶
2025-12-09 16:26:31 +01:00
👶
2025-12-09 16:26:31 +01:00
👶
2025-12-09 16:26:31 +01:00
👶
2025-12-09 16:26:31 +01:00
2025-12-14 16:50:16 +01:00

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+K to 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

Description
No description provided
Readme MIT 14 MiB
Languages
TypeScript 98.9%
CSS 0.8%
JavaScript 0.3%