From 7d2bd1c03e131e012274af2631cd7a6575dbad21 Mon Sep 17 00:00:00 2001 From: highperfocused Date: Mon, 7 Sep 2026 21:55:51 +0200 Subject: [PATCH] Address review feedback on nested reply threading - Remove invalid aria-setsize={-1}; the real set size isn't tracked here. - Make aria-expanded an explicit boolean and keep aria-controls consistent across active/inactive Reply buttons. - Fix cycle field docstring to match its boolean type. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01BYiUtZMQeA5RHggQw73wto --- src/apps/notes/index.tsx | 1 - src/components/nostr/NoteCard.tsx | 4 ++-- src/lib/nostrUtils.ts | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/apps/notes/index.tsx b/src/apps/notes/index.tsx index 444dedb..bb521be 100644 --- a/src/apps/notes/index.tsx +++ b/src/apps/notes/index.tsx @@ -334,7 +334,6 @@ function ThreadNode({
0 ? true : undefined} className={cn( !isRootReply && diff --git a/src/components/nostr/NoteCard.tsx b/src/components/nostr/NoteCard.tsx index 4dcddc0..889fde3 100644 --- a/src/components/nostr/NoteCard.tsx +++ b/src/components/nostr/NoteCard.tsx @@ -74,8 +74,8 @@ export function NoteCard({ event, compact, onReply, replyOpen, className }: Note size="sm" className="h-7 gap-1.5 px-2 text-xs text-muted-foreground" onClick={() => onReply(event)} - aria-expanded={replyOpen} - aria-controls={replyOpen ? 'reply-composer' : undefined} + aria-expanded={!!replyOpen} + aria-controls="reply-composer" > Reply diff --git a/src/lib/nostrUtils.ts b/src/lib/nostrUtils.ts index eb3d192..d4e02ee 100644 --- a/src/lib/nostrUtils.ts +++ b/src/lib/nostrUtils.ts @@ -144,7 +144,7 @@ export interface ReplyNode { children: ReplyNode[]; /** True when the event landed here as a fallback, not via its NIP-10 tags. */ misplaced: boolean; - /** Depth of the cycle this event is part of, when its chain loops. */ + /** Whether this event's chain loops back on itself. */ cycle?: boolean; }