@@ -20,7 +20,11 @@ import {
20
20
import { useNavigation } from "@remix-run/react" ;
21
21
import { useEffect , useRef , useState , type ReactNode } from "react" ;
22
22
import simplur from "simplur" ;
23
- import { ConnectedIcon , DisconnectedIcon } from "~/assets/icons/ConnectionIcons" ;
23
+ import {
24
+ CheckingConnectionIcon ,
25
+ ConnectedIcon ,
26
+ DisconnectedIcon ,
27
+ } from "~/assets/icons/ConnectionIcons" ;
24
28
import { RunsIconExtraSmall , RunsIconSmall } from "~/assets/icons/RunsIcon" ;
25
29
import { TaskIconSmall } from "~/assets/icons/TaskIcon" ;
26
30
import { Avatar } from "~/components/primitives/Avatar" ;
@@ -82,6 +86,7 @@ import { SideMenuHeader } from "./SideMenuHeader";
82
86
import { SideMenuItem } from "./SideMenuItem" ;
83
87
import { SideMenuSection } from "./SideMenuSection" ;
84
88
import { WaitpointTokenIcon } from "~/assets/icons/WaitpointTokenIcon" ;
89
+ import { Spinner } from "../primitives/Spinner" ;
85
90
86
91
type SideMenuUser = Pick < User , "email" | "admin" > & { isImpersonating : boolean } ;
87
92
export type SideMenuProject = Pick <
@@ -532,7 +537,9 @@ export function DevConnection() {
532
537
variant = "minimal/small"
533
538
className = "aspect-square h-7 p-1"
534
539
LeadingIcon = {
535
- isConnected ? (
540
+ isConnected === undefined ? (
541
+ < CheckingConnectionIcon className = "size-5" />
542
+ ) : isConnected ? (
536
543
< ConnectedIcon className = "size-5" />
537
544
) : (
538
545
< DisconnectedIcon className = "size-5" />
@@ -543,24 +550,34 @@ export function DevConnection() {
543
550
</ div >
544
551
</ TooltipTrigger >
545
552
< TooltipContent side = "right" className = { "text-xs" } >
546
- { isConnected ? "Your dev server is connected" : "Your dev server is not connected" }
553
+ { isConnected === undefined
554
+ ? "Checking connection..."
555
+ : isConnected
556
+ ? "Your dev server is connected"
557
+ : "Your dev server is not connected" }
547
558
</ TooltipContent >
548
559
</ Tooltip >
549
560
</ TooltipProvider >
550
561
< DialogContent >
551
562
< DialogHeader >
552
- { isConnected ? "Your dev server is connected" : "Your dev server is not connected" }
563
+ { isConnected === undefined
564
+ ? "Checking connection..."
565
+ : isConnected
566
+ ? "Your dev server is connected"
567
+ : "Your dev server is not connected" }
553
568
</ DialogHeader >
554
569
< div className = "mt-2 flex flex-col gap-3 px-2" >
555
570
< div className = "flex flex-col items-center justify-center gap-6 px-6 py-10" >
556
571
< img
557
- src = { isConnected ? connectedImage : disconnectedImage }
558
- alt = { isConnected ? "Connected" : "Disconnected" }
572
+ src = { isConnected === true ? connectedImage : disconnectedImage }
573
+ alt = { isConnected === true ? "Connected" : "Disconnected" }
559
574
width = { 282 }
560
575
height = { 45 }
561
576
/>
562
577
< Paragraph variant = "small" className = { isConnected ? "text-success" : "text-error" } >
563
- { isConnected
578
+ { isConnected === undefined
579
+ ? "Checking connection..."
580
+ : isConnected
564
581
? "Your local dev server is connected to Trigger.dev"
565
582
: "Your local dev server is not connected to Trigger.dev" }
566
583
</ Paragraph >
0 commit comments