Files
OpenResearch/ui
Daniel Kim cef4881032 Stop composer keystrokes from re-rendering the whole transcript (v0.1.74) (#113)
* 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
2026-07-22 13:59:37 -07:00
..
2026-07-06 20:05:41 -07:00
2026-07-06 20:05:41 -07:00
2026-07-06 20:05:41 -07:00