@@ -114,6 +114,7 @@ export type SettingsViewProps = {
114114 events : unknown ;
115115 workspaceDebugEvents : unknown ;
116116 sandboxCreateProgress : unknown ;
117+ sandboxCreateProgressLast : unknown ;
117118 clearWorkspaceDebugEvents : ( ) => void ;
118119 safeStringify : ( value : unknown ) => string ;
119120 repairOpencodeMigration : ( ) => void ;
@@ -754,17 +755,18 @@ export default function SettingsView(props: SettingsViewProps) {
754755 const opencodeDevModeEnabled = createMemo ( ( ) => Boolean ( buildInfo ( ) ?. openworkDevMode ) ) ;
755756
756757 const sandboxCreateSummary = createMemo ( ( ) => {
757- const raw = props . sandboxCreateProgress as
758- | { runId ?: string ; stage ?: string ; error ?: string | null ; logs ?: string [ ] }
758+ const raw = ( props . sandboxCreateProgress ?? props . sandboxCreateProgressLast ) as
759+ | { runId ?: string ; stage ?: string ; error ?: string | null ; logs ?: string [ ] ; startedAt ?: number }
759760 | null
760761 | undefined ;
761762 if ( ! raw || typeof raw !== "object" ) {
762- return { runId : null , stage : null , error : null , logs : [ ] as string [ ] } ;
763+ return { runId : null , stage : null , error : null , logs : [ ] as string [ ] , startedAt : null } ;
763764 }
764765 return {
765766 runId : typeof raw . runId === "string" && raw . runId . trim ( ) ? raw . runId : null ,
766767 stage : typeof raw . stage === "string" && raw . stage . trim ( ) ? raw . stage : null ,
767768 error : typeof raw . error === "string" && raw . error . trim ( ) ? raw . error : null ,
769+ startedAt : typeof raw . startedAt === "number" ? raw . startedAt : null ,
768770 logs : Array . isArray ( raw . logs )
769771 ? raw . logs . filter ( ( line ) => typeof line === "string" && line . trim ( ) ) . slice ( - 400 )
770772 : [ ] ,
@@ -828,7 +830,10 @@ export default function SettingsView(props: SettingsViewProps) {
828830 pendingPermissions : props . pendingPermissions ,
829831 recentEvents : props . events ,
830832 workspaceDebugEvents : props . workspaceDebugEvents ,
831- sandboxCreateProgress : sandboxCreateSummary ( ) ,
833+ sandboxCreateProgress : {
834+ ...sandboxCreateSummary ( ) ,
835+ lastRunAt : sandboxCreateSummary ( ) . startedAt ? new Date ( sandboxCreateSummary ( ) . startedAt ! ) . toISOString ( ) : null ,
836+ } ,
832837 sandboxProbe : sandboxProbeResult ( ) ,
833838 } ) ) ;
834839
0 commit comments