From 58ddf6858413bcbae841fdf2aab7379558fd8665 Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 10 Nov 2026 22:51:22 -0800 Subject: [PATCH] fix(cloud): cloud-workspaces IPC under max-lines after integration merge (combine not-configured/invalid guards) --- src/main/ipc/cloud-workspaces.ts | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/main/ipc/cloud-workspaces.ts b/src/main/ipc/cloud-workspaces.ts index da43814f0d0..1024b3da202 100644 --- a/src/main/ipc/cloud-workspaces.ts +++ b/src/main/ipc/cloud-workspaces.ts @@ -173,11 +173,8 @@ export function registerCloudWorkspacesHandlers( handle('cloudWorkspaces:list', async (args) => { const query = ListQuery.safeParse(args ?? {}) const s = await getService() - if (!s) { - return NOT_CONFIGURED - } - if (!query.success) { - return INVALID + if (!s || !query.success) { + return !s ? NOT_CONFIGURED : INVALID } const result = await s.list(query.data) // Each successful refresh also checks this device's pairings (throttled, in the background). @@ -250,11 +247,8 @@ export function registerCloudWorkspacesHandlers( handle('cloudWorkspaces:destroy', async (args) => { const parsed = z.object({ id: Id }).safeParse(args) const s = await getService() - if (!s) { - return NOT_CONFIGURED - } - if (!parsed.success) { - return INVALID + if (!s || !parsed.success) { + return !s ? NOT_CONFIGURED : INVALID } const result = await s.destroy(parsed.data.id) // Deleted from here: its pairing, server and projects go now, not at the next list.