Skip to content

Commit df06bf3

Browse files
perf(web): the archived threads hook compiles without manual memoization
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 70d60e0 commit df06bf3

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

‎apps/web/reactCompiledFiles.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,5 @@ export const REACT_COMPILED_FILES = [
9696
"apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx",
9797
"apps/web/src/components/ThreadTerminalDrawer.tsx",
9898
"apps/web/src/components/settings/SettingsPanels.tsx",
99+
"apps/web/src/lib/archivedThreadsState.ts",
99100
] as const;

‎apps/web/src/lib/archivedThreadsState.ts‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
makeArchivedThreadsEnvironmentKey,
66
} from "@t3tools/client-runtime/state/threads";
77
import type { EnvironmentId } from "@t3tools/contracts";
8-
import { useCallback, useMemo } from "react";
98

109
import { orchestrationEnvironment } from "../state/orchestration";
1110
import { appAtomRegistry } from "../rpc/atomRegistry";
@@ -32,16 +31,13 @@ export function useArchivedThreadSnapshots(environmentIds: ReadonlyArray<Environ
3231
readonly isLoading: boolean;
3332
readonly refresh: () => void;
3433
} {
35-
const environmentKey = useMemo(
36-
() => makeArchivedThreadsEnvironmentKey(environmentIds),
37-
[environmentIds],
38-
);
34+
const environmentKey = makeArchivedThreadsEnvironmentKey(environmentIds);
3935
const result = useAtomValue(archivedSnapshotsAtom(environmentKey));
40-
const refresh = useCallback(() => {
36+
const refresh = () => {
4137
for (const environmentId of environmentIds) {
4238
appAtomRegistry.refresh(archivedSnapshotAtom(environmentId));
4339
}
44-
}, [environmentIds]);
40+
};
4541

4642
return {
4743
...result,

0 commit comments

Comments
 (0)