authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-09-02 19:01:00-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-02 19:01:00-07:00
log355fbd96d5e90b52961ac5f1e035112fc3bad4a9
tree53dd918a372d1c0617f1b4c84032e350a57121a2
parentef6cc0b362019f32152470ed96c1aa1b813fb7f6
signature Signed by PGP key B5690EEEBB952194

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

Co-authored-by: Claude Code <noreply@anthropic.com>

1 files changed, 6 insertions(+), 1 deletions(-)

apps/web/src/components/chat/MessagesTimeline.tsx+6-1
...@@ -623,7 +623,11 @@ export const MessagesTimeline = memo(function MessagesTimeline({...@@ -623,7 +623,11 @@ export const MessagesTimeline = memo(function MessagesTimeline({
623 listRef,623 listRef,
624 timestampFormat,624 timestampFormat,
625 routeThreadKey,625 routeThreadKey,
626 threadRef: parseScopedThreadKey(routeThreadKey),626 // Must be referentially stable: ChatMarkdown keys its react-markdown
627 // component map on threadRef, and a fresh object here remounts every
628 // rendered markdown node whenever this memo recomputes (e.g. on each
629 // activity delta while the thread is working).
630 threadRef: citationThreadRef,
627 markdownCwd,631 markdownCwd,
628 resolvedTheme,632 resolvedTheme,
629 workspaceRoot,633 workspaceRoot,
...@@ -648,6 +652,7 @@ export const MessagesTimeline = memo(function MessagesTimeline({...@@ -648,6 +652,7 @@ export const MessagesTimeline = memo(function MessagesTimeline({
648 listRef,652 listRef,
649 timestampFormat,653 timestampFormat,
650 routeThreadKey,654 routeThreadKey,
655 citationThreadRef,
651 markdownCwd,656 markdownCwd,
652 resolvedTheme,657 resolvedTheme,
653 workspaceRoot,658 workspaceRoot,