Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/code/scripts/patch-electron-name.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,14 @@ function SidebarMenuComponent() {
(r) => r.status === "ready",
).length;

const taskMap = new Map<string, Task>();
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<string | null>(null);
Expand All @@ -88,11 +93,6 @@ function SidebarMenuComponent() {
previousTaskIdRef.current = currentTaskId;
}, [view, markAsViewed]);

const taskMap = new Map<string, Task>();
for (const task of allTasks) {
taskMap.set(task.id, task);
}

const handleNewTaskClick = () => {
navigateToTaskInput();
};
Expand Down
Loading