Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

refactor: show unhealthy status on workspace status indicator#17956

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
BrunoQuaresma merged 2 commits intomainfrombq/unhealthy-status
May 21, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -27,6 +27,18 @@ export const Running: Story = {
},
};

export const Unhealthy: Story = {
args: {
workspace: {
...createWorkspaceWithStatus("running"),
health: {
healthy: false,
failing_agents: [],
},
},
},
};

export const Stopped: Story = {
args: {
workspace: createWorkspaceWithStatus("stopped"),
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,6 +4,12 @@ import {
StatusIndicatorDot,
type StatusIndicatorProps,
} from "components/StatusIndicator/StatusIndicator";
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from "components/Tooltip/Tooltip";
import type { FC } from "react";
import type React from "react";
import {
Expand DownExpand Up@@ -32,18 +38,41 @@ export const WorkspaceStatusIndicator: FC<WorkspaceStatusIndicatorProps> = ({
workspace,
children,
}) => {
const { text, type } = getDisplayWorkspaceStatus(
let { text, type } = getDisplayWorkspaceStatus(
workspace.latest_build.status,
workspace.latest_build.job,
);

return (
if (!workspace.health.healthy) {
type = "warning";
}

const statusIndicator = (
<StatusIndicator variant={variantByStatusType[type]}>
<StatusIndicatorDot />
<span>
<span className="sr-only">Workspace status:</span> {text}
</span>
<span className="sr-only">Workspace status:</span> {text}
{children}
</StatusIndicator>
);

if (workspace.health.healthy) {
return statusIndicator;
}

return (
<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>
<StatusIndicator variant={variantByStatusType[type]}>
<StatusIndicatorDot />
<span className="sr-only">Workspace status:</span> {text}
{children}
</StatusIndicator>
</TooltipTrigger>
<TooltipContent>
Your workspace is running but some agents are unhealthy.
</TooltipContent>
</Tooltip>
</TooltipProvider>
);
};
10 changes: 1 addition & 9 deletionssite/src/pages/WorkspacesPage/WorkspacesTable.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,7 +21,6 @@ import { Button } from "components/Button/Button";
import { ExternalImage } from "components/ExternalImage/ExternalImage";
import { VSCodeIcon } from "components/Icons/VSCodeIcon";
import { VSCodeInsidersIcon } from "components/Icons/VSCodeInsidersIcon";
import { InfoTooltip } from "components/InfoTooltip/InfoTooltip";
import { Spinner } from "components/Spinner/Spinner";
import { Stack } from "components/Stack/Stack";
import {
Expand DownExpand Up@@ -290,6 +289,7 @@ export const WorkspacesTable: FC<WorkspacesTableProps> = ({
</TableCell>

<WorkspaceStatusCell workspace={workspace} />

<WorkspaceActionsCell
workspace={workspace}
onActionSuccess={onActionSuccess}
Expand DownExpand Up@@ -395,14 +395,6 @@ const WorkspaceStatusCell: FC<WorkspaceStatusCellProps> = ({ workspace }) => {
<TableCell>
<div className="flex flex-col">
<WorkspaceStatusIndicator workspace={workspace}>
{workspace.latest_build.status === "running" &&
!workspace.health.healthy && (
<InfoTooltip
type="warning"
title="Workspace is unhealthy"
message="Your workspace is running but some agents are unhealthy."
/>
)}
{workspace.dormant_at && (
<WorkspaceDormantBadge workspace={workspace} />
)}
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp