From 8dc61635cf18fd56c3638094d653283acd868cce Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 17 Jan 2026 10:41:28 +0000 Subject: [PATCH] feat: Simplify POST command to plain kind 1 with relay & mentions selection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Completely refactor POST command for simplicity and usability. Remove threading, replies, and title input. Focus on clean kind 1 posting with explicit relay selection and mention p-tag control. ## Major Changes **PostWindow (Simplified)**: - Removed thread/reply logic entirely - Support configurable `kind` prop (default: 1) - Build events inline (no external builders needed) - Relay validation (require at least 1 relay) - Clean error handling **PostComposer (Enhanced)**: - Added collapsible relay selector (checkboxes for user write relays) - Added collapsible mentions selector (auto-detect nostr: URIs, select which to p-tag) - Removed title input, reply preview, showTitleInput props - Extract mentions from content via nip19.decode() - Extract hashtags from content (#word pattern) - Auto-select all mentions by default (can deselect before posting) - Added onChange callback to MentionEditor for live content tracking **Command Syntax**: - `post` - Create kind 1 note (default) - `post -k ` - Create any event kind - `post --kind ` - Explicit kind flag **Removed**: - PostComposerExamples.tsx (outdated examples) - buildKind1Event/buildKind11Event dependencies - Thread and reply complexity ## UI Features **Relay Selector**: - Shows all user write relays as checkboxes - Displays count (e.g., "Relays (3/5)") - Collapsible to save space - All selected by default **Mentions Selector**: - Auto-detects `nostr:npub1...` and `nostr:nprofile1...` URIs - Shows truncated pubkeys (first 8 + last 8 chars) - Displays count (e.g., "Mentions (2/2)") - Auto-selects new mentions as they're typed - Collapsible, only shows when mentions exist ## Technical Notes - Uses GrimoireState.activeAccount for relay list (not applesauce IAccount) - Publishes to each relay individually in ActionRunner - Native `