From 144f45a06ca8dc402ab0097ccddc79e6979ab202 Mon Sep 17 00:00:00 2001 From: Arjun <6592213+arkml@users.noreply.github.com> Date: Tue, 7 Apr 2026 12:33:43 +0530 Subject: [PATCH] fix build error --- .../settings/connected-accounts-settings.tsx | 1 + apps/x/apps/renderer/src/hooks/useAnalyticsIdentity.ts | 10 +++++----- apps/x/packages/shared/src/ipc.ts | 2 ++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/x/apps/renderer/src/components/settings/connected-accounts-settings.tsx b/apps/x/apps/renderer/src/components/settings/connected-accounts-settings.tsx index 74f0ad6c..cdacdc39 100644 --- a/apps/x/apps/renderer/src/components/settings/connected-accounts-settings.tsx +++ b/apps/x/apps/renderer/src/components/settings/connected-accounts-settings.tsx @@ -3,6 +3,7 @@ import * as React from "react" import { Loader2, Mic, Mail, Calendar } from "lucide-react" import { Button } from "@/components/ui/button" +import { Separator } from "@/components/ui/separator" import { GoogleClientIdModal } from "@/components/google-client-id-modal" import { ComposioApiKeyModal } from "@/components/composio-api-key-modal" import { useConnectors } from "@/hooks/useConnectors" diff --git a/apps/x/apps/renderer/src/hooks/useAnalyticsIdentity.ts b/apps/x/apps/renderer/src/hooks/useAnalyticsIdentity.ts index 47975fa5..20fd6281 100644 --- a/apps/x/apps/renderer/src/hooks/useAnalyticsIdentity.ts +++ b/apps/x/apps/renderer/src/hooks/useAnalyticsIdentity.ts @@ -30,14 +30,14 @@ export function useAnalyticsIdentity() { // Count notes for total_notes property try { - const dirs = await window.ipc.invoke('workspace:readdir', { path: '/' }) + const entries = await window.ipc.invoke('workspace:readdir', { path: '/' }) let totalNotes = 0 - if (dirs?.entries) { - for (const entry of dirs.entries) { - if (entry.type === 'directory') { + if (entries) { + for (const entry of entries) { + if (entry.kind === 'dir') { try { const sub = await window.ipc.invoke('workspace:readdir', { path: `/${entry.name}` }) - totalNotes += sub?.entries?.length ?? 0 + totalNotes += sub?.length ?? 0 } catch { // skip inaccessible dirs } diff --git a/apps/x/packages/shared/src/ipc.ts b/apps/x/packages/shared/src/ipc.ts index 7e32a4fc..daf49b95 100644 --- a/apps/x/packages/shared/src/ipc.ts +++ b/apps/x/packages/shared/src/ipc.ts @@ -251,6 +251,7 @@ const ipcSchemas = { config: z.record(z.string(), z.object({ connected: z.boolean(), error: z.string().nullable().optional(), + userId: z.string().optional(), })), }), }, @@ -267,6 +268,7 @@ const ipcSchemas = { provider: z.string(), success: z.boolean(), error: z.string().optional(), + userId: z.string().optional(), }), res: z.null(), },