Skip to content

Useeffect sigma logic#69

Draft
cdxker wants to merge 1 commit intospotify-integrationfrom
cursor/useeffect-sigma-logic-36e0
Draft

Useeffect sigma logic#69
cdxker wants to merge 1 commit intospotify-integrationfrom
cursor/useeffect-sigma-logic-36e0

Conversation

@cdxker
Copy link
Owner

@cdxker cdxker commented Mar 8, 2026

Reorder loadGraph and sigma.refresh calls and add sigma to the useEffect dependency array.

The previous order caused sigma.refresh() to run with the old graph state, leading to a wasted refresh and potential visual flash. Additionally, sigma was missing from the dependency array, preventing the effect from re-running if the sigma instance changed.


Open in Web Open in Cursor 

Staged files:\n- graph-frontend/src/components/Graph.tsx\n\nMove loadGraph(graph) before sigma.refresh() to avoid refreshing stale graph state, and include sigma in the useEffect dependency array so the effect re-runs if the Sigma instance changes.

Co-authored-by: cdxker <cdxker@users.noreply.github.com>
@cursor
Copy link

cursor bot commented Mar 8, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@cdxker cdxker force-pushed the spotify-integration branch from 4961241 to 8d78f98 Compare March 8, 2026 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants