@@ -35,6 +35,7 @@ import { type RelayEnvironmentView, useConnectionController } from "./useConnect
3535
3636interface CloudEnvironmentRowsProps {
3737 readonly connectedCloudEnvironments : ReadonlyArray < ConnectedEnvironmentSummary > ;
38+ readonly onOpenEnvironment ?: ( environmentId : EnvironmentId ) => void ;
3839 readonly onSetEnvironmentEnabled : ( environmentId : EnvironmentId , enabled : boolean ) => void ;
3940 /** Long-press on a saved row. The callback owns the confirm. */
4041 readonly onRemoveEnvironment : ( environmentId : EnvironmentId ) => void ;
@@ -124,41 +125,45 @@ function CloudEnvironmentRowsContent(
124125 ) : null }
125126
126127 { hasCloudRows ? (
127- < View collapsable = { false } className = "overflow-hidden rounded-[24px] bg-card" >
128- { props . connectedCloudEnvironments . map ( ( environment , index ) => (
128+ < View collapsable = { false } className = "overflow-hidden rounded-[24px] bg-grouped- card" >
129+ { props . connectedCloudEnvironments . map ( ( environment ) => (
129130 < ConnectedCloudEnvironmentRow
130131 key = { environment . environmentId }
131132 environment = { environment }
132133 descriptor = { discoveredDescriptors . get ( environment . environmentId ) }
133- borderTop = { index !== 0 }
134134 onSetEnabled = { ( enabled ) =>
135135 props . onSetEnvironmentEnabled ( environment . environmentId , enabled )
136136 }
137137 onRemove = { ( ) => props . onRemoveEnvironment ( environment . environmentId ) }
138+ onOpen = {
139+ props . onOpenEnvironment
140+ ? ( ) => props . onOpenEnvironment ?.( environment . environmentId )
141+ : undefined
142+ }
138143 errorExpanded = { expandedErrorId === environment . environmentId }
139144 onToggleError = { ( ) => handleToggleCloudError ( environment . environmentId ) }
140145 />
141146 ) ) }
142- { availableCloudEnvironments . map ( ( environment , index ) => (
147+ { availableCloudEnvironments . map ( ( environment ) => (
143148 < CloudEnvironmentRow
144149 key = { environment . environment . environmentId }
145150 environment = { environment }
146- borderTop = { props . connectedCloudEnvironments . length > 0 || index !== 0 }
151+ showChevron = { props . onOpenEnvironment !== undefined }
147152 onConnect = { ( ) => handleConnectCloudEnvironment ( environment ) }
148153 errorExpanded = { expandedErrorId === environment . environment . environmentId }
149154 onToggleError = { ( ) => handleToggleCloudError ( environment . environment . environmentId ) }
150155 />
151156 ) ) }
152157 </ View >
153158 ) : controller . relayDiscovery . isRefreshing ? (
154- < View collapsable = { false } className = "items-center gap-3 rounded-[24px] bg-card p-6" >
159+ < View collapsable = { false } className = "items-center gap-3 rounded-[24px] bg-grouped- card p-6" >
155160 < ActivityIndicator colorClassName = { "accent-icon" } />
156161 < Text className = "text-center text-sm leading-normal text-foreground-muted" >
157162 Loading linked cloud environments.
158163 </ Text >
159164 </ View >
160165 ) : controller . relayDiscovery . error ? null : (
161- < View collapsable = { false } className = "rounded-[24px] bg-card p-5" >
166+ < View collapsable = { false } className = "rounded-[24px] bg-grouped- card p-5" >
162167 < Text className = "text-sm leading-normal text-foreground-muted" >
163168 No additional linked cloud environments.
164169 </ Text >
@@ -170,7 +175,7 @@ function CloudEnvironmentRowsContent(
170175 { discoveryAvailable &&
171176 controller . relayDiscovery . error &&
172177 ! controller . relayDiscovery . isRefreshing ? (
173- < View collapsable = { false } className = "gap-3 rounded-[24px] bg-card p-5" >
178+ < View collapsable = { false } className = "gap-3 rounded-[24px] bg-grouped- card p-5" >
174179 < Text className = "text-base font-t3-bold text-foreground" >
175180 Could not load T3 Connect environments
176181 </ Text >
@@ -202,10 +207,10 @@ function ConnectedCloudEnvironmentRow(props: {
202207 readonly environment : ConnectedEnvironmentSummary ;
203208 /** Discovery's view of the server, for the glyph before the first connection. */
204209 readonly descriptor : ExecutionEnvironmentDescriptor | undefined ;
205- readonly borderTop : boolean ;
206210 readonly errorExpanded : boolean ;
207211 readonly onSetEnabled : ( enabled : boolean ) => void ;
208212 readonly onRemove : ( ) => void ;
213+ readonly onOpen ?: ( ( ) => void ) | undefined ;
209214 readonly onToggleError : ( ) => void ;
210215} ) {
211216 const serverConfig = useAtomValue (
@@ -222,10 +227,13 @@ function ConnectedCloudEnvironmentRow(props: {
222227 return (
223228 < Pressable
224229 accessibilityHint = "Long press to remove from this device"
230+ accessibilityRole = { props . onOpen ? "button" : undefined }
231+ accessibilityLabel = { props . onOpen ? `Manage ${ props . environment . environmentLabel } ` : undefined }
232+ onPress = { props . onOpen }
225233 onLongPress = { props . onRemove }
226234 >
227235 < CloudEnvironmentRowShell
228- borderTop = { props . borderTop }
236+ opensDetails = { props . onOpen !== undefined }
229237 connectionError = { enabled || unsupported ? props . environment . connectionError : null }
230238 connectionErrorTraceId = { enabled ? props . environment . connectionErrorTraceId : null }
231239 connectionState = { enabled || unsupported ? props . environment . connectionState : "available" }
@@ -246,7 +254,7 @@ function ConnectedCloudEnvironmentRow(props: {
246254
247255function CloudEnvironmentRow ( props : {
248256 readonly environment : RelayEnvironmentView ;
249- readonly borderTop : boolean ;
257+ readonly showChevron : boolean ;
250258 readonly errorExpanded : boolean ;
251259 readonly onConnect : ( ) => void ;
252260 readonly onToggleError : ( ) => void ;
@@ -260,7 +268,7 @@ function CloudEnvironmentRow(props: {
260268
261269 return (
262270 < CloudEnvironmentRowShell
263- borderTop = { props . borderTop }
271+ showChevron = { props . showChevron }
264272 connectionError = { presentation . connectionError }
265273 connectionErrorTraceId = { presentation . connectionErrorTraceId }
266274 connectionState = { presentation . connectionState }
@@ -285,7 +293,8 @@ function CloudEnvironmentRow(props: {
285293}
286294
287295function CloudEnvironmentRowShell ( props : {
288- readonly borderTop : boolean ;
296+ readonly showChevron ?: boolean ;
297+ readonly opensDetails ?: boolean ;
289298 readonly connectionError : string | null ;
290299 readonly connectionErrorTraceId : string | null ;
291300 readonly connectionState : EnvironmentConnectionPhase ;
@@ -340,13 +349,7 @@ function CloudEnvironmentRowShell(props: {
340349 [ measuredErrorText , props . connectionError ] ,
341350 ) ;
342351 return (
343- < View
344- collapsable = { false }
345- className = { cn (
346- "flex-row items-center gap-3 bg-card px-4 py-3.5" ,
347- props . borderTop && "border-t border-border" ,
348- ) }
349- >
352+ < View collapsable = { false } className = "flex-row items-center gap-3 bg-grouped-card px-4 py-3.5" >
350353 < View className = "min-w-0 flex-1 gap-0.5" >
351354 < View className = "min-w-0 flex-row items-center gap-2" >
352355 < ConnectionStatusDot state = { props . connectionState } pulse = { shouldPulse } size = { 7 } />
@@ -409,10 +412,16 @@ function CloudEnvironmentRowShell(props: {
409412 </ StatusContainer >
410413 </ View >
411414 < ThemedSwitch
415+ style = { { alignSelf : "center" } }
412416 disabled = { props . disabled }
413417 onValueChange = { props . onValueChange }
414418 value = { props . value }
415419 />
420+ { props . opensDetails || props . showChevron ? (
421+ < View style = { { opacity : props . opensDetails ? 1 : 0.4 } } >
422+ < SymbolView name = "chevron.right" size = { 12 } tintColorClassName = "accent-icon-subtle" />
423+ </ View >
424+ ) : null }
416425 </ View >
417426 ) ;
418427}
0 commit comments