diff --git a/frontend/components/ui-header/settings-bar.tsx b/frontend/components/ui-header/settings-bar.tsx index 52ca1fd..ca8ac76 100644 --- a/frontend/components/ui-header/settings-bar.tsx +++ b/frontend/components/ui-header/settings-bar.tsx @@ -46,6 +46,7 @@ export default function SettingsBar() { ); const [sessions, setSessions] = useState([]); const [isFetchingSessions, setIsFetchingSessions] = useState(false); + const [fetchingFor, setFetchingFor] = useState<'save' | 'load' | null>(null); const [isSaving, setIsSaving] = useState(false); const [isLoading, setIsLoading] = useState(false); @@ -183,6 +184,7 @@ export default function SettingsBar() { } setIsFetchingSessions(true); + setFetchingFor('save'); try { const fetchedSessions = await getSessions(); setSessions(fetchedSessions); @@ -195,6 +197,7 @@ export default function SettingsBar() { }); } finally { setIsFetchingSessions(false); + setFetchingFor(null); } }; @@ -204,6 +207,7 @@ export default function SettingsBar() { } setIsFetchingSessions(true); + setFetchingFor('load'); try { const fetchedSessions = await getSessions(); setSessions(fetchedSessions); @@ -216,6 +220,7 @@ export default function SettingsBar() { }); } finally { setIsFetchingSessions(false); + setFetchingFor(null); } }; @@ -326,25 +331,25 @@ export default function SettingsBar() { diff --git a/frontend/components/ui-react-flow/react-flow-view.tsx b/frontend/components/ui-react-flow/react-flow-view.tsx index b87415a..4d0b8fc 100644 --- a/frontend/components/ui-react-flow/react-flow-view.tsx +++ b/frontend/components/ui-react-flow/react-flow-view.tsx @@ -184,7 +184,6 @@ const ReactFlowInterface = () => { event.preventDefault(); const nodeType = event.dataTransfer.getData('application/reactflow'); - console.log('🎯 Dropped nodeType:', nodeType); if (!nodeType) { return; @@ -202,16 +201,7 @@ const ReactFlowInterface = () => { data: { label: `${nodeType}` }, }; - console.log('🆕 Creating new node:', newNode); - - setNodes((nds) => { - const updatedNodes = [...nds, newNode]; - console.log( - '📋 Updated nodes list:', - updatedNodes.map((n) => ({ id: n.id, type: n.type })) - ); - return updatedNodes; - }); + setNodes((nds) => [...nds, newNode]); }; const isValidConnection = useCallback( @@ -307,19 +297,6 @@ const ReactFlowInterface = () => { - {/* Debug Panel */} - -
-
Nodes: {nodes.length}
-
Edges: {edges.length}
-
- {edges.map((e) => ( -
{`${e.source} → ${e.target}`}
- ))} -
-
-
-