Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: cap graph simulation iterations to prevent UI slowdowns

Adam Eivy193bbf8837ff
diff --git a/client/src/lib/graphSimulation.js b/client/src/lib/graphSimulation.js
index de9daac20d..4e80f03f19 100644
--- a/client/src/lib/graphSimulation.js
+++ b/client/src/lib/graphSimulation.js
@@ -40,11 +40,15 @@ function tickSim(nodes, edges, alpha) {
}
}
+const MAX_ITERATIONS = 300;
+
function settleSimulation(nodes, edges) {
let alpha = 1;
- while (alpha > ALPHA_MIN) {
+ let iter = 0;
+ while (alpha > ALPHA_MIN && iter < MAX_ITERATIONS) {
tickSim(nodes, edges, alpha);
alpha *= ALPHA_DECAY;
+ iter++;
}
}