LibreChat/packages/chat
Danny Avila fd0ea884e0
🧶 fix: Close Two Stream Races That Untraced Mock E2E Attempts Expose (#18075)
* 👁️ fix: Hold the Seen Check's History Refetch While a Run Streams

The seen check revalidates a conversation's history when the list reports a reply that no fetch has shown yet, and it asked for that refetch whenever the messages query was idle, including under a run the pane is attached to.

A resumed run writes its response into the cache from the stream's sync. A refetch that starts after that sync returns the stored row for the same message, and the cache takes it because both lists are the same length, so the live response is replaced by what was persisted when the run began until the stream's next event rewrites it. A manual compaction resumed after a reload shows it for as long as the summarizer takes: its stored row is an empty summary part with no running marker, so "Summarizing..." disappears and nothing stands in for it.

The refetch now waits while a run is in flight. The check already re-runs when the run ends, which is when revalidating is safe.

* 🧪 test: Wait for the Late Subagent File's Stream Before Reading Its Turn as Over

Stop is withheld between a turn's admission and its stream attaching: no generation epoch exists yet for it to stop. The scenario read Stop's absence right after the POST as the end of the turn, then asserted without waiting that its route had injected the late file into that stream. When the check ran inside that interval the stream had not been requested yet, so the assertion failed on a turn that went on to deliver the file.

It now waits for the reply only the stream carries, then for Stop to go.
2026-11-12 07:20:10 -05:00
..
src 🧶 fix: Close Two Stream Races That Untraced Mock E2E Attempts Expose (#18075) 2026-11-12 07:20:10 -05:00
test 🪟 feat: Add Welcome Footer and Response Author Options and Tidy the Chat Chrome (#17879) 2026-11-08 14:57:59 +01:00
babel.config.js
components.json 🎛️ refactor: Move Composer Leaf Controls and Steering Into the Chat Package (#17521) 2026-10-28 13:27:38 +01:00
jest.config.js 🚦 refactor: Move the Composer Queue Rail Into the Chat Package (#17685) 2026-11-01 01:25:34 +01:00
jest.polyfills.js 🧵 refactor: Render the Package Message List by Default in ChatScreen (#17753) 2026-11-05 22:35:15 +01:00
package.json 🚦 refactor: Move the Composer Queue Rail Into the Chat Package (#17685) 2026-11-01 01:25:34 +01:00
tsconfig.json 📝 refactor: Move Text-Like Message Parts Into @librechat/chat (#17087) 2026-10-14 18:05:48 +02:00
tsdown.config.mjs