Show kind action header on threaded ancestor NoteCards

The KIND_HEADER_MAP action header (e.g. 'updated their badges',
'created a badge', 'shared a photo') was only rendered in the normal
NoteCard layout. Now it also appears in the threaded layout, so parent
events shown as ancestors in reply threads display their kind context.
This commit is contained in:
Alex Gleason
2026-03-29 14:56:55 -05:00
parent 87a8974c8c
commit 646c95a86f
+23
View File
@@ -1033,6 +1033,28 @@ export const NoteCard = memo(function NoteCard({
// ── Threaded layout (with or without connector line) ──
if (threaded || threadedLast) {
// Kind action header (e.g. "updated their badges") — same logic as normal layout
const threadedKindHeader = !repostedBy && KIND_HEADER_MAP[event.kind]
? (() => {
const cfg = KIND_HEADER_MAP[event.kind];
const isLive = event.kind === 30311 && getEffectiveStreamStatus(event) === "live";
return (
<EventActionHeader
pubkey={event.pubkey}
icon={cfg.icon}
iconClassName={
event.kind === 30311
? isLive ? "text-primary" : "text-muted-foreground"
: cfg.iconClassName
}
action={typeof cfg.action === "function" ? cfg.action(event.tags, event) : cfg.action}
noun={cfg.noun}
nounRoute={cfg.nounRoute}
/>
);
})()
: null;
return (
<article
className={cn(
@@ -1043,6 +1065,7 @@ export const NoteCard = memo(function NoteCard({
onClick={handleCardClick}
onAuxClick={handleAuxClick}
>
{threadedKindHeader}
{isFollowPack ? (
<div className={cn("min-w-0", threaded && "pb-3")}>
{contentBlock}