graph: session deep links reliably jump to the source message
The mount-time jump never fired on real graph-link arrivals: the transcript scroller's ref is attached by a later sibling, and the queued rAF was cancelled outright whenever use-stick-to-bottom re-created its context while the initial scroll settled — every link landed at the bottom (owner report 2026-10-13). Rewrite the mount path as a synchronous 64ms retry watcher that keeps running past its first success (hydration/adoption can replace the jumped-to node), with a ~20s watchdog for cold-compile SSR streams (observed 6.8s). jump() now reads the stick-to-bottom context through a ref so effect identities stay stable, and the unmount cleanup no longer strips a live flash. Verified live on real data: full load, SPA link navigation, and in-session hashchange all land the anchor 16px from the scroller top with the 2s highlight. Also gives the node card's session/file rows matching horizontal and vertical padding (px-2 py-1.5).
This commit is contained in:
@@ -1658,7 +1658,7 @@ export function GraphView({
|
||||
return (
|
||||
<div key={sourceId} className="flex items-center gap-1.5">
|
||||
<FileTextIcon className="size-3.5 shrink-0 text-muted-foreground" />
|
||||
<span className="min-w-0 flex-1 truncate px-1 py-1 text-sm text-muted-foreground">
|
||||
<span className="min-w-0 flex-1 truncate px-2 py-1.5 text-sm text-muted-foreground">
|
||||
{snapshot.fileSources[sourceId]}
|
||||
</span>
|
||||
</div>
|
||||
@@ -1670,7 +1670,7 @@ export function GraphView({
|
||||
<Link
|
||||
href={propositionSessionHref(selected.node, sourceId)}
|
||||
scroll={false}
|
||||
className="min-w-0 flex-1 truncate rounded-md px-1 py-1 text-sm text-foreground transition-colors hover:bg-accent"
|
||||
className="min-w-0 flex-1 truncate rounded-md px-2 py-1.5 text-sm text-foreground transition-colors hover:bg-accent"
|
||||
>
|
||||
{snapshot?.sessions[sourceId] ?? sourceId}
|
||||
</Link>
|
||||
|
||||
Reference in New Issue
Block a user