The best way to control Claude Code, Codex and more from any computer or phone
perf(web): the add provider dialog compiles without manual memoization (#20578)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Oct 16, 2026 at 22:05 UTC
a793011879c0c1f6a6cbf9d28e264534b2c3c3ba
1 file changed
+7
-9
apps/web/src/components/settings/AddProviderInstanceDialog.tsx
+7
-9
@@ -4,7 +4,7 @@ import { ProviderInstanceIcon } from "../chat/ProviderInstanceIcon";
4
5
import { Radio as RadioPrimitive } from "@base-ui/react/radio";
6
import { CheckIcon } from "lucide-react";
7
-import { useMemo, useState } from "react";
7
+import { useState } from "react";
8
import { squashAtomCommandFailure } from "@t3tools/client-runtime/state/runtime";
9
import {
10
type AcpRegistrySearchAgent,
@@ -131,10 +131,11 @@ export function AddProviderInstanceDialog({
131
132
// Codex and Claude run at their default slots before they are configured, so
133
// those ids stay reserved; other unconfigured default slots are free to take.
134
- const existingIds = useMemo(
135
- () => new Set(["codex", "claudeAgent", ...Object.keys(settings.providerInstances ?? {})]),
136
- [settings.providerInstances],
137
- );
134
+ const existingIds = new Set([
135
+ "codex",
136
+ "claudeAgent",
137
+ ...Object.keys(settings.providerInstances ?? {}),
138
+ ]);
139
140
const driverOption = providerClients.get(driver) ?? DEFAULT_DRIVER_OPTION;
141
const isAcpRegistry = driver === ACP_REGISTRY_DRIVER_KIND;
@@ -156,10 +157,7 @@ export function AddProviderInstanceDialog({
157
label,
158
existingIds,
159
);
159
- const driverSettingsFields = useMemo(
160
- () => deriveProviderSettingsFields(driverOption),
161
- [driverOption],
162
- );
160
+ const driverSettingsFields = deriveProviderSettingsFields(driverOption);
161
const instanceIdError = validateInstanceId(instanceId, existingIds);
162
const showInstanceIdError = hasAttemptedSubmit && instanceIdError !== null;
163
const identityStep = 1;