@@ -341,17 +341,15 @@ func getRawDevboxSession(cfg *config.LocalStatus, devboxSession *commonapi.Devbo
341341 // Standard view
342342 type PrintableDevboxSession struct {
343343 Healthy bool `json:"healthy"`
344- SessionReleased bool `json:"sessionReleased"`
345344 DevboxId string `json:"devboxId,omitempty"`
346345 SessionId string `json:"sessionId,omitempty"`
347346 LastErrorReason string `json:"lastErrorReason,omitempty"`
348347 }
349348
350349 result := & PrintableDevboxSession {
351- Healthy : devboxSession .Healthy ,
352- SessionReleased : devboxSession .SessionReleased ,
353- DevboxId : devboxSession .DevboxId ,
354- SessionId : devboxSession .SessionId ,
350+ Healthy : devboxSession .Healthy ,
351+ DevboxId : devboxSession .DevboxId ,
352+ SessionId : devboxSession .SessionId ,
355353 }
356354
357355 if devboxSession .LastErrorReason != "" {
@@ -380,11 +378,7 @@ func printLocalStatus(cfg *config.LocalStatus, out io.Writer, status *sbmapi.Sta
380378 }
381379 // runtime config
382380 printer .printRuntimeConfig ()
383- // Check devbox session status
384- if status .DevboxSession != nil && status .DevboxSession .SessionReleased {
385- printer .printErrors (append (connectErrs , fmt .Errorf ("devbox session no longer available (released by another process)" )))
386- return nil
387- }
381+ // Check devbox session status (no longer checking for session release)
388382
389383 // print status
390384 if len (connectErrs ) == 0 {
@@ -464,13 +458,13 @@ func (p *statusPrinter) printDevboxSessionStatus() {
464458 }
465459
466460 ds := p .status .DevboxSession
467- if ds .SessionReleased {
468- msg := "devbox session no longer available "
461+ if ! ds .Healthy {
462+ msg := "devbox session unhealthy "
469463 if ds .LastErrorReason != "" {
470464 msg += fmt .Sprintf (": %s" , ds .LastErrorReason )
471465 }
472466 p .printLine (p .out , 1 , msg , p .red ("✗" ))
473- } else if ds . Healthy {
467+ } else {
474468 msg := fmt .Sprintf ("devbox session active (devbox: %s, session: %s)" , ds .DevboxId , ds .SessionId )
475469 if p .cfg .Details && ds .SessionId != "" {
476470 msg = "devbox session active"
@@ -480,12 +474,6 @@ func (p *statusPrinter) printDevboxSessionStatus() {
480474 } else {
481475 p .printLine (p .out , 1 , msg , p .green ("✓" ))
482476 }
483- } else {
484- msg := "devbox session unhealthy"
485- if ds .LastErrorReason != "" {
486- msg += fmt .Sprintf (": %s" , ds .LastErrorReason )
487- }
488- p .printLine (p .out , 1 , msg , p .red ("✗" ))
489477 }
490478}
491479
0 commit comments