[P1 correctness] Performance branch can restore stale positions after node drag #130
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-review
quasar
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/quasar-ui#130
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Finding
PR #124 correctly moves high-frequency drag writes out of React rendering, but the graph projection still reads positions from stale React state.
persistGraphPosition()updatesworkspaceRef.currentwith{ render: false }, soworkspaceis intentionally not refreshed:GraphPagetracks the new position inpositionsRef, but never uses that ref when rebuilding the graph:After a node is dragged, an unrelated document change, import, actor result, replication update, or review-filter change can rebuild
graphusing the oldworkspace.positions. The reconciler then sees an incoming position difference and moves the live Cytoscape node back to the stale position.Impact
Required fix
Keep the latest active-graph positions in the non-React store, and ensure document-data reconciliation does not treat stale projection coordinates as authoritative for existing nodes.
Projection source
The drag callback continues updating the same ref before persistence:
Reconciler guard
Only apply incoming positions to existing nodes when switching/restoring a graph, not when document content changes:
New nodes may still receive saved positions when added.
Acceptance criteria