Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): allow removing a relay environment whose server is gone #5494

ClosedTorbenWetter(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/5494/headopened View on GitHub

Showing 4 changed files with 128 additions and 26 deletions (loading 2).

x
0 of 4 viewed, 4 left
70 additions and 25 deletionsapps/web/src/components/cloud/CloudEnvironmentConnectList.tsxModified
View file
@@ -30,6 +30,25 @@
readonly connection: EnvironmentConnectionPresentation;
​
+function reportEnvironmentActionFailure(title: string, fallbackMessage: string, cause: unknown) {
+ const message = cause instanceof Error ? cause.message : fallbackMessage;
+ const traceId = findErrorTraceId(cause);
+ console.error(`[t3-connect] ${title}`, { message, traceId, cause });
+ toastManager.add({
+ type: "error",
+ title,
+ description: message,
+ data: traceId
+ ? {
+ secondaryActionProps: {
+ children: "Copy trace ID",
+ onClick: () => void navigator.clipboard?.writeText(traceId),
+ },
+ }
+ : undefined,
+ });
+}
+​
export function RemoteEnvironmentRowsSkeleton() {
return (
<div className={ITEM_ROW_CLASSNAME}>
@@ -81,9 +100,13 @@
[registerEnvironment],