Add nested thread trees, recursive reply fetching, multi-level back navigation

Overhauls the thread view from flat single-level replies to proper nested
conversation trees. Fixes NIP-10 tagging (root + reply markers), adds
2-round-trip recursive thread fetch, ancestor chain display, reply-to-any-note
targeting, view stack navigation (up to 20 levels), and loading shimmer.
This commit is contained in:
Jure
2026-03-21 15:21:46 +01:00
parent 5a8250e7cf
commit acb0d531c0
10 changed files with 578 additions and 236 deletions
+3 -2
View File
@@ -7,9 +7,10 @@ import { EmojiPicker } from "../shared/EmojiPicker";
interface InlineReplyBoxProps {
event: NDKEvent;
name: string;
rootEvent?: { id: string; pubkey: string };
}
export function InlineReplyBox({ event, name }: InlineReplyBoxProps) {
export function InlineReplyBox({ event, name, rootEvent }: InlineReplyBoxProps) {
const [replyText, setReplyText] = useState("");
const [replying, setReplying] = useState(false);
const [replyError, setReplyError] = useState<string | null>(null);
@@ -23,7 +24,7 @@ export function InlineReplyBox({ event, name }: InlineReplyBoxProps) {
setReplying(true);
setReplyError(null);
try {
await publishReply(replyText.trim(), { id: event.id, pubkey: event.pubkey });
await publishReply(replyText.trim(), { id: event.id, pubkey: event.pubkey }, rootEvent);
setReplyText("");
setReplySent(true);
adjustReplyCount(1);