The best way to control Claude Code, Codex and more from any computer or phone
perf(web): device host connection checks compile with the React Compiler (#20501)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Oct 16, 2026 at 18:53 UTC
a72d1fcc5a89b3576cccaa6f062ba7cda1589fc5
2 files changed
+21
-24
apps/web/reactCompiledFiles.ts
+1
@@ -76,4 +76,5 @@ export const REACT_COMPILED_FILES = [
76
"apps/web/src/components/settings/SourceControlHostSettings.tsx",
77
"apps/web/src/components/settings/UsageProviderSettings.tsx",
78
"apps/web/src/components/settings/TelemetryExportSettings.tsx",
79
+ "apps/web/src/components/settings/useHostConnectionChecks.ts",
80
] as const;
apps/web/src/components/settings/useHostConnectionChecks.ts
+20
-24
@@ -22,30 +22,26 @@ export function useHostConnectionChecks(targets: ReadonlyArray<DeviceHostCheckTa
22
running.current.add(key);
23
setChecks((current) => ({ ...current, [key]: {} }));
24
const results: Record<string, DeviceHostCheck> = {};
25
- try {
26
- await checkDeviceHostConnections(
27
- targets,
28
- host,
29
- async (environmentId, input) => {
30
- if (!readEnvironmentScope(environmentId, AuthSettingsWriteScope)) {
31
- throw new Error("This connection cannot test device hosts.");
32
- }
33
- const result = await test({ environmentId, input });
34
- if (result._tag === "Failure") throw new Error(Cause.pretty(result.cause));
35
- return result.value;
36
- },
37
- (environmentId, result) => {
38
- results[environmentId] = result;
39
- setChecks((current) => ({
40
- ...current,
41
- [key]: { ...current[key], [environmentId]: result },
42
- }));
43
- },
44
- );
45
- return results;
46
- } finally {
47
- running.current.delete(key);
48
- }
25
+ await checkDeviceHostConnections(
26
+ targets,
27
+ host,
28
+ async (environmentId, input) => {
29
+ if (!readEnvironmentScope(environmentId, AuthSettingsWriteScope)) {
30
+ throw new Error("This connection cannot test device hosts.");
31
+ }
32
+ const result = await test({ environmentId, input });
33
+ if (result._tag === "Failure") throw new Error(Cause.pretty(result.cause));
34
+ return result.value;
35
+ },
36
+ (environmentId, result) => {
37
+ results[environmentId] = result;
38
+ setChecks((current) => ({
39
+ ...current,
40
+ [key]: { ...current[key], [environmentId]: result },
41
+ }));
42
+ },
43
+ ).finally(() => running.current.delete(key));
44
+ return results;
45
};
46
return { checks, testConnection };
47
}