From 5d066868734f25755bac2ff9384524a818ae9ea5 Mon Sep 17 00:00:00 2001 From: Bruno Quaresma Date: Wed, 27 Aug 2025 12:08:33 +0000 Subject: [PATCH 1/2] fix: don't show prebuild workspaces as tasks --- site/src/api/api.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/site/src/api/api.ts b/site/src/api/api.ts index d95d644ef7678..5bac9509bc304 100644 --- a/site/src/api/api.ts +++ b/site/src/api/api.ts @@ -2704,12 +2704,14 @@ class ExperimentalApiMethods { const workspaces = await API.getWorkspaces({ q: queryExpressions.join(" "), - }); + }).then((res) => + res.workspaces.filter((workspace) => !workspace.is_prebuild), + ); const prompts = await API.experimental.getAITasksPrompts( - workspaces.workspaces.map((workspace) => workspace.latest_build.id), + workspaces.map((workspace) => workspace.latest_build.id), ); - return workspaces.workspaces.map((workspace) => ({ + return workspaces.map((workspace) => ({ workspace, prompt: prompts.prompts[workspace.latest_build.id], })); From fae3b54e062d113845e5bace1da2baa334a48c28 Mon Sep 17 00:00:00 2001 From: Bruno Quaresma Date: Thu, 28 Aug 2025 14:09:55 +0000 Subject: [PATCH 2/2] Apply Michaels suggestion --- site/src/api/api.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/site/src/api/api.ts b/site/src/api/api.ts index 5bac9509bc304..f1ccef1faf1e3 100644 --- a/site/src/api/api.ts +++ b/site/src/api/api.ts @@ -2702,10 +2702,12 @@ class ExperimentalApiMethods { queryExpressions.push(`owner:${filter.username}`); } - const workspaces = await API.getWorkspaces({ + const res = await API.getWorkspaces({ q: queryExpressions.join(" "), - }).then((res) => - res.workspaces.filter((workspace) => !workspace.is_prebuild), + }); + // Exclude prebuild workspaces as they are not user-facing. + const workspaces = res.workspaces.filter( + (workspace) => !workspace.is_prebuild, ); const prompts = await API.experimental.getAITasksPrompts( workspaces.map((workspace) => workspace.latest_build.id),