TypeScript
refactor(client-runtime): remove unused connection phase message (#9972)
Julius Marminge1782a2af44a7
diff --git a/packages/client-runtime/src/connection/presentation.test.ts b/packages/client-runtime/src/connection/presentation.test.tsindex e13638a2b41..80ce8a374a9 100644--- a/packages/client-runtime/src/connection/presentation.test.ts+++ b/packages/client-runtime/src/connection/presentation.test.ts@@ -10,7 +10,6 @@ import {} from "./model.ts";import {connectionCatalogDisplayUrl,- connectionPhaseMessage,connectionStatusText,connectionStatusTitle,presentEnvironmentConnection,@@ -119,10 +118,6 @@ describe("connection presentation", () => {});});- it("gives offline status precedence in global messaging", () => {- expect(connectionPhaseMessage("connected", TARGET.label, "offline")).toBe("You are offline");- });-it("combines reconnect progress with the latest failure", () => {const connection = {phase: "reconnecting",diff --git a/packages/client-runtime/src/connection/presentation.ts b/packages/client-runtime/src/connection/presentation.tsindex 168443deceb..4093167d333 100644--- a/packages/client-runtime/src/connection/presentation.ts+++ b/packages/client-runtime/src/connection/presentation.ts@@ -2,7 +2,7 @@ import type { ServerConfig } from "@t3tools/contracts";import * as Option from "effect/Option";import type { ConnectionCatalogEntry } from "./catalog.ts";-import type { NetworkStatus, SupervisorConnectionState } from "./model.ts";+import type { SupervisorConnectionState } from "./model.ts";export type EnvironmentConnectionPhase =| "available"@@ -105,25 +105,3 @@ export function connectionCatalogDisplayUrl(entry: ConnectionCatalogEntry): stri: null;}}--export function connectionPhaseMessage(- phase: EnvironmentConnectionPhase,- label: string,- networkStatus: NetworkStatus,-): string {- if (networkStatus === "offline" || phase === "offline") {- return "You are offline";- }- switch (phase) {- case "available":- return "Available";- case "connecting":- return `Connecting to ${label}...`;- case "reconnecting":- return `Reconnecting to ${label}...`;- case "connected":- return "Connected";- case "error":- return "Connection failed";- }-}