Skip to content

Commit d56cc9f

Browse files
committed
style: make paused inspect message more compact with secondary detail line
1 parent b1fb2d6 commit d56cc9f

1 file changed

Lines changed: 17 additions & 9 deletions

File tree

src/features/dashboard/sandbox/inspect/not-found.tsx

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,23 @@ export default function SandboxInspectNotFound({
7878
const isPaused = sandboxInfo?.state === 'paused'
7979
const resourceName = isFilesystem ? 'filesystem' : 'terminal'
8080
const description =
81-
isRunning && isFilesystem
82-
? 'This directory appears to be empty or does not exist. You can reset to the default state, navigate to root, or refresh to try again.'
83-
: isRunning
84-
? 'The terminal is unavailable right now. Refresh to try again.'
85-
: resumeError
86-
? resumeError
87-
: isPaused
88-
? `Resume this sandbox to access the ${resourceName}. It will run for ${RESUME_TIMEOUT_SECONDS} seconds, after which it will stop again unless its timeout is extended. You can pause it again in the meantime.`
89-
: `It seems like the sandbox is not connected anymore. We cannot access the ${resourceName} at this time.`
81+
isRunning && isFilesystem ? (
82+
'This directory appears to be empty or does not exist. You can reset to the default state, navigate to root, or refresh to try again.'
83+
) : isRunning ? (
84+
'The terminal is unavailable right now. Refresh to try again.'
85+
) : resumeError ? (
86+
resumeError
87+
) : isPaused ? (
88+
<>
89+
Resume this sandbox to access the {resourceName}.
90+
<span className="mt-1 block text-fg-tertiary">
91+
Runs for {RESUME_TIMEOUT_SECONDS}s, then stops unless the timeout is
92+
extended. You can pause it again anytime.
93+
</span>
94+
</>
95+
) : (
96+
`It seems like the sandbox is not connected anymore. We cannot access the ${resourceName} at this time.`
97+
)
9098

9199
const actions =
92100
isRunning && isFilesystem ? (

0 commit comments

Comments
 (0)