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, 08:00 UTC
perf(web): the pull request label and reviewer pickers compile without manual memoization (#20719)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Oct 16, 2026 at 21:46 UTC
f1dccf2d1b59609f59d2458bdf0b153e0c430bb0
2 files changed
+6
-8
apps/web/src/components/pullRequest/PullRequestLabelPicker.tsx
+3
-4
@@ -1,7 +1,7 @@
1
import { useAtomCommand } from "~/state/use-atom-command";
2
import type { EnvironmentId, PullRequestLabelCandidate, PullRequestRef } from "@t3tools/contracts";
3
import { CheckIcon, TagIcon } from "lucide-react";
4
-import { useMemo, useState } from "react";
4
+import { useState } from "react";
5
6
import { pullRequestEnvironment } from "~/state/pullRequests";
7
import { useEnvironmentQuery } from "~/state/query";
@@ -41,9 +41,8 @@ export function PullRequestLabelPicker({
41
reportFailure: false,
42
});
43
44
- const candidates = useMemo(
45
- () => (candidatesQuery.data?.candidates ?? []).filter((entry) => matches(entry, query)),
46
- [candidatesQuery.data, query],
44
+ const candidates = (candidatesQuery.data?.candidates ?? []).filter((entry) =>
45
+ matches(entry, query),
46
);
47
48
const toggle = async (candidate: PullRequestLabelCandidate) => {
apps/web/src/components/pullRequest/PullRequestReviewerPicker.tsx
+3
-4
@@ -5,7 +5,7 @@ import type {
5
PullRequestReviewerCandidate,
6
} from "@t3tools/contracts";
7
import { CheckIcon, UserPlusIcon } from "lucide-react";
8
-import { useMemo, useState } from "react";
8
+import { useState } from "react";
9
10
import { pullRequestEnvironment } from "~/state/pullRequests";
11
import { useEnvironmentQuery } from "~/state/query";
@@ -45,9 +45,8 @@ export function PullRequestReviewerPicker({
45
reportFailure: false,
46
});
47
48
- const candidates = useMemo(
49
- () => (candidatesQuery.data?.candidates ?? []).filter((entry) => matches(entry, query)),
50
- [candidatesQuery.data, query],
48
+ const candidates = (candidatesQuery.data?.candidates ?? []).filter((entry) =>
49
+ matches(entry, query),
50
);
51
52
const toggle = async (candidate: PullRequestReviewerCandidate) => {