mirror of
https://github.com/alphaXiv/OpenResearch.git
synced 2026-11-11 09:59:34 +08:00
* Stop composer keystrokes from re-rendering the whole transcript Typing in the composer was laggy on long conversations: the draft state lives in ChatPanel, which also rendered the transcript inline, so every keystroke re-ran the full component body, re-filtered every message, and allocated + memo-compared all N Message elements (doubled by StrictMode in dev). PR #111 fixed the streaming path but left the typing path. - Extract the transcript map into a module-level memoized Transcript component; all its props are referentially stable across keystrokes, so typing now costs one shallow compare instead of O(messages) work. - Memoize the waiting-session scan (ran per session row per render, iterating messages x parts) into a useMemo'd Set keyed on reducer state, which only changes on SSE dispatches. * Review nits: mirror Message's onRespond type, state memo constraint * Ship rebuilt ui/dist; bump to v0.1.74