Labels: disable sigma's label-grid declutter — the zoom gate is the only culling

Some labels (clustered nodes: Flux, The signifier rules the subject,
The body as window onto the thing-in-itself) appeared later in zoom than
others, without fade. Root cause: sigma's label grid — viewport cells
of labelGridCellSize (100px default) compete, only ceil(labelDensity /
ratio^2) winners per cell draw (one at fit with default density 1) —
so clustered nodes' labels were culled until zoom changed the quota,
then popped in with the global fade already complete.

labelDensity: MAX_SAFE_INTEGER turns the quota off. The camera-ratio
gate (LABELS_CAMERA_RATIO + LABELS_FADE_SPAN) is now the ONLY label
culling: every label appears at the same zoom with the same fade —
the wave-1 'all labels at once' intent, finally true.

Verified pixel-level at fit view: all 31 node labels render, including
the three previously-missing ones; no console errors.
This commit is contained in:
amosblomqvist
2026-09-09 02:06:26 +03:00
parent 0c12d53fca
commit 5f0a1ca30b
+10 -2
View File
@@ -464,8 +464,13 @@ export function GraphView() {
nodeProgramClasses: { circle: PaddedNodeCircleProgram }, nodeProgramClasses: { circle: PaddedNodeCircleProgram },
defaultEdgeType: "arrow", defaultEdgeType: "arrow",
// All labels appear/disappear together: no per-node size gating // All labels appear/disappear together: no per-node size gating
// (threshold 0) — a single camera-ratio switch toggles them below. // (threshold 0) and NO sigma label-grid declutter (density →
// ∞) — clustered nodes otherwise lose their cells' label
// quota and pop in late, un-faded, mid-zoom. The camera-ratio
// gate below is the ONLY label culling: every label appears at
// the same zoom with the same fade.
labelRenderedSizeThreshold: 0, labelRenderedSizeThreshold: 0,
labelDensity: Number.MAX_SAFE_INTEGER,
// Match the app typography (Geist via the body's stack). // Match the app typography (Geist via the body's stack).
labelFont: getComputedStyle(document.body).fontFamily, labelFont: getComputedStyle(document.body).fontFamily,
labelWeight: "500", labelWeight: "500",
@@ -680,8 +685,11 @@ export function GraphView() {
> >
{snapshot?.sessions[chatId] ?? chatId} {snapshot?.sessions[chatId] ?? chatId}
</Link> </Link>
{/* The note is a fixed-scale word (solid/shaky/...) — the
session name is the main thing; the chip is bounded so
it can never push or overflow the row. */}
{note && ( {note && (
<span className="shrink-0 rounded-full border px-2 py-0.5 text-[10px] text-muted-foreground"> <span className="max-w-28 shrink-0 truncate whitespace-nowrap rounded-full border px-2 py-0.5 text-[10px] text-muted-foreground">
{note} {note}
</span> </span>
)} )}