groove-dev 0.26.17 → 0.26.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <link rel="icon" type="image/png" href="/favicon.png" />
7
7
  <title>Groove GUI</title>
8
- <script type="module" crossorigin src="/assets/index-GisjgmsR.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-aT3nOZj0.js"></script>
9
9
  <link rel="modulepreload" crossorigin href="/assets/vendor-C0HXlhrU.js">
10
10
  <link rel="modulepreload" crossorigin href="/assets/reactflow-BQPfi37R.js">
11
11
  <link rel="modulepreload" crossorigin href="/assets/codemirror-BBL3i_JW.js">
@@ -321,17 +321,21 @@ function AgentTreeInner() {
321
321
 
322
322
  useEffect(() => { setEdges(targetEdges); }, [targetEdges, setEdges]);
323
323
 
324
- // Only fitView when agents are added — not on metric/token/chat updates
324
+ // Only fitView when agents are added — debounced so team launches (multiple spawns)
325
+ // don't cause repeated zoom/pan jitter
325
326
  const agentIdStr = agents.map((a) => a.id).join(',');
327
+ const fitTimer = useRef(null);
326
328
  useEffect(() => {
327
329
  const currentIds = new Set(agents.map((a) => a.id));
328
330
  const isNewAgent = agents.length > 0 && [...currentIds].some((id) => !prevAgentIds.current.has(id));
329
331
  prevAgentIds.current = currentIds;
330
332
 
331
333
  if (prevCount === 0 && agents.length > 0) {
332
- setTimeout(() => fitView({ padding: 0.3, maxZoom: 1.2, duration: 0 }), 50);
334
+ fitView({ padding: 0.3, maxZoom: 1.2, duration: 0 });
333
335
  } else if (isNewAgent) {
334
- setTimeout(() => fitView({ padding: 0.3, maxZoom: 1.2, duration: 300 }), 100);
336
+ // Debounce: wait 500ms for batch spawns to settle before fitting
337
+ clearTimeout(fitTimer.current);
338
+ fitTimer.current = setTimeout(() => fitView({ padding: 0.3, maxZoom: 1.2, duration: 300 }), 500);
335
339
  }
336
340
  setPrevCount(agents.length);
337
341
  }, [agentIdStr, prevCount, fitView]); // eslint-disable-line react-hooks/exhaustive-deps