Skip to content

Commit 742b22a

Browse files
perf(web): the proposed plan card compiles without manual memoization
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 70d60e0 commit 742b22a

2 files changed

Lines changed: 3 additions & 3 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/components/chat/ProposedPlanCard.tsx",
99100
] as const;

‎apps/web/src/components/chat/ProposedPlanCard.tsx‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { proposedPlanTitle, stripDisplayedPlanMarkdown } from "@t3tools/shared/proposedPlanText";
2-
import { memo, useCallback, useState, useId } from "react";
2+
import { memo, useState, useId } from "react";
33
import { useFindRevealRef } from "./markdownFindContext";
44
import {
55
isAtomCommandInterrupted,
@@ -85,8 +85,7 @@ export const ProposedPlanCard = memo(function ProposedPlanCard({
8585
// While finding, the full plan stays mounted but clipped, so a match past the
8686
// preview can be counted and then opened only once it is selected.
8787
const showPreview = isCollapsed && !findActive;
88-
const revealForFind = useCallback(() => setExpanded(true), []);
89-
const findRevealRef = useFindRevealRef(revealForFind);
88+
const findRevealRef = useFindRevealRef(() => setExpanded(true));
9089
const downloadFilename = buildProposedPlanMarkdownFilename(planMarkdown);
9190
const saveContents = normalizePlanMarkdownForExport(planMarkdown);
9291

0 commit comments

Comments
 (0)