Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): stop remounting markdown on every activity delta #9306

Mergedjuliusmarmingemerged 1 commit intomain fromrefs/pull/9306/headmerged by juliusmarminge View on GitHub

Showing 1 changed file with 6 additions and 1 deletion.

x
0 of 1 viewed, 1 left
6 additions and 1 deletionapps/web/src/components/chat/MessagesTimeline.tsxModified
View file
@@ -626,7 +626,11 @@
listRef,
timestampFormat,
routeThreadKey,
- threadRef: parseScopedThreadKey(routeThreadKey),
+ // Must be referentially stable: ChatMarkdown keys its react-markdown
+ // component map on threadRef, and a fresh object here remounts every
+ // rendered markdown node whenever this memo recomputes (e.g. on each
+ // activity delta while the thread is working).
+ threadRef: citationThreadRef,
markdownCwd,
resolvedTheme,
workspaceRoot,
@@ -650,6 +654,7 @@
listRef,
timestampFormat,
routeThreadKey,
+ citationThreadRef,
markdownCwd,
resolvedTheme,
workspaceRoot,