groove-dev 0.26.16 → 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-7eQvV_N9.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">
@@ -259,9 +259,11 @@ export const useGrooveStore = create((set, get) => ({
259
259
  set((s) => {
260
260
  const chatHistory = { ...s.chatHistory };
261
261
  const tokenTimeline = { ...s.tokenTimeline };
262
+ const activityLog = { ...s.activityLog };
262
263
  if (chatHistory[msg.oldAgentId]?.length) chatHistory[msg.newAgentId] = [...chatHistory[msg.oldAgentId]];
263
264
  if (tokenTimeline[msg.oldAgentId]?.length) tokenTimeline[msg.newAgentId] = [...tokenTimeline[msg.oldAgentId]];
264
- return { chatHistory, tokenTimeline, detailPanel: { type: 'agent', agentId: msg.newAgentId } };
265
+ if (activityLog[msg.oldAgentId]?.length) activityLog[msg.newAgentId] = [...activityLog[msg.oldAgentId]];
266
+ return { chatHistory, tokenTimeline, activityLog, detailPanel: { type: 'agent', agentId: msg.newAgentId } };
265
267
  });
266
268
  }
267
269
  break;
@@ -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