From 71cb1b2e50041c77c776803296aa60ce2cc60500 Mon Sep 17 00:00:00 2001 From: Maddie Date: Tue, 10 Mar 2026 17:31:07 -0700 Subject: [PATCH] fix: load button location, preparing label, debug logs/panels --- .../components/ui-header/settings-bar.tsx | 25 +++++++++++-------- .../ui-react-flow/react-flow-view.tsx | 25 +------------------ 2 files changed, 16 insertions(+), 34 deletions(-) diff --git a/frontend/components/ui-header/settings-bar.tsx b/frontend/components/ui-header/settings-bar.tsx index 5849912..85e8ce7 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); @@ -153,6 +154,7 @@ export default function SettingsBar() { } setIsFetchingSessions(true); + setFetchingFor('save'); try { const fetchedSessions = await getSessions(); setSessions(fetchedSessions); @@ -165,6 +167,7 @@ export default function SettingsBar() { }); } finally { setIsFetchingSessions(false); + setFetchingFor(null); } }; @@ -174,6 +177,7 @@ export default function SettingsBar() { } setIsFetchingSessions(true); + setFetchingFor('load'); try { const fetchedSessions = await getSessions(); setSessions(fetchedSessions); @@ -186,6 +190,7 @@ export default function SettingsBar() { }); } finally { setIsFetchingSessions(false); + setFetchingFor(null); } }; @@ -296,25 +301,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}`}
- ))} -
-
-
-