LibreChat/client
Danny Avila bd1df30b7d
🔒 fix: Scope, Cap, and De-Execute the In-Flight Steer Stack (#14310)
* 🔒 fix: Scope, Cap, and De-Execute the In-Flight Steer Stack

Codex review on 9594ee7146. Three valid P2s, all fallout from moving the
steers out of the message region into the composer.

- Run scope: the in-thread slot was gated on `effectiveIsSubmitting`, but
  the new one only checked `steering.enabled` (= steerable endpoint +
  primary composer), which is true with no run in flight. A chip that
  outlives its run — cancel's onError restoring one the final event
  already converted to a queued follow-up — stranded a bubble above the
  composer, possibly beside the queued row for the same text. Restores
  the run gate.
- Height cap: a steer runs to 16k chars (DEFAULT_STEER_MAX_LENGTH) and a
  run takes up to 10 (STEER_QUEUE_MAX_DEPTH). Unbounded in the composer,
  that pushes the input off-screen; the old slot could grow freely
  because it scrolled with the thread. Caps the stack at 35vh.
- Code execution: MarkdownLite defaults `codeExecution` on, but this
  bubble renders outside MessageContext, so Run Code would fire the tool
  mutation with no messageId and an empty conversationId. Passes
  codeExecution={false} — a provisional steer has nothing to run against.

* 📜 fix: Keep the Newest In-Flight Steer in View

Codex review on de9ede2aad. Valid, and a regression from the 35vh cap in
the previous commit: steers append newest-last, so once the stack
overflows it sits scrolled to the OLDEST entry. The steer just submitted
— and its cancel control — lands below the fold and reads as dropped.

The cap traded "composer pushed off-screen" for "newest steer hidden".
Sticks the stack to the bottom, keyed on the newest steer id so it fires
when one is appended rather than on every render.

* 🧹 fix: Don't Restore a Steer That Already Settled

Codex review on 09c93987a. Valid, and it closes the hole the run gate
only hid — I deferred this two rounds ago as pre-existing, which was
wrong: the gate hides a stale entry while the run is idle, but
useQueueDrain auto-sends the queued follow-up, isSubmitting flips back
to true, and the previous run's entry renders as an in-flight bubble
beside its own queued copy.

Fixes it at the source instead: cancel's onError no longer restores a
steer whose id is in appliedSteerIdsByConvoId — the settled set, stamped
by both the apply path and the run-end conversion, and deliberately
capped rather than cleared so it survives run end for exactly this race
(same instrument as #14276).

The run gate stays: it's parity with the in-thread slot's
effectiveIsSubmitting and still defends against any other leak.
2026-07-16 11:14:29 -04:00
..
public 🎨 chore: Update Agent Tool with new SVG assets (#12065) 2026-03-04 09:28:19 -05:00
scripts
src 🔒 fix: Scope, Cap, and De-Execute the In-Flight Steer Stack (#14310) 2026-07-16 11:14:29 -04:00
sw 🛟 fix: Auto-Recover from Stale Service Worker Assets After Deploys (#13686) 2026-06-11 11:57:06 -04:00
test 🧰 feat: Redesign Agent Builder with Unified Tools Marketplace, Skills & Orchestration (#13952) 2026-07-05 11:30:12 -04:00
babel.config.cjs 🧑‍🎨 refactor: Prompts/Sidebar styles for improved UI Consistency (#12426) 2026-04-09 00:02:31 -04:00
check_updates.sh
index.html 📡 feat: add rum browser page-load diagnostics (#14106) 2026-07-05 11:32:53 -04:00
jest.config.cjs ⬆️ chore: Migrate off deprecated @ariakit/react-core to @ariakit/react-components (#13940) 2026-06-24 23:13:57 -04:00
jest.resolver.cjs ⬆️ chore: Migrate off deprecated @ariakit/react-core to @ariakit/react-components (#13940) 2026-06-24 23:13:57 -04:00
nginx.conf 🐳 feat: Bundle Admin Panel in Docker Compose Stacks (#13876) 2026-06-22 16:59:08 -04:00
package.json 📡 feat: add rum browser page-load diagnostics (#14106) 2026-07-05 11:32:53 -04:00
postcss.config.cjs
tailwind.config.cjs ⌨️ feat: Keyboard Shortcuts (#12425) 2026-06-22 17:02:46 -04:00
tsconfig.json 👷 ci: Type-check the Client Workspace (#13560) 2026-06-06 18:40:31 -04:00
vite.config.ts 🛟 fix: Auto-Recover from Stale Service Worker Assets After Deploys (#13686) 2026-06-11 11:57:06 -04:00