@devries-cameron20 / t3code-1 / commits / 99fac2687d
Fork 0

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

perf(web): the code view file reveal hook compiles without manual memoization (#20659)

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

Julius Marminge committed Oct 16, 2026 at 21:56 UTC 99fac2687d43d50d523b440b06f20750c362f06b
1 file changed +2 -2
apps/web/src/components/diffs/useCodeViewFileReveal.ts
+2 -2
@@ -1,5 +1,5 @@
1 import type { CodeViewScrollTarget } from "@pierre/diffs";
2 -import { useCallback, useEffect, useRef, useState } from "react";
2 +import { useEffect, useRef, useState } from "react";
3
4 interface FileRevealHandle {
5 getInstance(): object | undefined;
@@ -27,5 +27,5 @@ export function useCodeViewFileReveal<TScope>(
27 handledRequest.current = request;
28 }, [request, scope, viewer, readyFileKeys]);
29
30 - return useCallback((fileKey: string) => setRequest({ fileKey, scope }), [scope]);
30 + return (fileKey: string) => setRequest({ fileKey, scope });
31 }