@devries-cameron20 / t3code-1 / commits / ea52bb1dbd
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

[codex] fix: guard trace ID clipboard copy (#3505)

Co-authored-by: Codex <codex@openai.com>

Wout Stiens committed Jun 22, 2026 at 18:46 UTC ea52bb1dbda115f9824415f7589505c9e57268c6
1 file changed +26 -1
apps/web/src/components/settings/ConnectionsSettings.tsx
+26 -1
@@ -1423,6 +1423,31 @@ function SavedBackendListRow({
1423 : "bg-muted-foreground/40";
1424 const statusTooltip = connectionStatusText(environment.connection);
1425 const errorTraceId = environment.connection.traceId;
1426 + const { copyToClipboard: copyTraceIdToClipboard } = useCopyToClipboard<{ traceId: string }>({
1427 + target: "trace ID",
1428 + onCopy: ({ traceId }) => {
1429 + toastManager.add({
1430 + type: "success",
1431 + title: "Trace ID copied",
1432 + description: traceId,
1433 + });
1434 + },
1435 + onError: (error) => {
1436 + toastManager.add(
1437 + stackedThreadToast({
1438 + type: "error",
1439 + title: "Could not copy trace ID",
1440 + description: error.message,
1441 + }),
1442 + );
1443 + },
1444 + });
1445 + const copyTraceId = useCallback(
1446 + (traceId: string) => {
1447 + copyTraceIdToClipboard(traceId, { traceId });
1448 + },
1449 + [copyTraceIdToClipboard],
1450 + );
1451 const versionMismatch = resolveServerConfigVersionMismatch(environment.serverConfig);
1452 const sshTarget =
1453 environment.entry.target._tag === "SshConnectionTarget" &&
@@ -1468,7 +1493,7 @@ function SavedBackendListRow({
1493 <button
1494 type="button"
1495 className="shrink-0 underline underline-offset-2"
1471 - onClick={() => void navigator.clipboard.writeText(errorTraceId)}
1496 + onClick={() => copyTraceId(errorTraceId)}
1497 >
1498 Copy trace ID
1499 </button>