Skip to content

Commit 4ede1f4

Browse files
perf(web): let the React Compiler compile MessagesTimeline
MessagesTimeline skipped compilation on render-time ref reads, a captured `++`, and a video asset memo keyed narrower than its body. The list identity snapshot, incremental row projection, stable rows and stable handoff runs now live in state adjusted during render, find-driven fold expansion happens during render instead of in an effect, and manual useMemo/useCallback are gone. The file joins REACT_COMPILED_FILES; the constructed-context-value rule is off there because the compiler memoizes those values. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent b3db3c0 commit 4ede1f4

4 files changed

Lines changed: 479 additions & 630 deletions

File tree

‎apps/web/reactCompiledFiles.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export const REACT_COMPILED_FILES = [
99
"apps/web/src/components/Sidebar.tsx",
1010
"apps/web/src/components/chat/ChatComposer.tsx",
1111
"apps/web/src/components/chat/usePendingThreadRequests.ts",
12+
"apps/web/src/components/chat/MessagesTimeline.tsx",
1213
"apps/web/src/components/chat/composerFocusRedirect.ts",
1314
"apps/web/src/components/chat/useChatShortcuts.ts",
1415
"apps/web/src/components/chat/useProjectScriptEditing.ts",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export async function resolveMarkdownMediaPreview(input: {
106106

107107
export function buildAttachmentVideoAsset(
108108
environmentId: EnvironmentId,
109-
attachment: ChatFileAttachment,
109+
attachment: Pick<ChatFileAttachment, "id" | "name" | "mimeType">,
110110
): NonNullable<MediaActionSource["asset"]> {
111111
return {
112112
environmentId,

0 commit comments

Comments
 (0)