feat(reconnect): replace top banner with animated sidebar overlay (#1510)

This commit is contained in:
klopez4212
2026-07-04 16:37:34 +01:00
committed by GitHub
parent 20d3cdc22f
commit f35aeb7986
7 changed files with 171 additions and 117 deletions

View File

@@ -68,9 +68,16 @@ export function useSidebarRelayConnectionCard(
const hasRelayUnreachableError = errorMessage
? isRelayUnreachableError(errorMessage)
: false;
// True when the error is an application-level issue (e.g. auth rejection)
// rather than a network-level relay-unreachable error. In this case, the
// disconnected state should NOT trigger the reconnect card — the app shows
// a dedicated error path instead.
const hasNonUnreachableError =
Boolean(errorMessage) && !hasRelayUnreachableError;
const isRelayConnectionStateDegraded =
relayConnectionState === "reconnecting" ||
relayConnectionState === "stalled";
relayConnectionState === "stalled" ||
(relayConnectionState === "disconnected" && !hasNonUnreachableError);
const isRelayConnectionConnected = relayConnectionState === "connected";
const isRelayConnectionDisconnected = relayConnectionState === "disconnected";
const [isDismissed, setIsDismissed] = React.useState(false);