fix(web): /machine terminal visible prop, stop/restart confirmation, accurate waiting label

This commit is contained in:
Gabriel Brown
2026-07-11 13:36:54 -04:00
parent a5bc0434f3
commit 696f03e867
3 changed files with 172 additions and 29 deletions
@@ -235,6 +235,13 @@ export const MachineShell = () => {
const activeFile = activeFilePath ? files[activeFilePath] : undefined;
const running = Boolean(status?.running);
const starting = pendingAction === 'start' || pendingAction === 'restart';
// The terminal only shows this while the box is not running. Distinguish a box
// that is starting/restarting from one that is simply stopped so the label is
// accurate instead of always claiming "Starting…".
const terminalWaitingLabel = starting
? 'Starting your machine…'
: 'Machine is stopped — start it to open a terminal.';
return (
<main className='space-y-6'>
@@ -339,9 +346,10 @@ export const MachineShell = () => {
>
<XtermSession
active={running}
visible={activeTab === 'terminal'}
tokenUrl='/api/box/terminal-token'
sessionKey={username}
waitingLabel='Starting your machine…'
waitingLabel={terminalWaitingLabel}
label='your machine'
/>
</TabsContent>