The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 23, 06:45 UTC
perf(web): the guide tour compiles without manual memoization (#20563)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Oct 16, 2026 at 22:06 UTC
63318a5d817871deeecb6e7a58ecff7cba52b1d9
1 file changed
+8
-12
apps/web/src/components/pullRequest/guide/GuideTour.tsx
+8
-12
@@ -1,5 +1,5 @@
1
import type { EnvironmentId, PullRequestRef, PullRequestReviewGuide } from "@t3tools/contracts";
2
-import { useEffect, useEffectEvent, useMemo, useRef, useState, type ReactNode } from "react";
2
+import { useEffect, useEffectEvent, useRef, useState, type ReactNode } from "react";
3
4
import { createPullRequestDiffFileContentsLoader } from "~/lib/diffFileContents";
5
import { isEditableFocused } from "~/lib/editableFocus";
@@ -52,7 +52,7 @@ export function GuideTour({
52
const position = Math.max(Math.min(tour.position, stopCount - 1), 0);
53
const stop = guide.stops[position] ?? null;
54
55
- const wantedPaths = useMemo(() => (stop === null ? [] : stopFilePaths(stop)), [stop]);
55
+ const wantedPaths = stop === null ? [] : stopFilePaths(stop);
56
const diff = useGuideDiffFiles({
57
environmentId,
58
reference,
@@ -60,16 +60,12 @@ export function GuideTour({
60
wantedPaths,
61
});
62
const getDiffFileContents = useAtomCommand(pullRequestEnvironment.diffFileContents);
63
- const loadDiffFiles = useMemo(
64
- () =>
65
- createPullRequestDiffFileContentsLoader(getDiffFileContents, {
66
- environmentId,
67
- reference,
68
- commit: null,
69
- cacheKey: `pull-request-guide:${key}`,
70
- }),
71
- [environmentId, getDiffFileContents, key, reference],
72
- );
63
+ const loadDiffFiles = createPullRequestDiffFileContentsLoader(getDiffFileContents, {
64
+ environmentId,
65
+ reference,
66
+ commit: null,
67
+ cacheKey: `pull-request-guide:${key}`,
68
+ });
69
70
const scrollRef = useRef<HTMLDivElement>(null);
71
const goTo = (next: number) => {