The best way to control Claude Code, Codex and more from any computer or phone
perf(web): the server update action compiles with the React Compiler (#20478)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Oct 16, 2026 at 18:46 UTC
b27c686298becb3d63218ec221d1a819dfb00b72
2 files changed
+45
-53
apps/web/reactCompiledFiles.ts
+1
@@ -53,4 +53,5 @@ export const REACT_COMPILED_FILES = [
53
"apps/web/src/components/chat/QueuedRunsControl.tsx",
54
"apps/web/src/components/preview/PreviewView.tsx",
55
"apps/web/src/components/CommandPalette.tsx",
56
+ "apps/web/src/components/ServerUpdateAction.tsx",
57
] as const;
apps/web/src/components/ServerUpdateAction.tsx
+44
-53
@@ -14,6 +14,7 @@ import type {
14
import type { ServerUpdateStage, ServerUpdateState } from "@t3tools/client-runtime/state/server";
15
import {
16
isAtomCommandInterrupted,
17
+ settlePromise,
18
squashAtomCommandFailure,
19
} from "@t3tools/client-runtime/state/runtime";
20
import { CircleArrowUpIcon } from "lucide-react";
@@ -79,33 +80,19 @@ export function useServerUpdate() {
80
)
81
return { status: "skipped" };
82
pendingUpdateEnvironmentIds.add(environmentId);
82
- try {
83
- const result = await updateServer({
84
- environmentId,
85
- input: {
86
- targetVersion,
87
- ...(target.threadContinuation && target.continueThreadsAfterServerUpdate
88
- ? { continueRunningThreads: true }
89
- : {}),
90
- },
91
- });
92
- if (result._tag === "Failure") {
93
- if (isAtomCommandInterrupted(result)) return { status: "skipped" };
94
- throw squashAtomCommandFailure(result);
95
- }
96
- if (!quiet) {
97
- toastManager.add({
98
- type: "success",
99
- title: `${serverLabel} updated`,
100
- description:
101
- selfUpdate === "desktop-managed"
102
- ? `Desktop app relaunched on ${result.value.targetVersion}.`
103
- : `Reconnected on t3@${result.value.targetVersion}.`,
104
- });
105
- }
106
- return { status: "updated" };
107
- } catch (error) {
108
- const message = updateFailureMessage(error);
83
+ const result = await updateServer({
84
+ environmentId,
85
+ input: {
86
+ targetVersion,
87
+ ...(target.threadContinuation && target.continueThreadsAfterServerUpdate
88
+ ? { continueRunningThreads: true }
89
+ : {}),
90
+ },
91
+ });
92
+ pendingUpdateEnvironmentIds.delete(environmentId);
93
+ if (result._tag === "Failure") {
94
+ if (isAtomCommandInterrupted(result)) return { status: "skipped" };
95
+ const message = updateFailureMessage(squashAtomCommandFailure(result));
96
if (!quiet) {
97
toastManager.add({
98
type: "error",
@@ -114,9 +101,18 @@ export function useServerUpdate() {
101
});
102
}
103
return { status: "failed", message };
117
- } finally {
118
- pendingUpdateEnvironmentIds.delete(environmentId);
104
}
105
+ if (!quiet) {
106
+ toastManager.add({
107
+ type: "success",
108
+ title: `${serverLabel} updated`,
109
+ description:
110
+ selfUpdate === "desktop-managed"
111
+ ? `Desktop app relaunched on ${result.value.targetVersion}.`
112
+ : `Reconnected on t3@${result.value.targetVersion}.`,
113
+ });
114
+ }
115
+ return { status: "updated" };
116
};
117
}
118
@@ -141,7 +137,7 @@ export function ServerUpdatesAction({
137
if (pending.current) return;
138
pending.current = true;
139
setIsPending(true);
144
- try {
140
+ await settlePromise(async () => {
141
const available = eligible.filter(
142
(target) => !pendingUpdateEnvironmentIds.has(target.environmentId),
143
);
@@ -154,10 +150,9 @@ export function ServerUpdatesAction({
150
if (!confirmed) return;
151
}
152
await Promise.all(available.map((target) => update(target)));
157
- } finally {
158
- pending.current = false;
159
- setIsPending(false);
160
- }
153
+ });
154
+ pending.current = false;
155
+ setIsPending(false);
156
};
157
return (
158
<Button
@@ -355,30 +350,26 @@ export function OutdatedServerUpdateAction({
350
const handleUpdate = async () => {
351
if (pendingUpdateEnvironmentIds.has(environmentId)) return;
352
pendingUpdateEnvironmentIds.add(environmentId);
358
- try {
359
- const result = await update({
360
- environmentId,
361
- input: { targetVersion },
362
- ...(fromVersion === undefined ? {} : { fromVersion }),
363
- });
364
- if (result._tag === "Failure") {
365
- if (isAtomCommandInterrupted(result)) return;
366
- throw squashAtomCommandFailure(result);
367
- }
368
- toastManager.add({
369
- type: "success",
370
- title: `${serverLabel} updated`,
371
- description: `Reconnected on t3@${result.value.targetVersion}.`,
372
- });
373
- } catch (error) {
353
+ const result = await update({
354
+ environmentId,
355
+ input: { targetVersion },
356
+ ...(fromVersion === undefined ? {} : { fromVersion }),
357
+ });
358
+ pendingUpdateEnvironmentIds.delete(environmentId);
359
+ if (result._tag === "Failure") {
360
+ if (isAtomCommandInterrupted(result)) return;
361
toastManager.add({
362
type: "error",
363
title: `${serverLabel} update failed`,
377
- description: updateFailureMessage(error),
364
+ description: updateFailureMessage(squashAtomCommandFailure(result)),
365
});
379
- } finally {
380
- pendingUpdateEnvironmentIds.delete(environmentId);
366
+ return;
367
}
368
+ toastManager.add({
369
+ type: "success",
370
+ title: `${serverLabel} updated`,
371
+ description: `Reconnected on t3@${result.value.targetVersion}.`,
372
+ });
373
};
374
return (
375
<Button size="xs" variant="outline" onClick={() => void handleUpdate()}>