File tree Expand file tree Collapse file tree
src/features/dashboard/sandbox Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export default function SandboxDetailsHeader() {
2121
2222 const runningLabel = isInitialLoading || isRunning ? 'running for' : 'ran for'
2323 const timeoutLabel = isKilled
24- ? 'stopped at'
24+ ? 'killed at'
2525 : isPaused
2626 ? 'paused at'
2727 : 'timeout in'
Original file line number Diff line number Diff line change @@ -17,6 +17,15 @@ export default function Status() {
1717 )
1818 }
1919
20+ if ( state === 'killed' ) {
21+ return (
22+ < Badge variant = "error" className = "uppercase" >
23+ < DotIcon className = "size-3 fill-current" />
24+ Killed
25+ </ Badge >
26+ )
27+ }
28+
2029 return (
2130 < Badge variant = { isRunning ? 'positive' : 'error' } className = "uppercase" >
2231 < DotIcon
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ interface StoppedBannerProps {
1818}
1919
2020export function StoppedBanner ( { rootNodeCount } : StoppedBannerProps ) {
21- const { isRunning } = useSandboxContext ( )
21+ const { isRunning, sandboxInfo } = useSandboxContext ( )
2222 const lastUpdated = useLastUpdated ( )
2323 const watcherError = useWatcherError ( )
2424
@@ -29,6 +29,13 @@ export function StoppedBanner({ rootNodeCount }: StoppedBannerProps) {
2929
3030 const showWatcherError = watcherError && isRunning && rootNodeCount > 0
3131
32+ const stoppedLabel =
33+ sandboxInfo ?. state === 'paused'
34+ ? 'Sandbox Paused'
35+ : sandboxInfo ?. state === 'killed'
36+ ? 'Sandbox Killed'
37+ : 'Sandbox Stopped'
38+
3239 return (
3340 < AnimatePresence mode = "wait" >
3441 { show && (
@@ -48,7 +55,7 @@ export function StoppedBanner({ rootNodeCount }: StoppedBannerProps) {
4855 < span className = "prose-headline-small uppercase" >
4956 { showWatcherError
5057 ? 'Live filesystem updates disabled'
51- : 'Sandbox Stopped' }
58+ : stoppedLabel }
5259 </ span >
5360 </ CardTitle >
5461 < CardDescription >
You can’t perform that action at this time.
0 commit comments