Skip to content

Commit cf316ad

Browse files
perf(web): the preview mini player compiles without manual memoization
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 70d60e0 commit cf316ad

2 files changed

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

‎apps/web/src/components/preview/ThreadPreviewMiniPlayer.tsx‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { PanelRightIcon, PictureInPicture2, XIcon } from "lucide-react";
55
import {
66
type PointerEvent as ReactPointerEvent,
77
type ReactNode,
8-
useCallback,
98
useEffect,
109
useLayoutEffect,
1110
useRef,
@@ -264,10 +263,8 @@ function DeviceMiniPlayer({
264263
);
265264
const hostLabel =
266265
deviceState.hosts.find((host) => host.id === source.hostId)?.label ?? "Device host";
267-
const cornerRadius = useCallback(
268-
(player: PreviewMiniPlayerSize) => resolveDeviceMiniPlayerCornerRadius(source.platform, player),
269-
[source.platform],
270-
);
266+
const cornerRadius = (player: PreviewMiniPlayerSize) =>
267+
resolveDeviceMiniPlayerCornerRadius(source.platform, player);
271268

272269
const openInPanel = () => {
273270
usePreviewMiniPlayerStore.getState().close(threadRef);

0 commit comments

Comments
 (0)