diff --git a/src/apps/notes/index.tsx b/src/apps/notes/index.tsx
index fe1ddd8..444dedb 100644
--- a/src/apps/notes/index.tsx
+++ b/src/apps/notes/index.tsx
@@ -218,12 +218,29 @@ export default function NotesApp({ params, setTitle, setParams }: AppProps) {
conflict.
{orphaned.map((node) => (
-
+
+
+ {node.event.id === replyTarget?.id && composer}
+ {node.children.length > 0 && (
+ // The orphan's own replies resolved against it fine, so they
+ // stay nested beneath it even though it sits apart.
+
+ {node.children.map((child) => (
+
+ ))}
+
+ )}
+
))}
)}
@@ -259,6 +276,44 @@ function AuthorName({ pubkey }: { pubkey: string }) {
return {displayName(pubkey, author.data?.metadata)};
}
+/** A well-placed sub-branch beneath an orphaned note (no tree roles — the orphan sits outside the tree). */
+function OrphanBranch({
+ node,
+ onReply,
+ composer,
+ replyTargetId,
+}: {
+ node: ReplyNode;
+ onReply?: (event: NostrEvent) => void;
+ composer?: React.ReactNode;
+ replyTargetId?: string;
+}) {
+ return (
+
+ {node.parentPubkey && (
+
+ Replying to
+
+ )}
+
+ {node.event.id === replyTargetId && composer}
+ {node.children.length > 0 && (
+
+ {node.children.map((child) => (
+
+ ))}
+
+ )}
+
+ );
+}
+
/** One reply and its children, nested with a thread line. */
function ThreadNode({
node,