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

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

perf(web): the worktree base branch picker compiles without manual memoization (#20634)

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

Julius Marminge committed Oct 16, 2026 at 21:58 UTC f99d12b5e5776a9bd7c629ec72dbe8764607a6d0
1 file changed +2 -5
apps/web/src/components/WorktreeBaseBranchPicker.tsx
+2 -5
@@ -1,6 +1,6 @@
1 import type { EnvironmentId } from "@t3tools/contracts";
2 import { ChevronDownIcon, GitBranchIcon } from "lucide-react";
3 -import { useDeferredValue, useMemo, useState } from "react";
3 +import { useDeferredValue, useState } from "react";
4
5 import { usePaginatedBranches } from "../state/queries";
6 import { useEnvironmentQuery } from "../state/query";
@@ -56,10 +56,7 @@ export function WorktreeBaseBranchPicker({
56 resolvedActiveBranchIsRemote: selectedRef ? selectedRef.isRemote === true : null,
57 startFromOrigin,
58 });
59 - const branchByName = useMemo(
60 - () => new Map(branches.refs.map((branch) => [branch.name, branch])),
61 - [branches.refs],
62 - );
59 + const branchByName = new Map(branches.refs.map((branch) => [branch.name, branch]));
60 const items = [...branchByName.keys()];
61 const hasNextPage = branches.data?.nextCursor != null;
62 const statusText =