From 6a9aa06e265942ecf7e425d089d0a7d8e1b46b53 Mon Sep 17 00:00:00 2001 From: Charles Vien Date: Mon, 13 Apr 2026 09:18:09 -0700 Subject: [PATCH 1/3] Exclude empty windows from command center count --- .../command-center/hooks/useCommandCenterData.ts | 2 +- .../features/sidebar/components/SidebarMenu.tsx | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/code/src/renderer/features/command-center/hooks/useCommandCenterData.ts b/apps/code/src/renderer/features/command-center/hooks/useCommandCenterData.ts index ff6838d6a..a89d79d51 100644 --- a/apps/code/src/renderer/features/command-center/hooks/useCommandCenterData.ts +++ b/apps/code/src/renderer/features/command-center/hooks/useCommandCenterData.ts @@ -87,7 +87,7 @@ export function useCommandCenterData(): { }, [storeCells, taskMap, sessionByTaskId]); const summary = useMemo(() => { - const populated = cells.filter((c) => c.taskId); + const populated = cells.filter((c) => c.taskId && c.task); return { total: populated.length, running: populated.filter((c) => c.status === "running").length, diff --git a/apps/code/src/renderer/features/sidebar/components/SidebarMenu.tsx b/apps/code/src/renderer/features/sidebar/components/SidebarMenu.tsx index 317adac64..b6214297d 100644 --- a/apps/code/src/renderer/features/sidebar/components/SidebarMenu.tsx +++ b/apps/code/src/renderer/features/sidebar/components/SidebarMenu.tsx @@ -63,9 +63,14 @@ function SidebarMenuComponent() { (r) => r.status === "ready", ).length; + const taskMap = new Map(); + for (const task of allTasks) { + taskMap.set(task.id, task); + } + const commandCenterCells = useCommandCenterStore((s) => s.cells); const commandCenterActiveCount = commandCenterCells.filter( - (taskId) => taskId != null, + (taskId) => taskId != null && taskMap.has(taskId), ).length; const previousTaskIdRef = useRef(null); @@ -88,11 +93,6 @@ function SidebarMenuComponent() { previousTaskIdRef.current = currentTaskId; }, [view, markAsViewed]); - const taskMap = new Map(); - for (const task of allTasks) { - taskMap.set(task.id, task); - } - const handleNewTaskClick = () => { navigateToTaskInput(); }; From 0b6ca0ab8ee9010a835c3aa18e14137dcf3a4c33 Mon Sep 17 00:00:00 2001 From: Charles Vien Date: Mon, 13 Apr 2026 09:18:12 -0700 Subject: [PATCH 2/3] Fix logout showing error boundary --- apps/code/src/renderer/features/auth/hooks/authMutations.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/code/src/renderer/features/auth/hooks/authMutations.ts b/apps/code/src/renderer/features/auth/hooks/authMutations.ts index c2d05f483..f9705b340 100644 --- a/apps/code/src/renderer/features/auth/hooks/authMutations.ts +++ b/apps/code/src/renderer/features/auth/hooks/authMutations.ts @@ -76,13 +76,13 @@ export function useLogoutMutation() { track(ANALYTICS_EVENTS.USER_LOGGED_OUT); resetSessionService(); - clearAuthScopedQueries(); const state = await trpcClient.auth.logout.mutate(); return { state, previousState }; }, onSuccess: async ({ previousState }) => { await refreshAuthStateQuery(); + clearAuthScopedQueries(); useAuthUiStateStore.getState().setStaleRegion(previousState.cloudRegion); useNavigationStore.getState().navigateToTaskInput(); useOnboardingStore.getState().resetSelections(); From 055be025f9c48f31425a3155c16b6b089f106e58 Mon Sep 17 00:00:00 2001 From: Charles Vien Date: Mon, 13 Apr 2026 09:39:55 -0700 Subject: [PATCH 3/3] Rename Array to PostHog Code in dev plist patch --- apps/code/scripts/patch-electron-name.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/code/scripts/patch-electron-name.sh b/apps/code/scripts/patch-electron-name.sh index e0523c82e..940dbad54 100755 --- a/apps/code/scripts/patch-electron-name.sh +++ b/apps/code/scripts/patch-electron-name.sh @@ -10,10 +10,10 @@ if [ ! -f "$PLIST_FILE" ]; then exit 0 fi -if /usr/libexec/PlistBuddy -c "Print :CFBundleName" "$PLIST_FILE" | grep -q "Array (Development)"; then +if /usr/libexec/PlistBuddy -c "Print :CFBundleName" "$PLIST_FILE" | grep -q "PostHog Code (Development)"; then exit 0 fi -/usr/libexec/PlistBuddy -c "Set :CFBundleName 'Array (Development)'" "$PLIST_FILE" -/usr/libexec/PlistBuddy -c "Set :CFBundleDisplayName 'Array (Development)'" "$PLIST_FILE" +/usr/libexec/PlistBuddy -c "Set :CFBundleName 'PostHog Code (Development)'" "$PLIST_FILE" +/usr/libexec/PlistBuddy -c "Set :CFBundleDisplayName 'PostHog Code (Development)'" "$PLIST_FILE" /usr/libexec/PlistBuddy -c "Set :CFBundleIdentifier 'com.posthog.array.dev'" "$PLIST_FILE"