From 905d1bc54c76b27023d39bea108f2e4ff94fb3e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sondre=20Engebr=C3=A5ten?= Date: Mon, 16 Feb 2026 15:14:33 +0100 Subject: [PATCH] chore: remove debug logging from task creation fix --- apps/frontend/src/renderer/components/GitHubIssues.tsx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/apps/frontend/src/renderer/components/GitHubIssues.tsx b/apps/frontend/src/renderer/components/GitHubIssues.tsx index 4adad737..56ef3031 100644 --- a/apps/frontend/src/renderer/components/GitHubIssues.tsx +++ b/apps/frontend/src/renderer/components/GitHubIssues.tsx @@ -503,17 +503,13 @@ export function GitHubIssues({ onOpenSettings, onNavigateToTask }: GitHubIssuesP const handleCreateTask = useCallback(async () => { if (!selectedProject?.id || !selectedIssue) return; - console.log('[GitHubIssues] Creating task for issue', selectedIssue.number); const result = await window.electronAPI.github.createTaskFromInvestigation( selectedProject.id, selectedIssue.number ); - console.log('[GitHubIssues] Task creation result:', result); if (result.success && result.data?.specId) { - console.log('[GitHubIssues] Loading tasks to ensure task list is up-to-date'); // Load tasks FIRST so the new task is in the list when we update the store // This prevents the tasks-changed effect from clearing the specId due to race condition await loadTasks(selectedProject.id); - console.log('[GitHubIssues] Tasks loaded, now calling setSpecId with', result.data.specId); // Update the investigation store with the specId so the UI knows a task was created investigationStore.setSpecId(selectedProject.id, selectedIssue.number, result.data.specId); } else if (!result.success) { @@ -565,10 +561,7 @@ export function GitHubIssues({ onOpenSettings, onNavigateToTask }: GitHubIssuesP // when setSpecId() updates the store, the component will re-render immediately const selectedIssueEntry = useInvestigationStore((state) => { if (!selectedProject?.id || !selectedIssue) return null; - const key = `${selectedProject.id}:${selectedIssue.number}`; - const entry = state.investigations[key] ?? null; - console.log('[GitHubIssues] Selector called for', key, 'specId:', entry?.specId); - return entry; + return state.investigations[`${selectedProject.id}:${selectedIssue.number}`] ?? null; }); // Derive the state machine value from the entry