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

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

perf(web): update everything compiles without manual memoization (#20693)

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

Julius Marminge committed Oct 16, 2026 at 21:49 UTC c712852d96ddc896cc347453916d134c3fdeeeb5
1 file changed +14 -19
apps/web/src/components/sidebar/useUpdateEverything.ts
+14 -19
@@ -1,7 +1,6 @@
1 import { useAtomValue } from "@effect/atom-react";
2 import { PROVIDER_DISPLAY_NAMES } from "@t3tools/contracts";
3 import { Atom } from "effect/reactivity";
4 -import { useMemo } from "react";
4
5 import { APP_VERSION } from "~/branding";
6 import { isDesktopLocalConnectionTarget } from "~/connection/desktopLocal";
@@ -40,25 +39,21 @@ export type ReportLocalUpdateError = (title: string, description: string) => voi
39 export function useUpdateEverything(localUpdateVersion: string | null) {
40 const targetVersion = localUpdateVersion ?? APP_VERSION;
41 const { environments } = useEnvironments();
43 - const machinesAtom = useMemo(
44 - () =>
45 - Atom.make((get) =>
46 - environments.map((environment) => ({
47 - environmentId: environment.environmentId,
48 - label: environment.label,
49 - serverConfig: environment.serverConfig,
50 - connected: environment.connection.phase === "connected",
51 - hostedByThisApp:
52 - isElectron &&
53 - (environment.entry.target._tag === "PrimaryConnectionTarget" ||
54 - isDesktopLocalConnectionTarget(environment.entry.target)),
55 - canMaintain: canUpdateServer(
56 - get(environmentSession.sessionStateAtom(environment.environmentId)),
57 - ),
58 - updateState: get(serverEnvironment.updateStateAtom(environment.environmentId)),
59 - })),
42 + const machinesAtom = Atom.make((get) =>
43 + environments.map((environment) => ({
44 + environmentId: environment.environmentId,
45 + label: environment.label,
46 + serverConfig: environment.serverConfig,
47 + connected: environment.connection.phase === "connected",
48 + hostedByThisApp:
49 + isElectron &&
50 + (environment.entry.target._tag === "PrimaryConnectionTarget" ||
51 + isDesktopLocalConnectionTarget(environment.entry.target)),
52 + canMaintain: canUpdateServer(
53 + get(environmentSession.sessionStateAtom(environment.environmentId)),
54 ),
61 - [environments],
55 + updateState: get(serverEnvironment.updateStateAtom(environment.environmentId)),
56 + })),
57 );
58 const machines = useAtomValue(machinesAtom);
59 const { targets: behindServers, skipped: unreachable } = collectServerUpdateTargets(