@devries-cameron20 / t3code Mirror · read-only / commits / 5cc75e8cb5
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 23, 08:00 UTC

perf(web): the provider updates action compiles with the React Compiler (#20485)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Julius Marminge committed Oct 16, 2026 at 18:46 UTC 5cc75e8cb5e63d5f50b9a79f4f7f5671b6106fcb
2 files changed +18 -23
apps/web/reactCompiledFiles.ts
+1
@@ -60,4 +60,5 @@ export const REACT_COMPILED_FILES = [
60 "apps/web/src/components/files/useDirectoryEntries.ts",
61 "apps/web/src/components/files/FileBrowserPanel.tsx",
62 "apps/web/src/components/sidebar/SidebarUpdatePill.tsx",
63 + "apps/web/src/components/ProviderUpdatesAction.tsx",
64 ] as const;
apps/web/src/components/ProviderUpdatesAction.tsx
+17 -23
@@ -1,5 +1,6 @@
1 import { PROVIDER_DISPLAY_NAMES } from "@t3tools/contracts";
2 -import { useMemo, useRef, useState } from "react";
2 +import { settlePromise } from "@t3tools/client-runtime/state/runtime";
3 +import { useRef, useState } from "react";
4
5 import { useEnvironments } from "~/state/environments";
6 import { serverEnvironment } from "~/state/server";
@@ -19,22 +20,18 @@ export function useProviderUpdates() {
20 const updateProvider = useAtomCommand(serverEnvironment.updateProvider, {
21 reportFailure: false,
22 });
22 - const machines = useMemo(
23 - () =>
24 - environments.flatMap((environment) => {
25 - const providers = environment.serverConfig?.providers ?? [];
26 - if (environment.connection.phase !== "connected") {
27 - return [];
28 - }
29 - const candidates = collectProviderUpdateCandidates(providers).filter((candidate) =>
30 - canOneClickUpdateProviderCandidate(candidate, providers),
31 - );
32 - return candidates.length > 0
33 - ? [{ environmentId: environment.environmentId, label: environment.label, candidates }]
34 - : [];
35 - }),
36 - [environments],
37 - );
23 + const machines = environments.flatMap((environment) => {
24 + const providers = environment.serverConfig?.providers ?? [];
25 + if (environment.connection.phase !== "connected") {
26 + return [];
27 + }
28 + const candidates = collectProviderUpdateCandidates(providers).filter((candidate) =>
29 + canOneClickUpdateProviderCandidate(candidate, providers),
30 + );
31 + return candidates.length > 0
32 + ? [{ environmentId: environment.environmentId, label: environment.label, candidates }]
33 + : [];
34 + });
35
36 const updateAll = async ({ quiet = false }: { readonly quiet?: boolean } = {}) => {
37 const runs = await Promise.all(
@@ -78,12 +75,9 @@ export function ProviderUpdatesAction() {
75 if (pending.current) return;
76 pending.current = true;
77 setIsPending(true);
81 - try {
82 - await updateAll();
83 - } finally {
84 - pending.current = false;
85 - setIsPending(false);
86 - }
78 + await settlePromise(() => updateAll());
79 + pending.current = false;
80 + setIsPending(false);
81 };
82
83 return (