* 🧷 fix: Promote Unapplied Steers to Durable Queued Turns at Run End
A steer the server accepted (202) but the run never applied was handed back
in FINAL as `pendingSteers` and re-owned by the browser as a tab-local queued
message. A reload, closed tab, or a predecessor race before the drain lost it.
At terminal publication, a normally completed run now promotes such steers
into server-owned agent queued turns (parent: the ended response, epoch: the
ended generation's createdAt, chained behind any turn already queued against
that epoch). The job store hands the parked copy over atomically
(`promoteSteerLeftover`: parked item removed, receipt settled `recovered`), so
status recovery, lost-ACK retries and legacy recovery starts cannot queue the
same words again. FINAL reports the receipts in `promotedSteers`; the client
adopts them as server rows instead of converting the steer locally.
Promotion is opt-in per steer (`promoteLeftover`, sent only by clients that
adopt receipts and only for steers with no tab-only context), so older
clients keep the legacy path unchanged, and older servers simply never
report `promotedSteers`.
* 🔒 fix: Settle a Promoted Steer's Hand-Off at Admission, Not Only at FINAL
The job-store hand-off of a promoted steer now returns an outcome and stamps
the receipt with the owning queued turn, so it is idempotent for that turn.
The queued-turn resolver repeats it before admitting a promoted turn: it
completes a hand-off a crash interrupted, and cancels the turn when the
parked copy was discarded or recovered elsewhere, so the words never run
twice. At FINAL, a row whose hand-off was refused and whose retirement cannot
be confirmed is withheld from `pendingSteers` and left for that admission
check. The conservative reconcile frame keeps `promotedSteers`, and the
client adopts it there before sweeping local chips.
* 🔏 fix: Give Promoted Steers Durable Ownership, Their Run's Queue Lineage and Approval Mode
A turn promoted from an unapplied steer now records its source on its own
row: the steer's ids, the generation that accepted it, and a mark set only
once the job store handed the parked copy to that row. Admission runs a
promoted turn on that mark or on a hand-off the job store confirms now;
without proof (the store's evidence expired, or the host cannot ask) the
turn is held for review instead of running.
- Hand-off replies that are lost no longer cancel the row. The row stays as
the client's handle and its admission settles ownership, so a committed
hand-off can no longer leave the steer with no runnable copy.
- A replayed promotion never hands the parked copy to a row that was
cancelled or failed.
- Promoted turns join the queue lineage of the generation that accepted
the steer, so a sibling still queued behind that run no longer strands
them with a predecessor mismatch.
- The steer request carries the sender's code approval mode onto the
promoted turn; an unreadable mode keeps the steer on the client path.
- A steer whose quotes its owner stripped stays on the client path.
- The queued-turn receipt names the promoted steer by both ids, and the
receipt list retires a pane's local copies even when it missed FINAL.
* 🚧 fix: Fence Promoted Turns to Workers That Prove Steer Ownership
A promoted row without an approval mode was published under the v1 queued
turn capability, so during a rolling deploy a worker that predates the
ownership check could claim it and run an unsettled row while the parked
steer was still recoverable elsewhere.
Promoted rows now publish under a new agent_queued_turn_v3 capability and a
v3 delivery identity, always reserved before insertion. A replica that
projects an older version can neither publish the reserved delivery nor
claim it, and enqueue refuses a promoted row without a reservation.
* 🪦 fix: Keep a Dead Promoted Turn Answering for Words It Held
A pane that learns of a promoted steer from the receipt list dropped the
mapping for every dead row. A row quarantined as ADMISSION_INDETERMINATE can
still settle as admitted, and a row that died after it was proven the sole
owner of the words is their only surface, so in both cases the pane kept a
chip whose recovery could never run.
The receipt now says whether the turn owned its steer's words, and a dead
receipt keeps answering for them when it did or when its admission is
indeterminate. A replayed promotion applies the same rule to a settled row.
* 🧾 fix: Find Promoted Turns by the Steer a Pane Holds, Join Root Lineages, Redact Hand-off Errors
- A promoted turn's request id is now derived from the client steer id, and a
pane asks for the receipts of the steers it still holds a local copy of
(recovery rows and failed chips). A promoted turn that already ran is only
listed when asked for by name, so a pane that missed FINAL now finds it
and retires its copy. A client steer id too long to key a queued turn is
not promoted.
- The lineage lookup includes a generation admitted from a root queued turn,
which has a parent and no epoch. The promoted turn joins that lineage
without an epoch instead of opening a second one.
- A failed hand-off at admission reports a fixed message. The job store's
own error text stays out of the dead-letter record a client can read, and
promotion logs carry safe error metadata instead of error text.
* 🔢 fix: Ask for Held Steers First Under the Receipt Lookup Limit
The receipt list answers for at most 100 request ids, and a pane's server
rows were listed ahead of the steers it still holds, so a full server queue
could push every held steer out of the request. A promoted turn that had
already run was then never found.
Held steers now come first. An active server row is listed whether or not
it is asked for, while a settled promoted turn is found only by name.
* perf: Load MCP UI and Export Libraries on Demand
* test: Cover Opening an MCP App Before Its Bridge Arrives and Keep On-…
* test: Keep the Opened MCP App Loading While Its Binding Check Is Held
* test: Run the Lazy Load Specs on Real Hooks and Fake Only the HTTP Cl…
* fix: Keep the Legacy Renderer Fallback Valid in a Paragraph and Quiet…
* fix: Keep the App Bridge Fallback Silent So an Opened View Announces …
* 🛌 perf: Defer Search Key Dialog Initialization Until First Open
* test: Reuse the Search Dialog Trigger Label in Lifecycle Tests
---------
Co-authored-by: Lia <lia@librechat.ai>
* fix: Move conversation project and PR icons to the leading edge
* fix: Preserve Conversation Focus With Leading PR Icons
* test: Check Icon Order After Leaving Pinned Section
* test: Enable Project Chats Before Checking Their Badges
Localize source pagination labels and the default sources error fallback. Add focused regression coverage and stabilize the oversized screenshot export test.
* fix: Read the Account and Session Together and Test Cancel on a Real Database
- Start the setup user and refresh session lookups together in the cancel controller instead of one after the other, as the opt-in confirmation already does
- Run the cancel controller spec on mongodb-memory-server with the real data-schemas methods, so the session and compare-and-swap predicates under test are the production ones, and add a negative case for each
- Keep only a module wiring test in the CJS controller spec, since the database behavior is now covered where it can run for real
* test: Pin the Cancel Response When the Session Lookup Fails
Both lookups now run before any cookie or write, so a failed session lookup answers 500 with the browser and the stored state untouched. Cover that on the real database.
* fix: Keep the Saved Files Draft Until the File List Loads
After a reload the live file map is empty until the server's file list arrives, and the restore that rebuilds it needs that list. The save effect rewrote the stored draft from the empty map in between, so a pasted-text chip or any other attachment was gone before it could be restored. It now waits for the list. This is what turned the composer-attachments restore scenario red on dev.
* fix: Keep the Provider Message on Classified Rate Limit Errors
* fix: Honor maxProviderErrorChars for Classified Generation Errors
* test: Cover Classified Gateway Errors in the Mock Harness
* test: Cover a Zero Provider Detail Limit on Generation Errors
* refactor: Resolve Classified Provider Errors in the TypeScript Backend
* fix: Redact Provider Details Before Truncating Them
* fix: Wrap Label and Prose Text Between Words Instead of Mid-Word
* test: Cover Word Wrapping in the MCP Trust Disclosure and Bookmark Delete Dialog
* test: Reopen the MCP dialog per width and treat hyphens as break points
* test: Open the bookmark delete confirmation from the keyboard
* fix: Let the MCP Dialog Segmented Controls Wrap on Narrow Screens
* 📏 fix: Measure Usage Percent Against the Allowance Each Period Granted
Store the credits granted at the start of each balance period on the record and measure the usage percent against it, so changing refillAmount or startBalance no longer moves a user's percent until their next grant. Legacy records fall back to the configured amount.
* 🕰️ fix: Ignore a Stored Allotment a Later Refill Has Replaced
Stamp each stored allotment with the time of its grant and measure against it only while no refill is more recent, so a refill by a replica that predates the field falls back to the configured amount instead of reporting usage against the prior period's allowance.
* 🔒 fix: Write the Allotment Grant Atomically and Return Its Period Start
Insert lastRefill with the credit, allotment and grant time when a balance record is created, so a racing creator never moves another's period start past its grant. Return lastRefill even without auto-refill so the client can place a stored allotment in its period, and fall back when it cannot.
* perf: Prefetch Conversation Messages From the Chat Route
The messages request started only when ChatView mounted, after startup config, roles, endpoints, models and the conversation record resolved, although it needs only the route id. ChatRoute now starts it as soon as the id is known for a conversation the cache has never held, sharing the view's query function, and the view's first mount uses that payload instead of fetching it again.
* fix: Keep the Messages Prefetch Mark for the Observer That Uses It
Child observers of the same conversation mount first and cleared the mark before the conversation view subscribed, so the view loaded the messages a second time.
* fix: Show a Failed Messages Prefetch Instead of Requesting It Again
A prefetch that failed left no data, so the view loaded the messages again on mount, and a link to a missing conversation sent two requests. The view now shows a fresh prefetch failure, and the prefetch retries like the view's own load except on a 4xx.
* test: Cover Route-Level Messages Loading on Cold Load, Sidebar Switch and Missing Conversation
* fix: Retry Rate-Limited and Timed-Out Messages Prefetches
* fix: Prove Prefetched History by Reply Identity and Honor Invalidation
A URL load's prefetch starts before the conversation record is cached, so it captured no reply stamp and the seen check loaded an unread conversation's history a second time. Once the record lands, the prefetched history is proven when it holds the exact reply the record names. The mount guards also yield to an invalidation, and the failed-prefetch guard is the default for every observer of the conversation's messages.
* fix: Match Vendor Chunk Rules Against the Module Path, Not the Checkout
The vendor chunk rules tested the absolute module path, so a repository under a directory whose name contains a rule's text (fetch, ky, zod) sent every dependency to that chunk and the PWA precache limit failed the build. The rules now see the path from the first node_modules segment on.
* test: Cover Vendor Chunk Rules Under a Hostile Checkout Path
* refactor: Move Part Helpers and activityLabels Into the Chat Package
activityLabels moves to packages/chat/src/core/parts and exports from
@librechat/chat. useLazyCollapseBody, useProgress and useThrottledValue move
to packages/chat/src/react/parts (@librechat/chat/react). useExpandCollapse,
CopyButton, ActionButton, LangIcon and its icon paths move to
packages/chat/src/components/parts (@librechat/chat/components), since they
read @librechat/client. Specs move with them, client importers and mocks point
at the package entries, and design-lint suppressions follow the moved files.
The fold-type set in activityLabels is built on first use so the module reads
no data-provider enum at load, with a spec pinning its members.
* test: Point the About Spec's Localize Mock at the Package's Copy Button
* chore: Retest Against Current Dev
* fix: Require a Click to Submit Email Verification Links
Mail security scanners (Microsoft Defender Safe Links, Sophos, Hornetsecurity)
open links in incoming mail and run the page's scripts, so the verify page
submitted the single-use token on load and the user's own click then failed.
The page now waits for an explicit confirm button for both sign-up
verification and email-change confirmation.
* test: Cover verification links opened before the user clicks
* test: Isolate the verify click scenario from the submission limiter
* test: Confirm the sign-up link in the email e2e setup
* test: Exercise the shared Button in the verify page spec
* fix: Treat Empty Sandpack Bundler URLs as Unset
An empty SANDPACK_BUNDLER_URL or SANDPACK_STATIC_BUNDLER_URL (common with
${VAR:-} passthrough in Docker Compose) was handed to Sandpack as the
bundler URL, leaving artifact panels blank. buildSandpackOptions now falls
back to the default bundler for an empty value, and the shared-link startup
payload omits empty bundler URLs.
Related to #17790
* test: Cover Empty Sandpack Bundler URLs in Artifact Previews
* fix: Key Sidebar Chat Rows by Conversation Id
Virtualized chat rows were keyed by row index, so a row's local state (an
open delete dialog, a rename field) stayed in its slot while another chat
moved into it, and confirming deleted the wrong chat.
* test: Cover Sidebar Row State When Rows Move
* test: Scope Sidebar Row Scenario Clicks to the Open Menu
* test: Release the Held Archive Reply Before Removing Its Route
* fix: Stop Sidebar Toggle Buttons Forwarding the Click Event as afterSlide
The desktop toggle and the mobile close button passed their onClick handlers
straight through to handleCollapse(afterSlide), so React's click event reached
setSidebarOpen as the afterSlide callback and threw when invoked (directly, or
via requestAnimationFrame on the animated mobile drawer).
Related to #17861
* test: Cover Closing the Sidebar Without a Runtime Error
* fix: Keep the Projects Section Expanded by Default
* fix: Label the Streaming Dot With a Tooltip and an Accessible Name
* fix: Move the Welcome Screen Footer Directly Under the Composer
* fix: Drop the Agent Name From Responses When the Selector Already Shows It
* fix: Align the Sidebar Section Headings With the Date Labels
* feat: Make the Welcome Footer Placement and Response Author Configurable
* fix: Hide the Memories Panel on the Agents Route
* test: Cover the Launch QA Chat Chrome in E2E Scenarios
* test: Assert the Section Heading Padding Merge Without Mocking App Internals
* fix: Read the Response Author Setting Through the Messages Host
* test: Give the Consumer Spec's Messages Host the Author Setting
* refactor: Move the Queued Follow-Up Row Into @librechat/chat
The package owns which queued turn is drawn, when it follows the reader to the end of the thread, and where the composer's queued actions attach. The app keeps who sent it, their icon and how the text reads, passed in as props.
* test: Tag the Queued Follow-Up Row Scenario
The spec already drives the queued turn through its reveal and handoff in the browser; the tag lets the gate record it as evidence for the row the package now draws.
* chore: Retest Against Current Dev
* test: Keep Jotai's Real Exports in the Search Route Spec
PendingTurn now ships from the package components entry, which loads the steer rows and the pane submission atom at import. The spec replaced the whole jotai module with useAtomValue alone, so atom() was undefined and the suite failed to load.
* refactor: Move Conversation Starters Into @librechat/chat With a Starter Button Variant
The welcome screen's suggested first messages render through a package component built on a new starter Button variant instead of a raw button. The app keeps resolving which starters apply (agent, spec, assistant) and sends the chosen text.
* test: Pin the Starter Variant Under the ClickHouse Reference Theme
A starter takes its fill and ink from the theme roles in light and dark, so a theme that repaints the surface repaints the chip.
* fix: Cap the Starter Width at the Call Site, Not in the Button Variant
The Button primitive spec rejects fixed sizes in the variant recipe, so the 16rem cap moves to the package component that lays the chips out.
* fix: Keep the Starter Stagger Ahead of the Unlayered Fade Rule
The unlayered fade-in rule sets the animation shorthand, which resets the delay and fill mode a layered utility sets, so every chip animated at once. The variant now declares the whole animation in one utility, and the cap scenario asserts the computed delay and fill mode.
* fix: Ship the Starter Fade From the Shared Tailwind Preset
The starter variant referenced a keyframe that only the app stylesheet defines, so a host using the published preset would get no entrance. The keyframe and its staggered animation now live in the preset next to the loading dots, and the variant uses the animate-starter-in utility.
* chore: Retest Against Current Dev
* refactor: Move the Attachment Row Into @librechat/chat Behind the Files Host
* test: Cover the Attachment Row Against a Fake Files Host
* test: Run the Files Host Deletion Against the Real Hooks and Mock Only the Service Call
* test: Drive the Fallback Deletion Through the Real File Card
* test: Run the Row's Host Cases Against the Real Thumbnail and File Card
* test: Read the Host Preview From the Thumbnail Image Source
* chore: Retest Against Current Dev
* refactor: Move the Scroll Button Into @librechat/chat
* refactor: Make the Package Scroll Button the Message List Default
* test: Pin the Scroll Control Fade and Its Reduced-Motion Path
* fix: Drop the Scroll Control's IntersectionObserver Guard
The observer starts in an effect, which never runs in a server render, and every browser has the API. The guard existed only for jsdom, which now gets an inert observer from the package's jest setup.
* chore: Retest Against Current Dev
* refactor: Retire Host Tool Outcome, Sibling and Approval Members
The package now owns the tool outcome rules and the attachment merge they
read, selects the visible sibling through its own atom, and derives the steer
path's code approval mode from raw inputs. ChatHost loses getMappingOptions and
useSetSiblingIdx; SteerHost.useCodeApprovalMode becomes useCodeApprovalInputs.
* refactor: Select the Branch Tail Inside @librechat/chat
The tail of the branch on screen becomes package logic, read through
useBranchTail. ChatHost loses useLatestMessage and useLatestMessageId;
SteerHost.useLatestMessage becomes the useRouteConversationId adapter.
* test: Exercise Steering Against a Real Message Cache
The steering spec mocked React Query to return one message list for every key, so
it could not notice a read of another conversation's cache or a tail that stops
following the cache. It now provides a real QueryClient, seeds each conversation
key, and covers the route and another chat holding different tails and a cache
that hydrates after mount.
* fix: Show MCP Server Titles in the Tool Library and Search by Them
Tool Library cards and agent tool rows showed the MCP server's config key because buildCatalog named each item after it, and search could only match that key. Name items from the resolved title in server.metadata, falling back to the key. Search also matches the key through the item id, as the MCP Servers panel does, so existing key searches keep working.
* test: Cover MCP Server Titles in the Tool Library and Agent Tool Rows
* test: Find the E2E Memory Card and Row by Title in MCP Specs
* refactor: Read the Thread Panel's Jotai State Through the Chat Surface
* refactor: Move the Subagent Thread Panel Into @librechat/chat
* test: Spec the Subagent Thread Panel Against Fake Hosts
* test: Cover the App Subagents Host Adapters the Panel Move Relies On
* fix: Style the Moved Subagent Panel With Shared Variants
* test: Pin the Shared Variants the Panel Draws Its Picker and Inline Actions With
* perf: Keep the Subagent Thread Panel Out of the Boot Bundle
* refactor: Add the Thread Panel's Reads, Writes and Layout to the Subagents Host
* refactor: Read the Subagent Thread Panel's App Capabilities Through the Subagents Host
* fix: Hand the Thread Panel the Query's Own Stable Refetch