* refactor: Move Subagent Progress State and Content Folding Into @librechat/chat
* refactor: Attach the Subagent Activity Feed Through the Chat Transport
* test: Tag the Subagent Activity Panel E2E Specs With Scenarios
* test: Pin Replay, Ready and Live Steer Ordering Across an Activity Reconnect
* fix: Stop the Subagent Activity Feed on Refusals and Bound Idle Reconnects
* fix: Keep Attaching the Subagent Feed While the Child Thread Is Still Reserved
* test: Read Steer Order the Same While the Child Turn Streams and Once It Settles
* refactor: Move Composer Attachment Components Into @librechat/chat
* test: Cover the Pasted Text Editor From Paste to Saved Edit
* test: Keep the Real Data Provider Enums in the ChatView Subagent Spec
* refactor: Build the Source Badge Styles at Render Time
* test: Reopen the Pasted Text Correction From Its Replacement Chip
* chore: Re-record the Attachment Design Suppressions on Dev
* test: Merge the SteerPart Package Mocks Into One Factory
* refactor: Move Tool Disclosure State and Leaf Part Components Into @librechat/chat
Disclosure contexts and atoms, tool intent labels, useRowHandoff and
useFollowScroll move to packages/chat/src/react/parts (exported from
@librechat/chat/react); CancelledIcon, InProgressCall, AuthorHeader, Stdout,
BareStatus and the row class constants move to
packages/chat/src/components/parts (exported from @librechat/chat/components).
Disclosure reads the package host, and ToolContentQuery is declared from
data-provider and react-query types. The AuthorHeader and useFollowScroll specs
move with their modules.
* test: Cover the Author Header That Resumes After a Steer
* test: Keep the Package Entry Intact When Mocking AuthorHeader
* refactor: Move Pure Part Helpers Into @librechat/chat
Tool output parsers (JSON fields, background handles, wakeups, background
tasks, command results) and the small routing, params and rerun helpers move
from client Content/ into packages/chat/src/core/parts, exported from the
package root. Client importers read them from @librechat/chat; parseJsonField
becomes a named export so the root barrel can carry it.
* test: Cover Wake-Up Turns Rendering as Task Cards
* fix: Point the API Background Spec at the Moved Parsers
* refactor: Move Message Row and Timestamp into @librechat/chat
Add a MessagesHost the message list reads the viewer's clock format and row
slots from, registered by the app at load, and move MessageRow,
MessageTimestamp, the row width helper, the timestamp formatters and the
minute ticker into the package with their specs. The user attachments a row
shows reach it through the host's files slot until they move.
* test: Cover Message Rows on Chat and Shared Routes
* chore: Prepare the Chat Package for Message Components
Give packages/chat a lint-only Tailwind entry so the design rules resolve the
library's theme utilities, allow the app status selectors its components carry,
expose the active language from @librechat/client, and let the locale check
accept keys that resolve through plural forms.
* refactor: Move Message Row Leaves into @librechat/chat
Move the hover style helpers, SubRow, SiblingSwitch, the elapsed timer with its
duration labels, HeaderLabel and the system event header into
packages/chat/src/components/messages, export them from
@librechat/chat/components, and point the client at the package.
* test: Cover Message Row Leaves in the Mock Harness
* chore: Drop the Chat Lint Entry in Favor of components.json
* test: Run the Elapsed Spec Against the Package
* fix: Label Composer Thinking Levels and State the One-Shot Scope
* test: Cover Composer Thinking Labels and One-Shot Scope in E2E
* test: Cover Thinking Focus for Option Lists Without Auto
* test: Wait for the Thinking Popover's Open Focus Before Arrow Keys
* test: Match the High Effort Radio Exactly
* fix: Keep the Composer Thinking Level for the Rest of the Conversation
* fix: Keep a Queued Turn's Picked Level on the Turns Queued After It
* test: Name the Numeric Reasoning Control by Its Thinking Label
* fix: Name the Queued Turn's Level on the Thinking Button
* test: Dismiss the Thinking Tooltip Before Typing on a Phone
* fix: Respect Enforced Specs and Parameters Edits Over the Inherited Thinking Level
* test: Expect the Model Spec Enforcement Flag in Chat Settings
* fix: Keep a Queued Turn Off a Level Its Target No Longer Runs
* fix: Record the Target a Queued Turn's Level Belongs To
* refactor: Inherit the Thinking Level on the Server
* perf: Answer the Branch Level Lookup Without Tree Links When Nothing Was Picked
* fix: Respect the Thinking Switch and Held Queue Rows Over the Inherited Level
* fix: Read the Branch Level Once and Inherit Only on Fresh Turns
* fix: Keep a Parameters Thinking Edit From Turning Thinking On
* fix: Withdraw a Staged Thinking Level When Thinking Is Switched Off
* fix: Scope the Thinking Switch Transition to the Conversation
* test: Drop the One-Shot Thinking Scenario the Conversation Level Replaces
* perf: Bound client hygiene paths (lodash imports, timeouts, listener cleanup, upload concurrency)
* feat: Make client request timeouts configurable
* test: Cover the configured refresh deadline end to end
* feat: Rename client timeouts to client limits and expose upload concurrency
* fix: Keep the published refresh deadline for the next page load
The drawer collapsed on any Escape that reached the document, including
one a dialog above it had already handled, so a single press closed the
dialog and the drawer and the dialog could not return focus to its
trigger. The drawer now stands down when the Escape was already handled.
* refactor: Restyle Connected Accounts Settings Row
* test: Cover Connected Accounts States in Mock Scenarios
* test: Open Settings Through the Drawer on Mobile
useAdaptiveSSE and useResumableSSE now live in the chat package and own the
run, the stream id and how a stream re-attaches. The app supplies the services
a resumable stream runs on and the Assistants stream through a StreamHost,
mounted in Root beside the chat and steer hosts.
useChatHelpers now builds the pane contract from a ChatHost the app supplies:
its pane store, message query cache, turn builder, thread selection, abort
transport and settings. The stop path lives in its own module, its spec runs
in the package against a host with no app behind it, and the app mounts its
host in Root beside the steer host.
* refactor: Move the useChat Facade and ChatContext into @librechat/chat/react
The facade, ChatContext, the chat contract types and the resume request atom now
live in the chat package. The message cache subscription and the app's tool
outcome rules reach the facade through the contract, and useChatHelpers reads
its pane conversation through ChatSettings instead of the app store.
* fix: Key Cached Message Views on the Host's Tool Outcome Rules
Callers sized and layered Dropdown lists through ad hoc sizeClasses, while
DropdownPopup takes sameWidth, minWidth (capped to the room the list has)
and gutter. Dropdown now takes the same three, and the Settings dropdowns
move onto them and drop z-50 classes the dialog layer already overrides.
* 🪡 style: Separate Attachments from Message Bubbles
* fix: Include Attachments on Structured User Rows
* fix: Normalize Attachment Text Parts Before Trimming
* fix: Preserve Attachments on Protected User Messages
* fix: Keep Message Width Independent of Attachment State
---------
Co-authored-by: Lia <lia@librechat.ai>
Accordion, Breadcrumb, CheckboxButton, FormInput, QuestionMark,
InputWithDropdown and the Radix DropdownMenu had no users in the app or
the package. The account menu's dividers were the DropdownMenu's
separator inside an Ariakit menu; they are now the Ariakit menu's own
separators and draw the same.
The assistant picker, the assistant model field, the assistants endpoint
settings and the dynamic parameter dropdown were the last users of the
HeadlessUI SelectDropDown and its MultiSearch. Dropdown gains a muted
placeholder and an aria-invalid field state, and each field is now named
by its visible label.
* refactor: Remove Legacy Dialog and DialogTemplate from @librechat/client
The assistant delete confirmation was the last consumer of the legacy
Radix Dialog and its DialogTemplate. Move it to OGDialog and
OGDialogTemplate with the shared Button trigger, matching the agent
delete button, then drop both components, their barrel exports and the
spec entries that listed them.
* test: Cover the assistant delete confirmation dialog
* test: Match toast text exactly and clear the delete mock before cleanup
* test: Move the close-target and scrim scenarios off the removed Dialog
* feat: Let Dropdown work inside dialogs and take the field list roles
Inside a dialog the list renders in place, so the dialog's focus trap and
aria-hidden pass no longer cut it off, and it layers above the dialog. A
field Dropdown's list now takes listMinWidth, listMaxHeight and the icon
size role, and is never narrower than its trigger.
* refactor: Move the code tool selects onto Dropdown and remove Select and Combobox
The four code tool settings selects were the last users of the Radix
Select, and Combobox, its only other consumer, had none. Their tests and
the nested popover scenarios now drive the Dropdown.
* refactor: Read the Pane Conversation Through ChatSettings and Drop the Orphan Abort Scroll Atom
* test: Cover Returning to a Running Chat Through the Router
* chore: Update package dependencies across multiple modules
- Upgraded `@azure/identity` to version 4.14.0 in package.json files.
- Updated `multer` to version 2.5.0 and `nodemailer` to version 10.2.1.
- Incremented `undici` to version 7.30.1.
- Updated `@happy-dom/jest-environment` to version 21.0.4.
- Incremented `qs` to version 6.16.1 and `fast-uri` to version 3.1.9.
- Updated `serialize-javascript` to version 7.1.4.
- Updated `zod` to version 4.6.7 in multiple modules.
These updates ensure compatibility with the latest features and security improvements.
* chore: update bun.lock file
* feat: Branch Tool Fold Rails Into Each Row
Draw each open fold's rail as a trunk with a curved branch into every
row, measured from the rows themselves. Hovering a row lights the route
along the tree: out of the previous branch, along the trunk and into the
new one, at a steady pace. Layout changes under a still pointer (folding,
streaming, scrolling) re-hit-test instead of clearing the path.
* fix: Retrace the Fold Path When Its Row Moves Mid-Trip
A row that moved while the lit path was still traveling to it kept the
trip measured to its old position, so the path ran the old distance and
jumped the rest. Start a fresh trip from the path's current position
whenever the destination row moves.
* test: Cover the Tool Fold Tree With Scenario Specs
One tagged Playwright scenario per contract behavior: branches into each
row, the hover route from the header, nested folds, travel along the
tree, a click that unfolds the hovered row, reduced motion, right-to-left
mirroring and touch.
* feat(prompts): sync Langfuse prompts into the catalog
* refactor(prompts): compose the Langfuse prompt sync runner outside the admin handler
Add createLangfusePromptSyncRunner, which binds the lock, the prompt-group
methods, the ACL grant and the Mongo error predicates once and returns a
runner that takes the per-request source, connection-bound listPrompts,
lock lease and page cap. The admin handler receives that runner as one
dependency instead of forwarding its parts, and its config method
signatures return a LangfuseAdminConfig interface in place of Mongoose
document types.
In api, api/cache/distributedLock.js creates the one DistributedLock for
the process and api/server/services/LangfusePromptSync.js composes the
runner once with it; the admin route imports the composed runner.
* fix(prompts): report incomplete Langfuse syncs and gate the sync action
- Refresh the prompt-group and effective-permission queries after a failed
sync too, because earlier imports can already be committed.
- Return `complete: false` when the page limit stops a sync before the last
upstream page, and show a warning instead of the success message.
- Show the Sync prompts action only to users with `manage:prompts`, the
capability the sync route requires. Resolve the Langfuse startup-config
capabilities in one batched lookup.
- Document that an interrupted import can leave a group without its initial
PUBLIC grant, and that a page in progress can outlast an expired lease.
---------
Co-authored-by: Rebase Probe <probe@example.com>
Reject edits, deletes, new revisions, promotion and revision deletes on
prompt groups whose source is not native with a read_only service error,
mapped to 403 "Externally managed prompts are read-only". The guard reads
the stored group, so the MANAGE_PROMPTS bypass is covered. Sharing,
usage counts and resolution are unchanged.
The client hides Edit and Delete for external groups, shows a read-only
detail view with a Langfuse notice and keeps Share.
* feat(prompts): add source identity to prompt groups
Add source, sourcePromptName, sourceProjectId and sourceDestination to
PromptGroup. productionId is required only for native groups. A unique
partial index on the source identity covers only groups that have
sourcePromptName, so native groups need no migration.
The create path drops client-supplied source fields, and the native
create upsert does not match langfuse groups. Records map a missing
source to native.
* fix(prompts): centralize sources and restrict native group matching
* feat(langfuse): test prompt listing and resolution from settings
Add a dry-run dialog in Settings > Langfuse that lists Langfuse prompts
and resolves one text prompt (production label or an exact version)
through the tenant's Langfuse connection. Nothing is written. A tenant
user's prompt reads never use the central env keys, even while
TENANT_ISOLATION_STRICT is off.
DevOps makes the feature available with LANGFUSE_PROMPT_SYNC_AVAILABLE
(timeout LANGFUSE_PROMPT_SYNC_TIMEOUT_MS). The tenant admin turns it on
with langfuse.promptSync.enabled.
Related: Linear AI-2271, ClickHouse/ai#4032
* fix(langfuse): isolate prompt credentials and expose prompt settings
Use stored credentials with deployment headers for prompt reads.
Show the settings tab when connection editing or prompt sync is available.
Keep connection controls and trace links under their existing gates.
Audit prompt-sync updates and reuse shared prompt response types.
* fix: Theme the Retry Action Radius and the Select Arrow
* fix: Keep the Select Indicator Visible in Forced Colors
* test: Cover the Select Arrow Following the Text Color
* fix: Hide the Scrollbar on the Web Search Source Rails
The three horizontal rails carried a class Tailwind 3 never generated, so they still draw a scrollbar. They now use the app's hide-scrollbar helper; the links inside stay focusable, so the rails stay reachable by keyboard and touch.
* fix: Keep the Source Tab Panel Off the Suppression Backlog
* test: Cover the Web Search Source Rails Scrollbar and Keyboard Reach
* test: Force the Source Rail to Overflow Before Reading Its Scrollbar
* 🫳 fix: Close the Mobile Drawer When Selecting the Current Chat
* test: Date the Current Chat in Populated Drawer History
---------
Co-authored-by: Lia <lia@librechat.ai>
* chore: Update dompurify to version 3.4.17 across all package files
- Bumped dompurify version from 3.4.16 to 3.4.17 in package.json, package-lock.json, and relevant sub-packages.
- Ensured consistency in dependency versions across the project.
* chore: Update ip-address package to version 10.7.4 in package.json and package-lock.json
- Bumped ip-address version from 10.5.1 to 10.7.4 in package.json.
- Updated package-lock.json to reflect the new version and integrity hash.
* 🗻 fix: Keep Long Chats Stationary Under the Mobile Drawer
* fix: Preserve Pane Stacking Below the Drawer
---------
Co-authored-by: Lia <lia@librechat.ai>
* 🔐 fix: Apply Base Config Overrides Before Sign-In and Refuse Script Policy Links
Sign-in decisions made before the user is known now read librechat.yaml plus the `__base__`
override of the request's tenant, or of the deployment outside a tenant, and fail closed
(`resolvePreAuthAppConfig`). Registration, the first phase of password reset and the first
email-domain check of the LDAP, OpenID, SAML and social strategies use it. The second check
applies the account's role overrides with or without a tenant, and a new account is checked
against the role it will be created with before anything is inserted. OpenID checks again when
the admin claim or role sync changes the role. Password reset issues no link when the
account's config cannot be read.
The signed-out `GET /api/config` serves Base `registration.socialLogins` and the pre-login
interface fields (`resolvePreLoginAppConfig`), falling back to librechat.yaml when overrides
cannot be read. `turnstile` becomes a base-only section, so Turnstile comes only from
librechat.yaml.
Config reads that merge documents stay in one tenant partition (`tenantPartition`, Mongoose
binding `tenantPartitionFilter`): the active tenant's documents, or the tenantless ones outside
a tenant. The config store's Mongoose binding reads, writes, lists and restores role documents,
`__base__` included, in that partition, and its `listActive` draws every document from it;
group and user documents stay addressed by id. Only a `list` with `acrossTenants` reads every
partition, which `listConfigTombstones` uses so the startup MCP tombstone report still names
each tenant's documents. The tenant-isolation conformance suite gains single-partition cases.
Privacy policy and terms of service `externalUrl` must be http(s), `mailto:`, `tel:`, relative
or blank (`isSafeLinkUrl`). Admin writes of another scheme are refused, a librechat.yaml link is
dropped with a warning at load, a stored one is dropped at merge, and every payload and the
client remove one that reaches them. The admin config meta reports
`features.preAuthBaseOverrides: true`.
* 🧪 test: Layer a Required-Field Override Through interface.currency Instead of Turnstile
Turnstile is set in librechat.yaml only now, so profile overrides of it are skipped and the
layering scenario could no longer see a role's Turnstile options completed by a user's site key.
The scenario now layers `interface.currency`, whose `code` and `rate` are both required: the role
stores only the rate, the user only the code, and /api/config serves both.
* 🛂 fix: Admit a First OpenID Login Under Its Claimed Role Before Creating the Account
The admin-role claim and role sync are now decided before a first-login OpenID account is created, and createUserOnce admits the email under that role's config, read in parallel with the USER role's, before inserting anything. A login the claimed role refuses creates no account and no start balance. Admitted logins are unchanged: the account is still created as USER (now explicitly), moved into the claimed role, re-checked and audited as before, with the claims decided once. An account a concurrent first login created gets the claims decided again for its own role and tenant.