@@ -23,6 +23,7 @@ import {
2323import { TitleBar } from '@/components/layout/TitleBar' ;
2424import { Button } from '@/components/ui/button' ;
2525import { Input } from '@/components/ui/input' ;
26+ import { Tooltip , TooltipTrigger , TooltipContent } from '@/components/ui/tooltip' ;
2627import { Label } from '@/components/ui/label' ;
2728import { cn } from '@/lib/utils' ;
2829import { useGatewayStore } from '@/stores/gateway' ;
@@ -559,27 +560,43 @@ function RuntimeContent({ onStatusChange }: RuntimeContentProps) {
559560 }
560561 } ;
561562
563+ const ERROR_TRUNCATE_LEN = 30 ;
564+
562565 const renderStatus = ( status : 'checking' | 'success' | 'error' , message : string ) => {
563566 if ( status === 'checking' ) {
564567 return (
565- < span className = "flex items-center gap-2 text-yellow-400" >
566- < Loader2 className = "h-4 w-4 animate-spin" />
568+ < span className = "flex items-center gap-2 text-yellow-400 whitespace-nowrap " >
569+ < Loader2 className = "h-5 w-5 flex-shrink-0 animate-spin" />
567570 { message || 'Checking...' }
568571 </ span >
569572 ) ;
570573 }
571574 if ( status === 'success' ) {
572575 return (
573- < span className = "flex items-center gap-2 text-green-400" >
574- < CheckCircle2 className = "h-4 w-4 " />
576+ < span className = "flex items-center gap-2 text-green-400 whitespace-nowrap " >
577+ < CheckCircle2 className = "h-5 w-5 flex-shrink-0 " />
575578 { message }
576579 </ span >
577580 ) ;
578581 }
582+
583+ const isLong = message . length > ERROR_TRUNCATE_LEN ;
584+ const displayMsg = isLong ? message . slice ( 0 , ERROR_TRUNCATE_LEN ) : message ;
585+
579586 return (
580- < span className = "flex items-center gap-2 text-red-400" >
581- < XCircle className = "h-4 w-4" />
582- { message }
587+ < span className = "flex items-center gap-2 text-red-400 whitespace-nowrap" >
588+ < XCircle className = "h-5 w-5 flex-shrink-0" />
589+ < span > { displayMsg } </ span >
590+ { isLong && (
591+ < Tooltip >
592+ < TooltipTrigger asChild >
593+ < span className = "cursor-pointer text-red-300 hover:text-red-200 font-medium" > ...</ span >
594+ </ TooltipTrigger >
595+ < TooltipContent side = "top" className = "max-w-sm whitespace-normal break-words text-xs" >
596+ { message }
597+ </ TooltipContent >
598+ </ Tooltip >
599+ ) }
583600 </ span >
584601 ) ;
585602 } ;
@@ -599,31 +616,37 @@ function RuntimeContent({ onStatusChange }: RuntimeContentProps) {
599616 </ div >
600617 </ div >
601618 < div className = "space-y-3" >
602- < div className = "flex items-center justify-between p-3 rounded-lg bg-white/5" >
603- < span > { t ( 'runtime.nodejs' ) } </ span >
604- { renderStatus ( checks . nodejs . status , checks . nodejs . message ) }
619+ < div className = "grid grid-cols-[1fr_auto] items-center gap-4 p-3 rounded-lg bg-muted/50" >
620+ < span className = "text-left" > { t ( 'runtime.nodejs' ) } </ span >
621+ < div className = "flex justify-end" >
622+ { renderStatus ( checks . nodejs . status , checks . nodejs . message ) }
623+ </ div >
605624 </ div >
606- < div className = "flex items-center justify-between p-3 rounded-lg bg-muted/50" >
607- < div >
625+ < div className = "grid grid-cols-[1fr_auto] items-center gap-4 p-3 rounded-lg bg-muted/50" >
626+ < div className = "text-left min-w-0" >
608627 < span > { t ( 'runtime.openclaw' ) } </ span >
609628 { openclawDir && (
610- < p className = "text-xs text-muted-foreground mt-0.5 font-mono truncate max-w-[300px] " >
629+ < p className = "text-xs text-muted-foreground mt-0.5 font-mono break-all " >
611630 { openclawDir }
612631 </ p >
613632 ) }
614633 </ div >
615- { renderStatus ( checks . openclaw . status , checks . openclaw . message ) }
634+ < div className = "flex justify-end self-start mt-0.5" >
635+ { renderStatus ( checks . openclaw . status , checks . openclaw . message ) }
636+ </ div >
616637 </ div >
617- < div className = "flex items-center justify-between p-3 rounded-lg bg-muted/50" >
618- < div className = "flex items-center gap-2" >
638+ < div className = "grid grid-cols-[1fr_auto] items-center gap-4 p-3 rounded-lg bg-muted/50" >
639+ < div className = "flex items-center gap-2 text-left " >
619640 < span > Gateway Service</ span >
620641 { checks . gateway . status === 'error' && (
621642 < Button variant = "outline" size = "sm" onClick = { handleStartGateway } >
622643 Start Gateway
623644 </ Button >
624645 ) }
625646 </ div >
626- { renderStatus ( checks . gateway . status , checks . gateway . message ) }
647+ < div className = "flex justify-end" >
648+ { renderStatus ( checks . gateway . status , checks . gateway . message ) }
649+ </ div >
627650 </ div >
628651 </ div >
629652
0 commit comments