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.
This commit is contained in:
Hugo Dutka
2025-07-01 12:01:17 +02:00
committed by GitHub
parent 7e372f7a35
commit 3d22e27f4e
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -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",
+3 -1
View File
@@ -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"];