supermemory/packages
abhay-codes07 714d273ba5
fix(memory-graph): stop hit-testing against stale nodes after the array regenerates
SpatialIndex.rebuild() early-returns on an unchanged content hash, and
the hash only covers node ids and rounded positions. useGraphData
produces a brand-new generation of node objects whenever its memo deps
change — including on container resize and light/dark theme switches —
with identical ids and coordinates. The GraphCanvas [nodes] effect then
called rebuild(), the hash matched, and the grid kept serving the
previous generation of objects while the renderer and nodeMap moved on.

The first drag after any resize or theme toggle therefore grabbed a
detached object: onMouseDown pinned fx/fy on a node the renderer no
longer draws, the visible node ignored the cursor, and the drag-start
reheat() let it drift freely. Hover and click were unaffected (they
only use node.id), which is what kept this hidden.

Give rebuild() a force parameter and pass it from the identity-keyed
effect, keeping the cheap hash guard for the per-frame rebuilds in the
rAF loop. Covered with SpatialIndex tests that pin both behaviours:
the unforced hash guard keeps the old generation (documenting why force
exists), and a forced rebuild swaps the grid to the new objects and
refreshes the hash.

Also remove the colors re-merge in MemoryGraph: useGraphTheme already
returns the overrides merged and referentially stable by value, and
re-merging keyed on the raw prop identity made `colors` a fresh object
every render for inline `colors={{...}}` consumers — rebuilding the
entire node array each render and multiplying how often the stale-index
window occurred.
2026-07-13 14:58:32 +05:30
..
agent-framework-python docs: quote pip extras install examples (#1039) 2026-06-16 23:30:41 -07:00
ai-sdk fix: username issue and bun lock issue (#818) 2026-03-31 21:41:25 +00:00
cartesia-sdk-python fix(cartesia-sdk): treat empty profile as no memories, not a retrieval error (#1164) 2026-07-10 19:14:49 -07:00
docs-test custom id implementation (#877) 2026-04-24 23:43:16 +00:00
hooks chore(nova): ux improvments (#820) 2026-04-02 18:20:34 +00:00
lib perf(lib): hoist customAlphabet factory in generateId (#1204) 2026-07-10 19:15:21 -07:00
memory-graph fix(memory-graph): stop hit-testing against stale nodes after the array regenerates 2026-07-13 14:58:32 +05:30
openai-sdk-python fix(openai-sdk): use AsyncSupermemory and correct client API calls (#1063) 2026-06-17 09:05:11 -07:00
pipecat-sdk-python fix(pipecat-sdk): handle null profile object safely (#1041) 2026-06-05 17:26:28 +05:30
tools fix(tools): coerce limit/offset in ai-sdk schemas (#1202) 2026-07-10 19:42:15 -07:00
ui Fix settings organization flows (#1159) 2026-06-27 14:27:36 +00:00
validation fix(tools,validation): persist tool-call turns in conversation memory & tidy search thresholds (#1211) 2026-07-10 18:54:56 -07:00