@@ -393,6 +393,8 @@ export function NewHome() {
393393 }
394394
395395 function chooseProject ( conn : ServerConnection . Any ) {
396+ if ( global . servers . health [ ServerConnection . key ( conn ) ] ?. healthy === false ) return
397+
396398 function resolve ( result : string | string [ ] | null ) {
397399 addProjects ( conn , homeProjectDirectories ( result ) )
398400 }
@@ -551,6 +553,7 @@ function HomeProjectColumn(props: {
551553 size = "large"
552554 class = "titlebar-icon [&_[data-slot=icon-svg]]:text-v2-icon-icon-muted"
553555 icon = { < IconV2 name = "folder-add-left" /> }
556+ disabled = { global . servers . health [ ServerConnection . key ( global . servers . list ( ) [ 0 ] ! ) ] ?. healthy === false }
554557 onClick = { ( ) => props . chooseProject ( global . servers . list ( ) [ 0 ] ! ) }
555558 aria-label = { props . language . t ( "home.project.add" ) }
556559 />
@@ -690,7 +693,7 @@ function HomeServerRow(props: {
690693 </ span >
691694 </ button >
692695 < div
693- class = "absolute right-1 top-1/2 flex -translate-y-1/2 items-center gap-1 opacity-0 transition-opacity group-hover/server:opacity-100 focus-within:opacity-100 data-[menu=true]:opacity-100"
696+ class = "hover-reveal absolute right-1 top-1/2 flex -translate-y-1/2 items-center gap-1 group-hover/server:opacity-100 focus-within:opacity-100 data-[menu=true]:opacity-100"
694697 data-menu = { state . menuOpen }
695698 >
696699 < ServerRowMenu
@@ -707,6 +710,7 @@ function HomeServerRow(props: {
707710 size = "small"
708711 icon = { < IconV2 name = "folder-add-left" /> }
709712 aria-label = { props . language . t ( "home.project.add" ) }
713+ disabled = { props . health ?. healthy === false }
710714 onClick = { ( ) => props . chooseProject ( props . server ) }
711715 />
712716 </ TooltipV2 >
@@ -779,7 +783,7 @@ function HomeProjectRow(props: {
779783 < span class = { HOME_PROJECT_NAV_LABEL } > { displayName ( props . project ) } </ span >
780784 </ button >
781785 < div
782- class = "absolute right-1 top-1/2 flex -translate-y-1/2 items-center gap-1 opacity-0 transition-opacity group-hover/project:opacity-100 focus-within:opacity-100 data-[menu=true]:opacity-100"
786+ class = "hover-reveal absolute right-1 top-1/2 flex -translate-y-1/2 items-center gap-1 group-hover/project:opacity-100 focus-within:opacity-100 data-[menu=true]:opacity-100"
783787 data-menu = { state . menuOpen }
784788 >
785789 < MenuV2
@@ -1187,7 +1191,7 @@ function HomeSessionRow(props: {
11871191 </ span >
11881192 </ Show >
11891193 </ button >
1190- < div class = "absolute right-1.5 top-1/2 flex -translate-y-1/2 items-center gap-1 opacity-0 transition-opacity group-hover/session:opacity-100 focus-within:opacity-100" >
1194+ < div class = "hover-reveal absolute right-1.5 top-1/2 flex -translate-y-1/2 items-center gap-1 group-hover/session:opacity-100 focus-within:opacity-100" >
11911195 < TooltipV2 class = "flex shrink-0 items-center" placement = "bottom" value = { language . t ( "common.archive" ) } >
11921196 < IconButtonV2
11931197 data-action = "home-session-archive"
@@ -1276,6 +1280,7 @@ export function LegacyHome() {
12761280 const server = useServer ( )
12771281 const language = useLanguage ( )
12781282 const homedir = createMemo ( ( ) => sync ( ) . data . path . home )
1283+ const serverUnreachable = createMemo ( ( ) => global . servers . health [ server . key ] ?. healthy === false )
12791284 const recent = createMemo ( ( ) => {
12801285 return sync ( )
12811286 . data . project . slice ( )
@@ -1298,6 +1303,7 @@ export function LegacyHome() {
12981303 }
12991304
13001305 function chooseProject ( ) {
1306+ if ( serverUnreachable ( ) ) return
13011307 const s = server . current
13021308 if ( ! s ) return
13031309
@@ -1341,7 +1347,13 @@ export function LegacyHome() {
13411347 < div class = "mt-20 w-full flex flex-col gap-4" >
13421348 < div class = "flex gap-2 items-center justify-between pl-3" >
13431349 < div class = "text-14-medium text-text-strong" > { language . t ( "home.recentProjects" ) } </ div >
1344- < Button icon = "folder-add-left" size = "normal" class = "pl-2 pr-3" onClick = { chooseProject } >
1350+ < Button
1351+ icon = "folder-add-left"
1352+ size = "normal"
1353+ class = "pl-2 pr-3"
1354+ disabled = { serverUnreachable ( ) }
1355+ onClick = { chooseProject }
1356+ >
13451357 { language . t ( "command.project.open" ) }
13461358 </ Button >
13471359 </ div >
@@ -1367,7 +1379,7 @@ export function LegacyHome() {
13671379 < Match when = { ! sync ( ) . ready } >
13681380 < div class = "mt-30 mx-auto flex flex-col items-center gap-3" >
13691381 < div class = "text-12-regular text-text-weak" > { language . t ( "common.loading" ) } </ div >
1370- < Button class = "px-3" onClick = { chooseProject } >
1382+ < Button class = "px-3" disabled = { serverUnreachable ( ) } onClick = { chooseProject } >
13711383 { language . t ( "command.project.open" ) }
13721384 </ Button >
13731385 </ div >
@@ -1379,7 +1391,7 @@ export function LegacyHome() {
13791391 < div class = "text-14-medium text-text-strong" > { language . t ( "home.empty.title" ) } </ div >
13801392 < div class = "text-12-regular text-text-weak" > { language . t ( "home.empty.description" ) } </ div >
13811393 </ div >
1382- < Button class = "px-3 mt-1" onClick = { chooseProject } >
1394+ < Button class = "px-3 mt-1" disabled = { serverUnreachable ( ) } onClick = { chooseProject } >
13831395 { language . t ( "command.project.open" ) }
13841396 </ Button >
13851397 </ div >
0 commit comments