Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion src/features/dashboard/sandbox/header/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function SandboxDetailsHeader() {

const runningLabel = isInitialLoading || isRunning ? 'running for' : 'ran for'
const timeoutLabel = isKilled
? 'stopped at'
? 'killed at'
: isPaused
? 'paused at'
: 'timeout in'
Expand Down
9 changes: 9 additions & 0 deletions src/features/dashboard/sandbox/header/status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ export default function Status() {
)
}

if (state === 'killed') {
return (
<Badge variant="error" className="uppercase">
<DotIcon className="size-3 fill-current" />
Killed
</Badge>
)
}

return (
<Badge variant={isRunning ? 'positive' : 'error'} className="uppercase">
<DotIcon
Expand Down
11 changes: 9 additions & 2 deletions src/features/dashboard/sandbox/inspect/stopped-banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ interface StoppedBannerProps {
}

export function StoppedBanner({ rootNodeCount }: StoppedBannerProps) {
const { isRunning } = useSandboxContext()
const { isRunning, sandboxInfo } = useSandboxContext()
const lastUpdated = useLastUpdated()
const watcherError = useWatcherError()

Expand All @@ -29,6 +29,13 @@ export function StoppedBanner({ rootNodeCount }: StoppedBannerProps) {

const showWatcherError = watcherError && isRunning && rootNodeCount > 0

const stoppedLabel =
sandboxInfo?.state === 'paused'
? 'Sandbox Paused'
: sandboxInfo?.state === 'killed'
? 'Sandbox Killed'
: 'Sandbox Stopped'

return (
<AnimatePresence mode="wait">
{show && (
Expand All @@ -48,7 +55,7 @@ export function StoppedBanner({ rootNodeCount }: StoppedBannerProps) {
<span className="prose-headline-small uppercase">
{showWatcherError
? 'Live filesystem updates disabled'
: 'Sandbox Stopped'}
: stoppedLabel}
</span>
</CardTitle>
<CardDescription>
Expand Down
Loading