diff --git a/src/components/layout/node-preview-panel.tsx b/src/components/layout/node-preview-panel.tsx index f6b7c7f..66fcbdb 100644 --- a/src/components/layout/node-preview-panel.tsx +++ b/src/components/layout/node-preview-panel.tsx @@ -612,6 +612,7 @@ export function NodePreviewPanel({ node, onBack, schemas }: NodePreviewPanelProp const [probeNonce, setProbeNonce] = useState(0) const [copied, setCopied] = useState(false) const copyTimerRef = useRef | null>(null) + const scrollContentRef = useRef(null) const [watched, setWatched] = useState(false) const [watchLoading, setWatchLoading] = useState(false) @@ -624,6 +625,7 @@ export function NodePreviewPanel({ node, onBack, schemas }: NodePreviewPanelProp function handleNavigate(peer: GraphNode) { setHistory((prev) => [...prev, currentNode]) setCurrentNode(peer) + scrollContentRef.current?.parentElement?.scrollTo({ top: 0 }) } function handleBack() { @@ -845,7 +847,7 @@ export function NodePreviewPanel({ node, onBack, schemas }: NodePreviewPanelProp probe() return () => controller.abort() - }, [node.ref_id, refreshBalance, nodeIsBlocked, probeNonce]) + }, [currentNode.ref_id, refreshBalance, nodeIsBlocked, probeNonce]) const fp = fullNode?.properties @@ -990,7 +992,7 @@ export function NodePreviewPanel({ node, onBack, schemas }: NodePreviewPanelProp -
+
{/* Thumbnail — only rendered when a real image exists */} {showThumbnail && (