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

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

perf(web): the resource telemetry hook compiles without manual memoization (#20619)

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

Julius Marminge committed Oct 16, 2026 at 22:00 UTC f241e7988d3d3347368c8aa32693a6b2391d7a61
1 file changed +2 -3
apps/web/src/lib/resourceTelemetryState.ts
+2 -3
@@ -6,7 +6,6 @@ import type {
6 ResourceTelemetrySnapshot,
7 } from "@t3tools/contracts";
8 import * as Cause from "effect/Cause";
9 -import { useCallback } from "react";
9
10 import { usePrimaryEnvironment } from "../state/environments";
11 import { useEnvironmentQuery } from "../state/query";
@@ -39,7 +38,7 @@ export function useResourceTelemetry(
38 const retryCommand = useAtomCommand(serverEnvironment.retryResourceTelemetry, {
39 reportFailure: false,
40 });
42 - const retry = useCallback(async () => {
41 + const retry = async () => {
42 if (environmentId === null) {
43 throw new Error("No environment is selected.");
44 }
@@ -54,7 +53,7 @@ export function useResourceTelemetry(
53 throw Cause.squash(result.cause);
54 }
55 return result.value.snapshot;
57 - }, [environmentId, retryCommand]);
56 + };
57
58 return { ...query, retry };
59 }