From 8146404c309255ac7a8b7804ea3136732747338b Mon Sep 17 00:00:00 2001 From: Hugo Dutka Date: Wed, 2 Jul 2025 17:47:40 +0000 Subject: [PATCH] fix: handle task sidebar app health check disabled correctly (#18687) Previously, by mistake, the task sidebar would not display workspace apps that don't have a health check configured. --- site/src/pages/TaskPage/TaskPage.stories.tsx | 2 +- site/src/pages/TaskPage/TaskSidebar.tsx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/site/src/pages/TaskPage/TaskPage.stories.tsx b/site/src/pages/TaskPage/TaskPage.stories.tsx index b025c9994f3d0..0799f4625c95f 100644 --- a/site/src/pages/TaskPage/TaskPage.stories.tsx +++ b/site/src/pages/TaskPage/TaskPage.stories.tsx @@ -113,7 +113,7 @@ export const TerminatedBuildWithStatus: Story = { }, }; -export const SidebarAppDisabled: Story = { +export const SidebarAppHealthDisabled: Story = { beforeEach: () => { spyOn(data, "fetchTask").mockResolvedValue({ prompt: "Create competitors page", diff --git a/site/src/pages/TaskPage/TaskSidebar.tsx b/site/src/pages/TaskPage/TaskSidebar.tsx index e90261eb7960d..ca691bea08788 100644 --- a/site/src/pages/TaskPage/TaskSidebar.tsx +++ b/site/src/pages/TaskPage/TaskSidebar.tsx @@ -54,8 +54,10 @@ const getSidebarApp = (task: Task): [WorkspaceApp | null, SidebarAppStatus] => { // indefinitely if there's a genuine issue, but this is preferable to false error alerts. return [null, "loading"]; } + // "disabled" means that the health check is disabled, so we assume + // that the app is healthy if (sidebarApp.health === "disabled") { - return [sidebarApp, "error"]; + return [sidebarApp, "healthy"]; } if (sidebarApp.health === "healthy") { return [sidebarApp, "healthy"]; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy