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

fix: handle health status when displaying task apps#18675

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
hugodutka merged 1 commit intomainfromhugodutka/task-app-status
Jun 30, 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
34 changes: 26 additions & 8 deletionssite/src/pages/TaskPage/TaskAppIframe.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,6 +6,7 @@ import {
DropdownMenuItem,
DropdownMenuTrigger,
} from "components/DropdownMenu/DropdownMenu";
import { Spinner } from "components/Spinner/Spinner";
import { EllipsisVertical, ExternalLinkIcon, HouseIcon } from "lucide-react";
import { useAppLink } from "modules/apps/useAppLink";
import type { Task } from "modules/tasks/tasks";
Expand DownExpand Up@@ -97,14 +98,31 @@ export const TaskAppIFrame: FC<TaskAppIFrameProps> = ({
</div>
)}

<iframe
ref={frameRef}
src={frameSrc}
title={link.label}
loading="eager"
className={"w-full h-full border-0"}
allow="clipboard-read; clipboard-write"
/>
{app.health === "healthy" ||
app.health === "disabled" ||
app.health === "unhealthy" ? (
<iframe
ref={frameRef}
src={frameSrc}
title={link.label}
loading="eager"
className={"w-full h-full border-0"}
allow="clipboard-read; clipboard-write"
/>
) : app.health === "initializing" ? (
<div className="w-full h-full flex items-center justify-center">
<Spinner loading />
</div>
) : (
<div className="w-full h-full flex flex-col items-center justify-center">
<h3 className="m-0 font-medium text-content-primary text-base">
Error
</h3>
<span className="text-content-secondary text-sm">
The app is in an unknown health state.
</span>
</div>
)}
</div>
);
};
8 changes: 8 additions & 0 deletionssite/src/pages/TaskPage/TaskApps.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,7 @@ import {
DropdownMenuTrigger,
} from "components/DropdownMenu/DropdownMenu";
import { ExternalImage } from "components/ExternalImage/ExternalImage";
import { InfoTooltip } from "components/InfoTooltip/InfoTooltip";
import { ChevronDownIcon, LayoutGridIcon } from "lucide-react";
import { useAppLink } from "modules/apps/useAppLink";
import type { Task } from "modules/tasks/tasks";
Expand DownExpand Up@@ -165,6 +166,13 @@ const TaskAppTab: FC<TaskAppTabProps> = ({ task, app, active, onClick }) => {
<RouterLink to={link.href} onClick={onClick}>
{app.icon ? <ExternalImage src={app.icon} /> : <LayoutGridIcon />}
{link.label}
{app.health === "unhealthy" && (
<InfoTooltip
title="This app is unhealthy."
message="The health check failed."
type="warning"
/>
)}
</RouterLink>
</Button>
);
Expand Down
27 changes: 27 additions & 0 deletionssite/src/pages/TaskPage/TaskPage.stories.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -176,6 +176,33 @@ export const SidebarAppHealthy: Story = {
},
};

const mainAppHealthStory = (health: WorkspaceApp["health"]) => ({
beforeEach: () => {
spyOn(data, "fetchTask").mockResolvedValue({
prompt: "Create competitors page",
workspace: {
...MockWorkspace,
latest_build: {
...MockWorkspace.latest_build,
resources: mockResources({
claudeCodeAppOverrides: {
health,
},
}),
},
},
});
},
});

export const MainAppHealthy: Story = mainAppHealthStory("healthy");
export const MainAppInitializing: Story = mainAppHealthStory("initializing");
export const MainAppUnhealthy: Story = mainAppHealthStory("unhealthy");
export const MainAppHealthDisabled: Story = mainAppHealthStory("disabled");
export const MainAppHealthUnknown: Story = mainAppHealthStory(
"unknown" as unknown as WorkspaceApp["health"],
);

export const BuildNoAITask: Story = {
beforeEach: () => {
spyOn(data, "fetchTask").mockImplementation(() => {
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp