File tree Expand file tree Collapse file tree
packages/client-runtime/src/connection Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ import {
1010} from "./model.ts" ;
1111import {
1212 connectionCatalogDisplayUrl ,
13- connectionPhaseMessage ,
1413 connectionStatusText ,
1514 connectionStatusTitle ,
1615 presentEnvironmentConnection ,
@@ -119,10 +118,6 @@ describe("connection presentation", () => {
119118 } ) ;
120119 } ) ;
121120
122- it ( "gives offline status precedence in global messaging" , ( ) => {
123- expect ( connectionPhaseMessage ( "connected" , TARGET . label , "offline" ) ) . toBe ( "You are offline" ) ;
124- } ) ;
125-
126121 it ( "combines reconnect progress with the latest failure" , ( ) => {
127122 const connection = {
128123 phase : "reconnecting" ,
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import type { ServerConfig } from "@t3tools/contracts";
22import * as Option from "effect/Option" ;
33
44import type { ConnectionCatalogEntry } from "./catalog.ts" ;
5- import type { NetworkStatus , SupervisorConnectionState } from "./model.ts" ;
5+ import type { SupervisorConnectionState } from "./model.ts" ;
66
77export type EnvironmentConnectionPhase =
88 | "available"
@@ -105,25 +105,3 @@ export function connectionCatalogDisplayUrl(entry: ConnectionCatalogEntry): stri
105105 : null ;
106106 }
107107}
108-
109- export function connectionPhaseMessage (
110- phase : EnvironmentConnectionPhase ,
111- label : string ,
112- networkStatus : NetworkStatus ,
113- ) : string {
114- if ( networkStatus === "offline" || phase === "offline" ) {
115- return "You are offline" ;
116- }
117- switch ( phase ) {
118- case "available" :
119- return "Available" ;
120- case "connecting" :
121- return `Connecting to ${ label } ...` ;
122- case "reconnecting" :
123- return `Reconnecting to ${ label } ...` ;
124- case "connected" :
125- return "Connected" ;
126- case "error" :
127- return "Connection failed" ;
128- }
129- }
You can’t perform that action at this time.
0 commit comments