LibreChat/client/src
Danny Avila 60eba76375
Some checks are pending
Docker Dev Branch Images Build / build (Dockerfile, lc-dev, node) (push) Waiting to run
Docker Dev Branch Images Build / build (Dockerfile.multi, lc-dev-api, api-build) (push) Waiting to run
GitNexus Index / index (push) Waiting to run
GitNexus Index / post-index (push) Blocked by required conditions
🫙 fix: Preserve Loaded Message Content When Resume Snapshot Is Empty (#14399)
* 🛟 fix: Keep Loaded Message Content When a Resume Snapshot Is Empty

The sync handler guarded on `data.resumeState?.aggregatedContent` and then
assigned it unconditionally. An empty array is truthy, so a resume snapshot
carrying no content overwrote the content the messages query had already
loaded, leaving the message rendering as a bare cursor with no way to recover.

Treat an empty snapshot as non-authoritative: keep the loaded content and let
live deltas take over. A snapshot that carries content still wins, unchanged.

This is defense in depth rather than a root cause. A resume snapshot goes empty
when the conversation's job is replaced mid-flight (#14348) — because
`streamId === conversationId`, a second submission calls `createJob` on the same
key while the first run is still streaming. With this change that failure
degrades to stale-but-visible instead of destroying content already on screen.

* 🔒 fix: Scope Resume Content Preservation to Identity-Matched Responses

Codex P2: on a regenerate reload before the new run aggregated anything, the
server reports an empty snapshot under a response id not yet in the loaded
history. The parent-based fallback then lands on the answer being REPLACED, and
preserving its content seeded `syncStepMessage` with the stale response, so the
regenerated run's deltas appended to it instead of starting blank.

Preserve loaded content only when the row was matched by the server's declared
`responseMessageId` — the sole case proving the row belongs to this generation.
A fallback-matched row keeps the previous clear-on-empty behavior.

* 🧱 fix: Only Preserve Resume Content When the Row Actually Has Parts

A matched row with no `content` array would have been assigned `undefined`
instead of the snapshot's array. `MultiMessage` branches on `message.content`
truthiness to pick its renderer, and `[]` is truthy while `undefined` is not, so
that would have silently switched a streaming row from the content-parts
renderer to the text one.

Preserve only when the loaded row has a non-empty content array — the case the
guard exists for. Narrows the divergence from prior behavior further: it now
applies solely when there is real content to protect.
2026-07-23 08:22:17 -04:00
..
@types ⚙️ refactor: Lazy load locale resources (#13640) 2026-06-10 08:48:58 -04:00
a11y 👷 ci: Type-check the Client Workspace (#13560) 2026-06-06 18:40:31 -04:00
common 🧪 feat: stateful_code_sessions capability for warm Code API sandbox sessions (experimental) (#14150) 2026-07-12 08:12:04 -04:00
components 📌 fix: Pin Scroll-to-Bottom Rib in Message Nav (#14397) 2026-07-22 22:13:29 -04:00
constants
data-provider 🛟 fix: Keep File Uploads Alive With SSE Heartbeats (#14295) 2026-07-21 19:27:09 -04:00
hooks 🫙 fix: Preserve Loaded Message Content When Resume Snapshot Is Empty (#14399) 2026-07-23 08:22:17 -04:00
lib/rum 📡 feat: add rum browser page-load diagnostics (#14106) 2026-07-05 11:32:53 -04:00
locales 🧵 feat: Native Background Execution for Code Interpreter Tools (#14386) 2026-07-22 22:13:15 -04:00
polyfills chore: Upgrade Vite For Node 24 (#13450) 2026-06-01 15:47:58 -04:00
Providers 🙋 feat: ask_user_question - agent-initiated questions with durable pause/resume (#14139) 2026-07-08 15:31:05 -04:00
routes 🪟 perf: Virtualize Search Results and Stop the Per-Query Remount (#14352) 2026-07-22 04:26:47 -04:00
store 🫧 feat: Float In-Flight Steers Over the Thread with Collapsible Content (#14365) 2026-07-21 11:43:06 -04:00
utils 🧵 feat: Native Background Execution for Code Interpreter Tools (#14386) 2026-07-22 22:13:15 -04:00
App.jsx 🧰 feat: Redesign Agent Builder with Unified Tools Marketplace, Skills & Orchestration (#13952) 2026-07-05 11:30:12 -04:00
main.jsx 🛟 fix: Auto-Recover from Stale Service Worker Assets After Deploys (#13686) 2026-06-11 11:57:06 -04:00
mobile.css 🎨 refactor: Redesign Sidebar with Unified Icon Strip Layout (#12013) 2026-03-22 01:15:20 -04:00
style.css 🧰 feat: Redesign Agent Builder with Unified Tools Marketplace, Skills & Orchestration (#13952) 2026-07-05 11:30:12 -04:00
vite-env.d.ts