You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf(mothership): restore static markdown parse for settled chat messages
Settled/reloaded chat messages rendered through Streamdown's streaming
parser (remend + incomplete-markdown repair + per-block re-parse, running
the rehype raw/sanitize/harden chain once per block). Because rows are
virtualized, every up/down scroll remounted the messages crossing the
overscan boundary and re-paid that N-block cost — the scroll lag.
- Render never-streamed mounts (reloaded history, or an in-session message
scrolled out of the virtualized window and back) with mode='static': one
whole-document parse instead of streaming's per-block re-parse. In-session
streaming keeps the streaming parser for its mount life (no drain flash).
- Cache Prism highlight output in a module-level bounded LRU so a code block
re-highlights at most once across the unmount/remount virtualization does
on scroll (a component useMemo would not survive the unmount).
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/chat-content/chat-content.tsx
0 commit comments