Skip to content

Commit f97bd76

Browse files
fix: handle task sidebar app health check disabled correctly (cherry-pick #18687) (#18726)
Co-authored-by: Hugo Dutka <hugo@coder.com>
1 parent 5059c23 commit f97bd76

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

site/src/pages/TaskPage/TaskPage.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export const TerminatedBuildWithStatus: Story = {
113113
},
114114
};
115115

116-
export const SidebarAppDisabled: Story = {
116+
export const SidebarAppHealthDisabled: Story = {
117117
beforeEach: () => {
118118
spyOn(data, "fetchTask").mockResolvedValue({
119119
prompt: "Create competitors page",

site/src/pages/TaskPage/TaskSidebar.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ const getSidebarApp = (task: Task): [WorkspaceApp | null, SidebarAppStatus] => {
5454
// indefinitely if there's a genuine issue, but this is preferable to false error alerts.
5555
return [null, "loading"];
5656
}
57+
// "disabled" means that the health check is disabled, so we assume
58+
// that the app is healthy
5759
if (sidebarApp.health === "disabled") {
58-
return [sidebarApp, "error"];
60+
return [sidebarApp, "healthy"];
5961
}
6062
if (sidebarApp.health === "healthy") {
6163
return [sidebarApp, "healthy"];

0 commit comments

Comments
 (0)