use-entity-diff.ts — Compute field-level diffs between entity graph states.
Reuses core time-travel primitives:
recordGraphSnapshot / restoreGraphSnapshot from devtools-time-travel
useGraphStore for current live entity data
This hook does NOT write to the store during diff computation. It reads two
states (a "before" snapshot and the current live graph) and computes a
declarative FieldDiff[] — the rendering is left to EntityDiff / EntityApproval.
Hook→Store: reads via useGraphStore.getState() (not via React subscribe) so
diff snapshots are point-in-time and do not cause continuous re-renders.
use-entity-diff.ts — Compute field-level diffs between entity graph states.
Reuses core time-travel primitives:
This hook does NOT write to the store during diff computation. It reads two states (a "before" snapshot and the current live graph) and computes a declarative FieldDiff[] — the rendering is left to EntityDiff / EntityApproval.
Hook→Store: reads via useGraphStore.getState() (not via React subscribe) so diff snapshots are point-in-time and do not cause continuous re-renders.