LibreChat/client/src/components/Messages
Danny Avila b341f93805
Some checks are pending
Docker Dev Images Build / publish (push) Waiting to run
Sync Helm Chart Tags / Ignore non-main push (push) Waiting to run
Sync Helm Chart Tags / Sync chart tags (push) Waiting to run
🏎️ perf: Re-render Only the Tail Rows When a Message Is Sent (#16572)
Every send moved the thread's tail (isSubmitting, latestMessageId,
latestMessageDepth, and a handleContinue rebound per turn), and the memoized
row context listed all of them as dependencies, so each move handed every row
a new context object and re-rendered the whole thread: three commits of
~12,000 component renders on a 246-message thread, one of them inside the
Enter keypress.

- Keep the row context object stable; the tail values are ref-backed getters
  for call-time reads, and rows receive them as props that the row comparator
  (isSameTailRelation) only reacts to when the row enters or leaves the tail.
- Fork reads the split target through a getter at click time.
- HoverButtons subscribes to a boolean isSubmitting context and a stable
  operations context instead of the combined messages-view context; Fork and
  Feedback are memoized so the per-send toolbar pass stops there.
- Make handleContinue referentially stable.
- Cache the Intl formatters behind getMessageTimestamp per locale and clock.
- Add a submit-lag benchmark (e2e/benchmarks-tree) that reports long tasks,
  Enter-to-row latency, a CPU profile and per-commit render reasons.
2026-09-30 10:19:49 -04:00
..
__tests__ 🏎️ perf: Re-render Only the Tail Rows When a Message Is Sent (#16572) 2026-09-30 10:19:49 -04:00
Content 📡 fix: Explain Model Streams That Die Mid-Response (#16415) 2026-09-27 15:21:20 -04:00
ContentRender.tsx 🏎️ perf: Re-render Only the Tail Rows When a Message Is Sent (#16572) 2026-09-30 10:19:49 -04:00
MessageContent.tsx 🏎️ perf: Re-render Only the Tail Rows When a Message Is Sent (#16572) 2026-09-30 10:19:49 -04:00
ScrollToBottom.tsx 🫣 fix: Hide Scroll-to-Bottom Under Composer Panels (#15746) 2026-09-08 13:33:44 -04:00