- Graph context unavailable
+ Source sentences unavailable
)
}
@@ -83,81 +145,57 @@ export function MergeContextPanel({ review }: { review: Review }) {
return (
- Graph Context
+ Source Sentences
- {context === null ? (
+ {subjects === null ? (
{Array.from({ length: 2 }).map((_, i) => (
-
+
))}
) : (
- <>
-
- {context.subjects.map((subject) => (
-
-
-
- {subjectName(review, subject.refId)}
-
-
- {edgeCountsLine(subject)}
-
-
- {subject.mentions.length > 0 ? (
-
- {subject.mentions.map((mention) => (
- -
-
- {mention.nodeType ?? "?"}
-
- “{mention.excerpt}”
-
- ))}
-
- ) : (
-
- No source text found in the immediate neighborhood
-
- )}
-
- ))}
-
-
- {context.subjects.length > 1 && (
-
0
- ? "mt-1.5 text-[10px] text-emerald-400"
- : "mt-1.5 text-[10px] text-amber-400"
- }
- data-testid="merge-context-overlap"
+
+ {subjects.map((subject) => (
+
- {context.sharedCount > 0 ? (
- <>
- {context.sharedCount} shared connection
- {context.sharedCount === 1 ? "" : "s"}
- {context.sharedExamples.length > 0 && (
-
- {" "}
- — {context.sharedExamples.map((n) => n.name).join(", ")}
-
- )}
- >
+
+ {subject.name ?? subject.refId.slice(0, 8)}
+
+ {subject.mentions.length > 0 ? (
+
+ {subject.mentions.map((mention) => (
+ -
+
+ {mention.nodeType ?? "?"}
+
+ “”
+
+ ))}
+
) : (
- "No shared connections — the neighborhoods are disjoint"
+
+ No source text found
+
)}
-
- )}
- >
+
+ ))}
+
)}
)
diff --git a/src/components/admin/review-row.tsx b/src/components/admin/review-row.tsx
index d9d6a0d..eba5ac2 100644
--- a/src/components/admin/review-row.tsx
+++ b/src/components/admin/review-row.tsx
@@ -3,7 +3,7 @@
import { useEffect, useLayoutEffect, useMemo, useRef, useState } from "react"
import { createPortal } from "react-dom"
import { useRouter } from "next/navigation"
-import { ArrowRight, ArrowRightLeft, CheckCircle2, ChevronRight, GitMerge, Layers, Loader2, Network, Pencil, PlusCircle, PlusSquare, Share2, Trash2, Users, type LucideIcon } from "lucide-react"
+import { ArrowRight, ArrowRightLeft, Check, CheckCircle2, ChevronRight, Copy, GitMerge, Layers, Loader2, Network, Pencil, PlusCircle, PlusSquare, Share2, Trash2, Users, type LucideIcon } from "lucide-react"
import { formatDateRelative } from "@/lib/date-format"
import type {
PromotionSummary,
@@ -500,6 +500,31 @@ function ConfirmActionPopover({
// ── Subject list item (for expanded panel) ───────────────────────────────────
+function CopyRefButton({ refId }: { refId: string }) {
+ const [copied, setCopied] = useState(false)
+ return (
+