LibreChat/client
Danny Avila fb3d77d52a
🧭 fix: Close the Product Races Behind Four Retried Run Scenarios (#18060)
* 🪪 fix: Apply a Builder Agent Selection Before the Agents Catalog Loads

The agent builder's Select button starts a chat with the agent its form holds. `useSelectAgent` first looked that agent up in the agents map and returned silently when it was missing. Since #17692 the map is a deferred catalog, released on browser idle (at most about 2.75 s after first paint on a busy main thread), so a click that landed earlier did nothing and the next message went to whatever model was selected before.

An unloaded map now reads as unknown instead of as a missing agent: the builder already loaded the agent it offers, so only a loaded map can refuse the pick. Selecting also releases the agents catalog, which the header and composer need to name the agent.

This is what made `tool-approvals.spec.ts` and `run-files-lifecycle.spec.ts` pass only on a retry: in every recorded failure the builder click preceded the agents map request and the message was sent to the default model spec.

* 📡 test: Read the Subagent Activity Stream Without Depending on How It Closes

The shared-panel scenario waited for the activity stream's `requestfinished` event and then read the response body. Both need the server to close the stream first. The panel also closes it: it stops listening as soon as the durable thread reports the task terminal, and the server persists that status before it writes the stream's final frame. When a thread poll landed in between, the browser reported the request as aborted, `requestfinished` never fired and the body was no longer readable.

The scenario now counts the stream as ended on either event and reads what the stream delivered from the page's own request, so it asserts the same live updates whichever side closes first.

* 🚏 fix: Send a Queued Message Started in a New Chat After the Source Run Releases the Composer

"Start in a new chat" on a queued message navigates to `/c/new?prompt=…&submit=true` while the source conversation is still generating. The URL auto-submit could fire in the few tens of milliseconds between the composer dropping that run and the next commit: `ask` still saw the composer as submitting and refused, and the auto-submit, which is spent on its first attempt, cleared the URL with nothing sent. The row had already left the queue, so the message was gone from the page.

A new chat has no run of its own, so the auto-submit now waits there until an effect has observed the composer idle, then sends. Existing conversations keep the current behaviour: a prompt arriving during their own run stays in the composer.
2026-11-11 16:22:22 -05:00
..
public
src 🧭 fix: Close the Product Races Behind Four Retried Run Scenarios (#18060) 2026-11-11 16:22:22 -05:00
sw
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.cjs 🧹 chore: Clear the Whole-Repo Lint Errors on Dev (#17702) 2026-11-01 01:23:47 +01:00
check_updates.sh
index.html
jest.config.cjs
jest.resolver.cjs
nginx.conf
package.json
postcss.config.cjs
tailwind.config.cjs 📊 refactor: Move the Context Usage Popover Into @librechat/chat (#17799) 2026-11-05 22:36:51 +01:00
tsconfig.json
vite.config.ts 🪶 perf: Load MCP UI and Export Libraries on Demand (#17975) 2026-11-10 19:20:22 +01:00