Skip to content

Commit a0291df

Browse files
committed
Fix stories and add prefix devcontainer
1 parent beae4de commit a0291df

File tree

2 files changed

+10
-15
lines changed

2 files changed

+10
-15
lines changed

site/src/modules/resources/AgentDevcontainerCard.tsx

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ import {
1212
HelpTooltipTitle,
1313
HelpTooltipTrigger,
1414
} from "components/HelpTooltip/HelpTooltip";
15+
import { Spinner } from "components/Spinner/Spinner";
1516
import {
1617
Tooltip,
1718
TooltipContent,
1819
TooltipProvider,
1920
TooltipTrigger,
2021
} from "components/Tooltip/Tooltip";
21-
import { ExternalLinkIcon, Loader2Icon } from "lucide-react";
22+
import { ExternalLinkIcon } from "lucide-react";
2223
import type { FC } from "react";
2324
import { useEffect, useState } from "react";
2425
import { portForwardURL } from "utils/portForward";
@@ -95,7 +96,8 @@ export const AgentDevcontainerCard: FC<AgentDevcontainerCardProps> = ({
9596
<header className="flex justify-between items-center mb-4">
9697
<div className="flex items-center gap-2">
9798
<h3 className="m-0 text-xs font-medium text-content-secondary">
98-
{container.name}
99+
dev container:{" "}
100+
<span className="font-semibold">{container.name}</span>
99101
</h3>
100102
{container.devcontainer_dirty && (
101103
<HelpTooltip>
@@ -117,18 +119,11 @@ export const AgentDevcontainerCard: FC<AgentDevcontainerCardProps> = ({
117119
<Button
118120
variant="outline"
119121
size="sm"
120-
className="text-xs font-medium"
121122
onClick={handleRecreateDevcontainer}
122123
disabled={isRecreating}
123124
>
124-
{isRecreating ? (
125-
<>
126-
<Loader2Icon className="mr-2 h-4 w-4 animate-spin" />
127-
Recreating...
128-
</>
129-
) : (
130-
"Recreate"
131-
)}
125+
<Spinner loading={isRecreating} />
126+
Recreate
132127
</Button>
133128

134129
<AgentDevcontainerSSHButton

site/src/modules/resources/AgentRow.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,10 @@ export const AgentRow: FC<AgentRowProps> = ({
163163
// This is used to show the parent apps of the devcontainer.
164164
const [showParentApps, setShowParentApps] = useState(false);
165165

166-
const shouldDisplayAppsSection =
167-
agent.status === "connected" &&
168-
containers &&
169-
(containers.length > 0 ? showParentApps : true);
166+
let shouldDisplayAppsSection = shouldDisplayAgentApps;
167+
if (containers && containers.length > 0 && !showParentApps) {
168+
shouldDisplayAppsSection = false;
169+
}
170170

171171
return (
172172
<Stack

0 commit comments

Comments
 (0)