mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-16 13:00:55 +00:00
1837 commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
0fea0240d6
|
⏳ feat: Reset Balance Allowances Without Rollover (#16781)
* feat: add periodic balance reset without rollover * fix: synchronize balance policy before periodic reset * style: preserve context balance class order * fix: Synchronize Reset Policy Before Granting Allowances * fix: Apply Current Balance Policy During Admission |
||
|
|
114394c6a0
|
🦉 feat: Compare Review Commit Ancestry Without Git (#16734)
* 🦉 feat: Compare Review Commit Ancestry Without Git * test: Cover Attached Reviewer Compare Registration * 🦉 feat: Compare Review Commit Ancestry Without Git * test: Cover Attached Reviewer Compare Registration * 🦉 feat: Use SDK GitHub Comparison With Host Eligibility Gates * test: Await the Comparison Timeout Assertion --------- Co-authored-by: Lia <lia@librechat.ai> |
||
|
|
3f442e4dbe
|
🪶 perf: Load Tool-Call Previews and Fetch Full Parts on Demand (#16753)
* 🧾 perf: Load Tool-Call Previews and Fetch Full Parts on Demand Long agent conversations shipped every tool output, argument string and subagent transcript on load, though the cards render collapsed: 12-18 MB of message JSON per chat, enough to crash iPhone Safari tabs. A client that adds ?toolPreviews=1 to the conversation load now receives bounded previews of settled tool calls (start and end of long outputs, JSON arguments and outputs kept valid with only their longest strings shortened, exit-status trailers kept whole, subagent transcripts omitted) with explicit markers and full lengths. Opening a card or a subagent panel fetches the stored part from a new owner-scoped endpoint, GET /api/messages/:conversationId/:messageId/parts/:partIndex, cached under its own React Query key. Clients that do not ask, exports and share links keep the full payload; bounds are configurable under toolCallPreviews in librechat.yaml, and a client-authored message that carries previews is refused rather than saved. * 🧾 fix: Validate Part Reads in Parallel and Preview Fork Responses The full-part read now starts beside conversation-access validation instead of after it, and keeps the active-job fallback the conversation read has, so a conversation still live before its first save can expand its previews. Fork, duplicate and shared-link fork responses honor the preview parameter, so they no longer seed the conversation cache with the full history. Background-task results whose structure cannot fit a valid JSON preview go whole, image cards keep their prompts, and the subagent panel offers a retry when its stored part fails to load. * 🧾 fix: Key Hydrated Parts by Preview Revision and Call Identity A fetched part is now cached under the preview's revision and replaces only the fields the server shortened, so a call whose stored output changes later (a harvested background result) is fetched again rather than rolled back. Part lookups carry the run-step and agent identity and refuse an ambiguous fallback, since provider tool-call ids can repeat within one response. A subagent that finished without final text has its transcript omitted like any other settled call, and JSON nested past a fixed depth falls back to a text preview; a call whose preview fails is sent whole instead of failing the conversation load. * 🧾 fix: Release Hydrated Parts With Their History and Bound JSON Work Full tool-call parts fetched for a conversation are removed when its message history is released or cleared, so they cannot outlive it under their own key. The structure-preserving JSON preview now bails out before cloning when the value has more nodes or strings than could ever fit, keeps a __proto__ key as ordinary data, and the part endpoint accepts any safe-integer index instead of an arbitrary ceiling. * 🧾 fix: Count Property Names Before Cloning a JSON Preview Property names are never shortened, so the pre-check now adds their length to its budget and falls back to the text preview before any cloning when they alone could not fit. * 🧾 fix: Preview Artifact and Branch Responses and Rehydrate Subagent Prompts Artifact edits and parallel-response branches merge the message the server returns into the conversation cache, so both requests now ask for previews and their routes honor it. The subagent panel reads the prompt from the stored arguments once they load, and the part endpoint no longer caps identifier length, so any previewed call can be fetched. * 🧾 fix: Preview Only Tool Calls That Can Be Fetched Back by Identity A call without an id has nothing but its position to name it, and the position can shift on the client, so it is left whole instead of being previewed. The part endpoint now requires a tool-call id, so an indexed lookup always confirms the call it returns. * 🧾 fix: Fetch Parts by Exact Identity and Preview Only Unique Ones The part endpoint now finds a call by its exact identity (provider id, run-step id, agent) instead of trusting the client's index, and the preview pass only shortens calls whose identity is unique in their message, so every preview names exactly one stored part. Legacy web-search failures that carry their error phrase mid-output go whole, since the collapsed card reads that phrase anywhere. * 🧾 fix: Bound the JSON Fit Walk Before Queueing and Normalize Empty Identities The structure check now counts an array's or object's children against the node budget before queueing them, so a very wide value is refused without building a work list its size. An empty run-step or agent id is treated as absent by the part lookup, matching how the preview pass and the client already treat it. * 🧾 fix: Key Fetched Parts to the Stored Version and Hydrate Search Details Each preview now carries `previewRevision`, when its message last changed, and the client keys fetched parts to that plus a fingerprint of the whole preview, so any change to the stored call is fetched again. The web-search details card asks for the stored call when it opens, so its query is never left shortened. * 🧾 fix: Cache Fetched Parts by Identity and Hold Copy Until Hydrated The part query key drops the client-side index, which only rides along in the request; the server locates the call by message and exact identity, so a shifted index serves the cached copy instead of downloading it again. Copy controls inside a previewed part are disabled until the stored content arrives, so a slow or failed fetch cannot export shortened text. * 🧾 fix: Shape Shared Forks With the Recipient's Bounds and Keep JSON Numbers Exact A shared-link fork resolves the share owner's config for its content checks, but the forked conversation belongs to the requester, so its preview bounds now come from the requester's tenant and role (prepareResultToolCallPreviews). A structure-preserving JSON preview now requires every number in the text to survive a parse and re-serialization as the same value; an integer past 2^53, an out-of-range exponent or an over-precise decimal falls back to the text preview (or the whole output for parsed-output tools) instead of showing a changed value. |
||
|
|
3a32d8b0d3
|
🏝️ fix: Let a No-Workspace Turn Carry a Remembered Approval Mode (#16763)
* 🏝️ fix: Let a No-Workspace Turn Carry a Remembered Approval Mode
A conversation set to run without attached workspaces failed every turn with
"The selected code approval mode is not permitted by the current policy" when
the reader had picked Accept edits or Full access for a workspace earlier.
With no attached target, the server validated the requested mode against an
empty policy that only allows ask. A turn with no attached target now accepts
any known mode, resolves it to ask for the run, and keeps the conversation's
stored mode instead of overwriting or unsetting it. Unknown values are still
rejected, and any attached target, including a subagent's, keeps the strict
check.
The composer treated an explicit no-workspace chat as still running on the
agent's default machine, so it kept offering and submitting the remembered
mode. It now offers no attached mode there, and the submit path sends ask
whenever the turn resolves to run without a workspace.
* fix: Leave an Unset Approval Mode Unset on a No-Workspace Turn
A turn without an attached target seeded the conversation's approval mode
from the request when the row stored none. A current client sends the gated
ask there, so the first no-workspace turn of a new chat wrote ask and
replaced the remembered pick the composer would otherwise keep offering.
Such a turn now only carries forward a mode the conversation already stores;
a stored mode still comes only from a turn that validated it against its
attached targets.
* fix: Gate the Approval Menu on the Resolved Workspace Mode and the Saved Conversation
The composer hid attached approval modes only for a chat that recorded a
no-workspace decision, while useCodeWorkspace also resolves one for a saved
chat with no recorded decision and for a draft still choosing. The approval
menu, the queued-turn snapshot, and the submit path now read the mode the
composer resolved, so the control matches what the turn sends.
A no-workspace turn kept the mode of the row admission loaded, but a turn
sent with overrideConvoId is saved under another conversation; the stored
mode is now read only when that row is the conversation being saved.
* fix: Preserve the Saved Conversation's Approval Mode Through a No-Workspace Turn
A no-workspace turn chose what to record from the row admission loaded, but
a turn sent with overrideConvoId is saved under another conversation while
its unsets are still computed from that loaded row, so either the source
row's mode was copied onto the target or the target's own mode was unset.
Such a turn now records no mode and declares codeApprovalMode preserved:
the conversation write skips it when computing unsets, so the stored mode of
whichever conversation the turn is saved under stays as it is, and a chat
that stores none keeps offering the remembered pick. Turns with attached
targets record exactly the mode they validated, as before.
|
||
|
|
301f9ac634
|
🚕 feat: Add Per-Call Subagent Machine Selection (#16757)
* 🧭 feat: Let a Parent Choose Its Subagent's Code Machine Per Call A parent agent can now pass optional `machine` / `workspace` arguments on a subagent call to pick where the child runs, using the host-argument extension point added to @librechat/agents. - Each lazy child declares enums built only from machines it may reach: admitted in the conversation's sealed codeWorkspaces, on its default or allowlist, in the requesting principal's tenant-scoped list, and served by a ready worker. A child the conversation pinned to a machine offers only that machine; a child with no reachable machine declares nothing. - On use, a request-scoped routing session in packages/api re-validates the choice against the current request and live worker status and refuses an invalid one with a typed, model-visible error instead of falling back. A routed child is pinned to the chosen machine at every routing site, overriding parent inheritance. - Omitted arguments keep inherit-by-default routing, extended so a child follows the machine a per-call-routed parent runs on (passing through agents without code). A subagent keeps one machine for the whole request. - A child whose default workspace is unavailable stays guarded unless it has per-call choices; then it stays callable and its description asks the parent to pick a listed machine. - Routed children keep their tool context per execution for tool loading, provisioning and artifact handling. - Paused-approval bindings, the attached-machine policy hook, skill-file priming and tool-output references account for per-call choices. The declarations are gated on the installed SDK exporting SubagentHostArgumentError, so this change is inert until LibreChat depends on an @librechat/agents release that includes it. * 🧭 fix: Reserve Default Routes Early and Route a Routed Subagent's Graph Members - Reserve a subagent's default machine when it is placed, as initializeAgent will resolve it (including parent inheritance), so a concurrent call cannot claim another machine during initialization. - Graph members spawned by a per-call-routed subagent follow its machine when they may, unless they already initialized on their own route this request. * 🧭 fix: Settle Concurrent Inherited Routes and Register Routed Graph Members - Re-read a subagent's inherited route after resolving targets, so two concurrent calls from differently routed parents settle on one machine. - Attribute a workspace-only conflict to the workspace argument. - Register graph members a routed subagent initialized, so each gets the attached-machine policy of the machine it actually runs on. * 🧭 fix: Re-read Inherited Routes After Resolving Subagent Targets - Re-read a subagent's inherited route after the target resolution await, so two concurrent omitted-machine calls from differently routed parents settle on one machine. - Attribute a workspace-only conflict to the workspace argument. * 🧪 test: Prove a Routed Graph Member Takes Its Machine's Policy Through createRun - Register a resolved child's graph members inline in the lazy resolver instead of through an exported generic helper whose test did not typecheck. - Drive the check through createRun's real PreToolUse hook: a member routed to a deny machine flips from its metadata machine's allow to deny once its parent resolves. * 🧭 fix: Hold a Lazily Loaded Graph Member's Default Machine While It Initializes - Pass a graph member's code flags when it initializes on its default route, so the routing session reserves that machine before the asynchronous initialization instead of only after it, and a concurrent call cannot place the same agent on another machine meanwhile. * 🧭 fix: Validate the Approval Mode Against Every Machine a Subagent May Use - Collect each agent's default attached route and each attached machine a parent may route it to per call, and validate the requested approval mode against that set in createRun and both client checks. - A child whose default is unavailable but whose per-call machine permits accept edits no longer fails run creation; full access still requires every such machine to permit it. * 🧭 fix: Admit, Prime, and Cancel Per-Call Subagent Routes Conservatively - Build scheduled pause admission from every attached machine a parent may route an agent to, so a permissive default does not hide a per-call machine that asks. - Walk lazy graph-member metadata when collecting execution routes, so historical skill files are primed for every machine such a member may run on. - Stop placing a canceled call after its target resolution resolves, so it never claims a machine for an execution that will not initialize. * 🧭 fix: Release Unused Route Claims and Scope Per-Call Machines to Their Run - Hold a subagent's route claim per placement: a failed or canceled initialization gives the machine back unless another execution still holds it, and a claim is permanent once a child on it attaches. - Fold an agent's default route into its per-call choice digest, so each agent contributes at most one paused-approval binding target. - Use only an agent's route policies for pause admission when it has them, so a missing default does not make a decided route look asking. - Drop a routable child's provisional attached-machine membership when it resolves off attached machines. - Offer and accept no attached machine per call while run files are shared, since shared children must run on managed code. * 🧭 fix: Give Back a Route When Its Placement Verification Fails - Release a placement's hold when attach finds the child initialized on a different machine than the one it was routed to, so a retry that follows the unavailable-machine guidance may name another machine. * 🧭 fix: Commit a Lazy Child's Routes Only When Its Whole Resolution Succeeds - Keep the routes a lazy child and its routed graph members hold pending through the child's entire resolution (settleExecution), committing them on success and giving them back on failure or cancellation unless another execution still holds them. - Placements outside any call (shared graph members) still commit when they attach. * 🧭 fix: Drop a Failed Lazy Resolution's Config from the Graph Cache - When a lazy child's graph resolution fails or is canceled after its config was cached for graph reuse, remove that entry with its route, so a later graph never reuses a config for a machine the child gave back. * 🧭 fix: Follow a Routed Agent Through Self-Spawned Runs and Scope Routed Member Configs - A call whose parent run was never placed (an allowSelf spawn reuses its routed inputs) inherits the routed claim of its parent agent, which keeps one machine per request. - Never share a graph member initialized for a routed parent's execution through the graph-member cache, so a failed resolution leaves no config behind for a route it gave back. - Race lazy target discovery with the request signal. * 🧭 fix: Pass a Machine On Through Self-Spawned Runs of Agents Without Code - Record the machine each agent without stateful code passes on, and let a call from that agent's unplaced run (an allowSelf spawn) follow it when the agent passed on exactly one machine this request. * 🧭 fix: Keep a Pass-Through Route Only When Its Resolution Succeeds - Record the machine an agent without code passes on with the rest of its call's routing state: kept when the resolution deciding it succeeds, dropped when it fails, so a self-spawn never follows a failed attempt. * 🧭 fix: Settle a Lazy Child's Routing State at the SDK Handoff - Wrap the run's whole lazy resolution, through the inputs handed to the SDK, in the descriptor's settle hook, so a cancel after the host resolver returns still gives the call's routes back. - Roll back the per-agent tool context a pending placement set (restoring the entry it replaced) when its resolution fails, so a retry on another machine seeds its own context. - Drop a failed call's shared config from the graph cache through the same settle hook. * 🧭 fix: Keep Per-Agent Tool Contexts on Live Placements and Queue Target Probes - Track every pending placement that uses an agent's per-agent tool context: a committed one sets it, a failed one hands it to a surviving placement, and only the last failure restores the earlier entry. - Let an unplaced run of an agent (an allowSelf spawn) defer to the routed run of the same agent that encloses it when looking up tool contexts. - Queue live target probes at eight in flight, below the shared status poller's ceiling, so concurrent descriptors never misreport a healthy machine as unavailable. * 🧭 refactor: Load Routed Graph Members Through a packages/api Service - Move the routed graph-member load (shared reuse, skip list, view check, execution identity, failure policy) into createRoutedGraphMemberLoader; the initializer only injects its dependencies. - Thread the request and call signals into target resolution so queued probes are skipped once canceled. - Probe nothing in shared-file runs, where every per-call target is attached and unusable. - Retire pending tool-context ownership when a committed placement installs the per-agent entry. * 🧭 fix: Share a Lazy Child's Config with Later Graphs Only After It Commits - Publish a default-placed lazy child's config to the shared graph cache from the settle hook's commit, so no concurrent graph can borrow a config whose route may still be given back. - Resolve a child's own appearance in its graph to the child config itself. |
||
|
|
1418d44ad9
|
🕊️ feat: Supply Authorized Scheduled MCP Resource Bearers (#16699)
* 🕊️ feat: Supply Authorized Scheduled MCP Resource Bearers * 🥟 fix: Preserve Scheduled Bearer Denials and Request Headers * 🪼 fix: Retain Bearer Denials Across Scheduled Recovery * 🐡 fix: Retain Unsettled Scheduled Generation Evidence * 🧭 fix: Recover Retained Scheduled Generation Obligations * 🪢 fix: Drive Retained Recovery in Every Scheduler Mode * 🦔 fix: Fence Complete Scheduled Denial Receipts * 🪵 fix: Require Durable Scheduled Denial Acknowledgement * 🕯️ fix: Preserve Fresh Terminal Writers During Cleanup * 🪷 fix: Preserve Durable Scheduled Receipt Acknowledgements * 🧿 fix: Acknowledge Scheduled Evidence Before Erasure * 🧪 test: Verify Merged Scheduled Receipt Union in Redis * 🪡 fix: Deduplicate Merged MCP Agent Context * 🪷 fix: Reauthorize Scheduled MCP Transport Requests * 🛟 fix: Preserve Scheduled Catalog Authority Denials * 🛟 fix: Fence Scheduled Dispatch and Stale Owner Settlement * 🛟 fix: Gate Scheduled Cleanup on Owner Evidence * 🛟 fix: Preserve Scheduled Drain and Transport Rejection Evidence * 🛟 fix: Quiesce Scheduled MCP Before Occurrence Settlement * 🛟 fix: Fence Scheduled Owner Recovery and Back Off Receipt Admission * 🛟 fix: Index Initially Retained Scheduled Generations * 🛟 fix: Require Durable Admission for Scheduled Policy Denials * 🛟 fix: Abort Occurrence Bearer Work Before Quiescence * 🛟 fix: Cancel Connection Credential Waiters During Failed Initialization * 🛟 fix: Fence Scheduled HTTP Dispatch at the Cancellation Cutoff * 🛟 fix: Bind SDK Request Deadlines to Scheduled Denial Admission * 🛟 fix: Recover Retained Creation and Isolate SDK Caller Cutoffs * 🛟 fix: Fence Scheduled App Reads and Share Cold Connection Ownership * 🛟 fix: Retain Observed Scheduled Denials Across Caller Cancellation * 🛟 fix: Invalidate Retained Discovery on Each Re-Arm * 🛂 fix: Classify Scheduled Resource 403 as Permission Denial --------- Co-authored-by: Lia <lia@librechat.ai> |
||
|
|
c23fbc8f77
|
🧬 fix: Default Subagents to Their Parent's Code Machine and Workspace (#16756)
* 🧬 fix: Default Subagents to Their Parent's Code Machine and Workspace
A subagent resolved its code machine from its own saved fields only, so
when a chat routed the parent to an allowlisted machine the subagent fell
back to its own default and whatever workspace the conversation had
selected there, or failed the parent's whole turn when none existed.
Subagents now inherit the parent's resolved attached machine when it is
their own default or on their allowlist where per-chat choice applies,
the principal can use it, the sealed decision already selected it, and no
selection names the subagent as an explicit owner. Inheritance is derived
per request from the sealed decision and current agent configuration and
fed to every routing site; it is never persisted, so existing chats and
older clients get it without a decision change. The composer mirrors it.
A subagent whose machine has no usable workspace is advertised to the
parent as unavailable instead of failing the turn; a locked decision
stays fatal.
* fix: Inherit Across Every Spawning Path, Graph Members and Deferred Code Tools
A subagent now inherits only when every agent that can spawn it, at any
depth, runs on the same machine; spawn cycles keep their own routes.
Subagent graph members inherit like explicit subagents. The deferred
execute_code loader passes inheritance to its fallback resolver. Subagent
reads and VIEW checks move to a packages/api loader shared by inheritance,
lazy descriptors and graph members. The composer lets a draft's subagent
follow its parent's machine before a workspace is picked, and keeps an
inheriting subagent's former selection without asking for a move.
* fix: Prune Spawn Back-Edges, Gate the Composer on an Inheritance Capability
Spawning parents follow the run's path semantics, so a back-edge the
descriptor tree prunes no longer blocks inheritance, and agents that spawn
each other follow their single outside parent machine when it routes them
all there. Only admitted subagents count toward the walk's node limit.
Graph members re-read and re-check VIEW when they initialize. The composer
echoes an inheriting subagent's former selection without gating on that
machine, and mirrors inheritance only when the API advertises
codeWorkspaceInheritanceVersion; approval modes keep intersecting every
machine an agent could use.
* fix: Settle Each Mutually Spawning Group on Its Own
Independent spawn cycles no longer merge into one group, so a pair under
one parent follows that parent even when another pair follows a different
machine. Also types the data-provider spec for its ES5 target.
* fix: Bound the Inheritance Walk, Normalize Parallel Roots, Move Subagent Availability to TS
The walk reads in batches no larger than the remaining node budget, stops
once the limit is reached, and runs through the run's subagent load limiter.
Roots are keyed by saved agent ID, so a parallel root such as id____1 can
never receive an inheritance entry. Resolving a lazy subagent's code route,
reporting it unavailable, and guarding its descriptor now live in
packages/api (resolveSubagentCodeAvailability, guardUnavailableSubagent).
* fix: Keep Missing Subagent Loads Parallel Near the Node Limit
Batches never shrink below eight IDs, so missing or unviewable subagents
near the limit still load in parallel under the injected limiter, and at
most a handful of reads land past the limit.
|
||
|
|
3c90cde7d8
|
🔗 feat: use LibreChat prompt groups as agent instructions (#16686)
* 🔗 feat(agents): use LibreChat prompt groups as agent instructions
Agents can link a prompt group revision or Production as their instructions. The link resolves at the start of each turn through a cached resolver. The cache clears on promote and delete. Editors without VIEW on the group see a restricted placeholder.
* fix: remove duplicate logger import from agent initialization tests
* fix: honor prompt management capabilities for linked agent instructions
* test: seed prompt manager capabilities in authorization fixtures
* fix: clear acknowledged linked prompt edits before version restore
* test: adapt merged chain coverage to prompt-aware payload helper
---------
Co-authored-by: Lia <lia@librechat.ai>
|
||
|
|
af35fe5439
|
🪚 chore: Deprecate Agent Chain Authoring (#16745)
* feat: consolidate orchestration into a native tool * test: complete persisted subagent graph fixture * fix: keep orchestration pickers inside the modal focus scope * chore: deprecate agent chain authoring * fix: preserve runtime-equivalent legacy handoff classification * test: stabilize orchestration dialog lifecycle coverage * test: wait for stream completion before final title polling --------- Co-authored-by: Lia <lia@librechat.ai> |
||
|
|
8ae65f28dd
|
⚡ perf: Async Local File Saves and Compile Hot-Path Regexes Once (#16712)
* perf: Async Local File Saves and Compile Hot-Path Regexes Once * perf: Check Closing Code Fences Without a Per-Length Regex Cache * test: Build the Delivery Route Config Before Routing Instead of Mutating It mergeFileConfig now memoizes by config identity, so the CSV fallback tests must set textFallbackWithoutTools when they build the request config rather than mutate the object after the agent's routing already merged it. * fix: Write Local Buffers Atomically So Concurrent Saves Cannot Interleave Async writeFile calls to one deterministic path (OpenID and SAML avatars) could truncate and interleave each other. Write through a temp file and a rename instead, and add scenario specs for local saves and longer closing fences. * refactor: Move Local Save Logic Into packages/api saveLocalBuffer, the temp-upload move and the atomic directory writes now live in packages/api/src/storage/local.ts and receive their paths from the caller; the Local strategy in /api keeps its logging and calls through. The traversal check now runs before any directory is created. * fix: Copy Moved Uploads Through a Temp File and Rename Into Place Concurrent async copies to one destination could interleave just like direct writes, so moveLocalFile now fills a sibling temp file and renames it. * fix: Contain Every Local Write and Move Inside Its Target Directory The traversal check that guarded saveLocalBuffer now runs in writeLocalFile and moveLocalFile too, before any directory is created, and the buffer save accepts only the images and uploads base paths. * test: Define the Success Assertion Inside the Local File Saves Scenario * fix: Give Atomic Write Temp Files a Fixed-Length Name So Long Targets Still Fit * test: Send Image Dimensions and Read the Message Array in the Local Saves Scenarios |
||
|
|
0e3c9088f6
|
🫰 feat: Configure Tool Approval Modes Per Agent (#16707)
* 🫰 feat: Configure Tool Approval Modes Per Agent
* fix: Fence Remembered Tool Approval Authority
* fix: Unify Tool Approval Execution Invariants
* fix: Revalidate Learned Approval at MCP Invocation
* fix: Preserve One-Time MCP Review at Invocation
* fix: Execute Reviewed Calls on Templated MCP Connections
* fix: Scope Approval Witnesses to Executing Agents
* fix: Retain Approval Bindings for Hook-Rewritten Inputs
* fix: Pin Review Authority and Retire Settled Tool Calls
* fix: Fingerprint Effective MCP Request Headers
* fix: Preserve Routing Around Renewable MCP Token Fragments
* fix: Bind Tool Consent to OAuth Credential Generations
* test: Keep Mobile Approval Save Outside Drawer Escape Race
* fix: Fence OAuth Consent at MCP Transport Retries
* fix: Let Shared Agent Viewers Reset Personal Consent
* fix: Preserve Renewed Consent Across Reset Races
* fix: Resolve Verified Aliases for Personal Tool Reset
* fix: Fence Renewed OAuth Consent and Credential Review
* fix: Require Foreground Execution for Review-Only MCP Calls
* fix: Pin Invocation Ownership and Stable MCP Consent
* fix: Fence Superseded Tool Consent Completion Writes
* fix: Scope Consent Epochs to Effective MCP Authentication
* fix: Scope Approval Admission to Reachable Agent Tools
* fix: Preserve Approval Epochs for Runtime-Detected OAuth
* fix: Address Tool Approval Review Findings
* fix: Preserve Captured Consent When Tool Approval Is Inherited
* fix: Preserve Approval Admission Through Lazy Metadata
* fix: Fence Programmatic Reviews and Unresolved Lazy Approval Keys
* fix: Account for Normalized and Skill-Contributed Lazy Tools
* fix: Scope Lazy Approval to Selected Tool Spellings and Servers
* fix: Honor Disabled MCP Capability During Lazy Approval Admission
* test: Preserve Approval Merge Regressions After Rebase
* fix: Preserve One-Time Review During Non-OAuth Grant Outages
* fix: Retain One-Time Consent Across Resume Recovery
* fix: Preserve Reviewed Consent Through Transport Outages
* fix: Preserve Case-Variant Lazy Approval Hook Admission
---------
Co-authored-by: Lia <lia@librechat.ai>
|
||
|
|
b6b24741da
|
🗝️ fix: Strengthen Two-Factor Recovery Credentials (#16742)
* fix: Strengthen Two-Factor Recovery Credentials * fix: Declare Recovery Helper Return Types * fix: Consume Recovery Codes Atomically * fix: Stage Recovery Code Rollout and Improve Input |
||
|
|
5e4ecbc24c
|
🧹 fix: Let File Deletes Succeed When the Code API No Longer Serves the Ref's Profile (#16671)
deleteCodeEnvFile rethrew every error except 404. A deployment that only serves the stateful profile answers a default-profile delete with 409 execution_profile_mismatch on every retry, so the file landed in failedFileIds, its record and agent references stayed, and agents holding it aborted every code turn with "Failed to provision N file(s) to the code environment". The mismatch is now handled like an absent object: logged, and the delete proceeds. Other 409s, 5xx, auth and network errors still fail the delete. |
||
|
|
741978c954
|
🔭 feat: Recover Stale Chunks Without the Error Page and Ship Client Logs to RUM (#16701)
Some checks are pending
Backend Unit Tests / Build packages (push) Waiting to run
Backend Unit Tests / Codegraph select (push) Waiting to run
Backend Unit Tests / TypeScript type checks (push) Blocked by required conditions
Backend Unit Tests / Circular dependency checks (push) Waiting to run
Backend Unit Tests / Tests: api (shard 1/3) (push) Blocked by required conditions
Backend Unit Tests / Tests: api (shard 2/3) (push) Blocked by required conditions
Backend Unit Tests / Tests: api (shard 3/3) (push) Blocked by required conditions
Backend Unit Tests / Tests: data-provider (push) Blocked by required conditions
Backend Unit Tests / Tests: data-schemas (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 1/4) (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 2/4) (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 3/4) (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 4/4) (push) Blocked by required conditions
Codegraph E2E Votes / vote (full suite) (push) Waiting to run
Docker Dev Branch Images Build / publish (push) Waiting to run
Frontend Unit Tests / Client build recovery regression (push) Waiting to run
Frontend Unit Tests / Codegraph select (push) Waiting to run
Frontend Unit Tests / Build packages (push) Waiting to run
Frontend Unit Tests / TypeScript type checks (client) (push) Blocked by required conditions
Frontend Unit Tests / Tests: @librechat/client (push) Blocked by required conditions
Frontend Unit Tests / Tests: Ubuntu (shard 1/2) (push) Blocked by required conditions
Frontend Unit Tests / Tests: Ubuntu (shard 2/2) (push) Blocked by required conditions
Frontend Unit Tests / Vite build verification (push) Blocked by required conditions
Sync Locize Translations & Create Translation PR / Sync Translation Keys with Locize (push) Waiting to run
Sync Locize Translations & Create Translation PR / Create Translation PR on Version Published (push) Blocked by required conditions
* 🔭 feat: Recover Stale Chunks Without the Error Page and Ship Client Logs to RUM Stale chunks: a tab left open across a deploy that opens a code-split panel requests a hashed chunk the new deploy removed. Vite's preload handler hands the failure to the stale-asset recovery, which reloads, but the import then resolves to `undefined` and `React.lazy` throws a TypeError into the route error boundary, so the error page flashes before the reload. Lazy imports now go through `lazyWithRecovery`/`importWithRecovery`, which turn that result into a `ChunkLoadError`; the route boundary recognizes chunk failures (and any error while a recovery reload is underway), asks the page recovery once, and renders a localized "Updating to the latest version…" status. When the loop guard declines, the normal error page with its reload action shows instead. The page recovery is now idempotent within a page, so concurrent callers join the in-flight reload rather than tripping the guard. Client logs: with RUM in proxy mode, the client logger's warn/error calls, error-boundary catches and stale-asset recovery events are exported as OTLP log records through the authenticated `/api/rum/v1/logs` proxy. Records carry allowlisted, scrubbed fields only, follow RUM session sampling, dedupe repeats with a count, are budgeted per minute and per page, batch with backoff, flush with keepalive on page hide, and stop after persistent failures. The proxy now refuses non-OTLP content types and applies a per-user rate limit. `RUM_CLIENT_LOGS=false` turns the export off. * 🔒 fix: Keep Client Logs Opt-In and Drop Application Error Messages - RUM_CLIENT_LOGS now defaults to off, like console capture, so enabling RUM proxy mode never starts a new log stream on its own. - Error messages are exported only for engine, browser and library generated types (TypeError, SyntaxError, DOMException, AxiosError, chunk failures); application errors keep type, status and stack only, since their messages can echo prompt or response text. All quoted fragments are now redacted. - Batches are measured in encoded UTF-8 bytes of the exact request body, and page hide drains every queued record that fits the keepalive quota. - Queued stale-asset events are delivered as soon as the log exporter starts, independent of the RUM SDK loading, and marked so they are never logged twice. * 🔒 fix: Export Only Known Generated Error Messages and Ack Queued Events - Error messages are exported only when the whole text matches a known engine, browser or library message shape (property access on undefined, "x is not a function", fetch/abort/axios status, chunk and CSS preload failures). The error class alone no longer qualifies, since any code can throw a TypeError carrying arbitrary text. - Queued stale-asset events are marked logged only after the collector accepts the record carrying them, so an undelivered event replays on the next page; in-flight events are skipped by the SDK path. - A fractional RUM_PROXY_USER_MAX below one falls back to the default instead of flooring to a limit of zero. * 🔒 fix: Hold Unacknowledged Asset Events, Re-send In-Flight Logs on Hide - The RUM SDK flush no longer drops queued stale-asset events whose client log record is still unacknowledged: they stay queued and persisted, flagged so their SDK action is not repeated, and leave the queue once the collector accepts the record. - Page hide re-sends the records of an unanswered regular request with keepalive; each record belongs to the latest request carrying it, so a late response to the original request neither marks nor requeues it. - Client-log export stops when the authenticated layout unmounts. - The proxy refuses /v1/logs while client logs, console capture and replay are all off, so turning RUM_CLIENT_LOGS off also stops tabs that still hold an older startup config. * 🔒 fix: Export Only Complete Stack Frames, Never the Message Header Stack reduction now strips the V8 `name: message` header (including every line of a multi-line message) and keeps only lines with a complete V8, Gecko or WebKit frame shape that ends in a URL or absolute path with a line number. A message ending in a source-position-like suffix can no longer pass as a frame. * fix: centralize RUM delivery and asset recovery lifecycle * fix: preserve RUM page lifetime and collector acknowledgements * fix: retain page transport quotas and recover functional chunks * fix: scope RUM client sessions to authenticated identity --------- Co-authored-by: Lia <lia@librechat.ai> |
||
|
|
19092e55bd
|
🖲️ fix: Enable Running Chat Menus and Preserve Renamed Titles (#16697)
Reconciles current dev while preserving manual title ownership, existing menus, and configuration regressions. Co-authored-by: Lia <lia@librechat.ai> |
||
|
|
5674faaa01
|
🪀 fix: Separate Workspace Admission and Transport Budgets (#16728)
* fix: Separate workspace admission and transport budgets * fix: Validate workspace run reserves and retry test types --------- Co-authored-by: Lia <lia@librechat.ai> |
||
|
|
38a9dab3f5
|
🦫 feat: Enforce Scheduled MCP Read-Only Authority (#16681)
* feat: enforce scheduled MCP read-only authority * fix: preserve startup admission and enforce consent deadline * fix: fail closed on malformed scheduled consent * fix: preserve scheduled MCP authority failure receipts * fix: preserve scheduled MCP handoffs and manual runs * fix: persist mandatory scheduled tool policy denials * fix: fence late scheduled consent and retain denial recovery * fix: retain scheduled transport denials and prevent replay * fix: merge retained scheduled denials during settlement * fix: prevent enrolled schedule completion wakeup escapes * fix: close scheduled consent admission and receipt races * fix: retain scheduled completion authority across approval * fix: retain safe scheduled authorization dependency denials * fix: sanitize scheduled authorization preparation failures * fix: bind schedule completion authority to task origin --------- Co-authored-by: Lia <lia@librechat.ai> |
||
|
|
c41413ad21 | fix: Keep Manual Unread Reminders in Date Groups | ||
|
|
6f4e36665e
|
🗄️ perf: Cut Serial and Redundant Database Reads (#16711)
* perf: Cut Serial and Redundant Database Reads * perf: Pick the Earliest Balance per User in MongoDB |
||
|
|
7957d0b587
|
🧾 fix: Commit Resume Provenance With the Approval Claim (#16430)
* fix: persist approval provenance in the resume claim and publish the pre-claim paths from any unapplied abort The claim CAS now records the provenance it replaces. An abort that lands before the resumed provider crosses its start CAS publishes those paths, so schedule deletion, account deletion and user stops no longer label model-authored chunks as user-submitted. * test: add approval provenance scenario on the shared approval e2e helpers * test: seed an earlier started segment before the unapplied abort case * fix: label abort provenance by the published content and persist the same selection A path the approval claim added is user-authored only once its tool call carries output in the abort content, so an abort between the provider start CAS and the resumed tool keeps the pre-claim labels, and an ask answer stamped by the abort route keeps its own. AbortResult.jobData carries the selection so the persisted row matches the final event. * fix: keep claimed non-tool provenance paths on an abort Only tool-call paths wait for their resumed call to complete; a steer the claim already found in the seed content needs no decision to apply. * fix: count a completed tool call with an empty output as applied in abort provenance * fix: check abort provenance on the unfiltered content and remap it onto the published parts * test: type the abort provenance overrides with the job store field names * test: assert the preserved paths when an unanswered ask aborts |
||
|
|
fb1dd57a9b
|
🔓 feat: Remember Tool Approvals Per Conversation (#16557)
* feat: Remember Tool Approvals Per Conversation Adds an opt-in "Always allow" choice to the tool approval card. When endpoints.agents.toolApproval.allowAlways is true, the server marks eligible paused calls with allow_always; approving with scope "session" stores that exact tool name on the conversation, and later runs in the same conversation fold the stored names into the policy as exact-name allow entries. The server enforces every step: the resume route rejects a session scope the pause did not offer, eligibility is rechecked against the live policy before storing, the list is written only through an owner-scoped bounded method, and generic saves and imports cannot set or clear it. Admin deny and ask rules and programmatic hooks still win, stored names are ignored under dontAsk or when the flag is off, and native code tools stay under the code approval picker. The flag defaults to false, so existing deployments keep prompting. * fix: Share the Effective Approval Policy and Persist Allows After Resume Fences Offering, resume re-check, scheduled admission and createRun now read one policy from buildEffectiveToolApprovalPolicy: endpoint rules healed against MCP alias spellings, then the conversation's remembered tools. A call held by a healed ask rule is no longer offered "Always allow", and a scheduled fire whose known tools are all remembered is no longer rejected as pause capable. The remembered-tools cap and name length cap move to toolApproval.allowAlwaysMaxTools and allowAlwaysMaxToolNameLength (defaults 64 and 256). The card stops offering the choice for new tools once the cap is reached instead of silently approving once. The resume route stores remembered tools only after the schedule and project context fences pass; a storage failure still approves the call once. * fix: Offer Always Allow Only When It Will Hold Offer allow_always only when storing the name would auto-approve the next identical call on the run's own path: every MCP spelling of the tool passes the healed static policy and no programmatic or plugin approval hook can apply to it (the pause payload does not record which hook asked). Remembered names now expand to every alias spelling of the same tool, and a deny or ask on any spelling keeps the tool ineligible. A table-driven spec walks the invariant through the real hook wiring. * fix: Recheck Approval Hooks Before Remembering a Resumed Approval The resume-time eligibility recheck now applies the same programmatic and plugin PreToolUse hook check as marking, with a hook context built from the resume request and the live plugin hook source. A hook registered after the pause turns the choice into a one-time approval: nothing is stored and the resume continues. Document that toolApproval.allowAlways should be enabled only once every replica supports it, since older replicas ignore the choice. * fix: Judge Always Allow Offers Against the Run's Live Aliases and Active Cap * fix: Charge Only New Tool Names Against the Remembered Approval Cap * fix: Recheck Remembered Approvals Against the Paused Run's Aliases * chore: Sort Imports in Agent Run After Rebase |
||
|
|
76fcf0a6eb
|
📝 docs: Describe Attached-Workspace Lanes, Sandbox Scratch, and Skill Files in Tool Descriptions (#16702)
* 📝 docs: Describe Attached-Workspace Lanes, Sandbox Scratch, and Skill Files in Tool Descriptions - Lane-mode `cwd` now states that any call outside `.worktrees/<name>` (with or without cwd, and file tools on such paths) is checkout-wide: it waits for running worktree calls and blocks new ones until it finishes, so checkout-wide calls are reserved for creating, pruning or removing worktrees. - `command`/`cwd` state that the command starts in cwd, so the model does not also cd into it; the lane-mode cd hint says the call ran checkout-wide. - Workers advertising the native SRT sandbox profile (`anthropic-srt`, `anthropic-srt:<preset>`) get a bash bullet that / and /tmp are read-only and scratch files belong in $TMPDIR or the workspace. Carried as `codeWorkspace.nativeSandbox` into tool definitions and the bash tool. - The attached skill-aware `read_file` description says skill files are not on the attached machine and must be written into the workspace to run there. - Tightened the attached bash description so the native variant stays within the 1024-character tool description limit. * 📝 fix: Keep the Skill-Copy Warning on the Command-Only Workspace's Skill read_file A workspace that offers execute_command but not read_file falls back to the skill-only read_file definition. It now carries the same sentence as the attached skill-aware definition, so the model knows bash_tool cannot reach skill files by path there. * 📝 fix: Name bash_tool in the Skill-File Warning Only When It Is Registered The skill-copy sentence on attached read_file definitions now depends on the attached bash_tool being registered beside it (includeBash and an advertised execute_command), for the attached skill-aware definition, its custom line-limit variant, and the skill-only fallback. Workspaces without commands keep the plain skill description. |
||
|
|
de7755b4ca
|
🕊️ fix: Keep Attachment History From Locking Conversations (#16690)
* 🕊️ fix: Keep Attachment History From Locking Conversations
* test: Correct Attachment Regression Fixtures
* fix: Preserve Current Attachment Admission During Steering
* fix: Release Historical Attachment Counts After Failed Steering
---------
Co-authored-by: Lia <lia@librechat.ai>
|
||
|
|
2529b22a66
|
🔕 fix: Log Lost Generation Predecessor Fences as Warnings (#16689)
A conditional generation create that loses its predecessor fence is an expected admission outcome: the store rejects before replacing anything, an automatic continuation defers without consuming an attempt, and a client restores its queued turn. Sibling background-tool wake-ups for one conversation race this fence by design, which logged every lost race as an initialization error with a stack. Route the controller's initialization-failure log through a typed packages/api helper that logs a predecessor mismatch as a concise warning with the stream, conversation, continuation flag, and whether the current generation is active, and keeps every other failure at error level as redacted text. |
||
|
|
1a8d23e1ed
|
✅ feat: Default Machine Selection and Linked-Worktree Lanes On (#16678)
* ✅ feat: Default Machine Selection and Linked-Worktree Lanes On
Per-chat machine choice from an agent's saved allowlist and linked-worktree
lane routing were both opt-in, so neither worked until a deployment found and
set its flag. Both are now on unless set to false: machine choice still only
applies to agents with a saved allowlist, and lanes still require a worker
that advertises git_linked_worktree. One helper per flag in data-provider
decides the default for every server reader and the advertised client config.
* feat: Advertise the Code Environment Decision Protocol by Default
Per-chat machine choice needs the conversation decision protocol, which the
client requires before offering allowlisted machines, but the protocol was
only advertised when CODE_ENVIRONMENT_DECISION_VERSION=1. With selection on
by default, authors could save an allowlist the composer never offered.
An unset or blank value now advertises protocol v1; any other value, such as
0, keeps the legacy-safe path.
* fix: Turn Machine Choice Off With the Decision Protocol Opt-Out
CODE_ENVIRONMENT_DECISION_VERSION=0 stopped advertising the protocol but
routing still accepted a non-default machine, so a cached tab or a direct
client could persist a choice during a mixed-version rollout. Machine choice
is recorded through that protocol, so isCodeEnvironmentSelectionEnabled now
requires both, for routing and for the advertised endpoints config. The
protocol resolver moves to code/protocol.ts (re-exported from code/config)
so execution and endpoints can use it without an import cycle.
* style: Format checkout routing regression cases
---------
Co-authored-by: Lia <lia@librechat.ai>
|
||
|
|
f88f3fb2fe
|
🪇 perf: Coalesce Ready Background Completions (#16650)
* 🪇 perf: Coalesce Ready Background Completions
* fix: Recover Receipt Batches and Gate Rolling Deploys
* fix: Fence Background Batch Handoffs and Cleanup Epochs
* fix: Bind Resumed Cleanup to Its Observed Batch
* fix: Preserve Background Results Through Recovery Handoffs
* fix: Recover Unconfirmed Manual Background Claims
* fix: Fence Automatic Recovery of Manual Handoffs
* fix: Preserve Background Reconciliation and Recovery Retention
* fix: Preserve Replayed Claims and Finish Follower Proofs
* fix: Recover Stale Background Projection Epochs
---------
Co-authored-by: Lia <lia@librechat.ai>
|
||
|
|
bb0543fd15
|
📼 fix: Replay Running Subagent Activity (#16541)
* 📼 fix: Replay Running Subagent Activity * 📼 fix: Preserve Activity Across Rollouts and Reconnects * 📼 fix: Backfill Missing Foreground Activity * 📼 fix: Fence Replay and Drain Admitted Activity * 📼 fix: Close Subagent Replay Review Gaps * 📼 fix: Resume Activity After Replay Recovery Expires * 📼 fix: Use Singular Subagent Omission Copy * 📼 fix: Preserve Public Replay and Displayed Activity * 📼 fix: Write Expanded Live Activity Before Queuing * 📼 fix: Track Disjoint Subagent Replay Coverage * 📼 fix: Preserve Tool Details and Omission Totals * 📼 fix: Recover Tool Timing During Replay Backfill * 📼 fix: Reconcile Covered Replay Timing Metadata * 📼 fix: Restore Message Phases During Replay Backfill --------- Co-authored-by: Lia <lia@librechat.ai> |
||
|
|
19a337da46
|
🛖 fix: Scope OAuth Binding Cookies to the Public API Path (#16649)
* 🛖 fix: Scope OAuth Binding Cookies to the Public API Path
* fix: Canonicalize OAuth Callback and Cookie Paths Together
---------
Co-authored-by: Lia <lia@librechat.ai>
|
||
|
|
73d704656e
|
📔 feat: Preserve Owner Text During PII Redaction (#16311)
* 📔 feat: Preserve Owner Text During PII Redaction * 🧵 fix: Keep Ordinary Chat Views Outside Private Text Provider * 🧷 fix: Preserve Owner Text Across Copy and Edit Paths * 🔏 fix: Protect PII on Denial and Abort Paths * fix: preserve protected text through denial, stop, and owner reload * test: cover preliminary private metadata in disconnect fixture * test: carry preliminary metadata in resume controller fixture * test: preserve Stop prerequisite identity in tenant fixture * fix: keep protected owner text out of search and exports * fix: preserve trusted PII placeholders through provider inspection * fix: coordinate protected turns across Stop and native sharing * fix: Preserve Private Text Admission and Query Lifecycles * fix: Track Private Query Effect Dependencies * fix: Fence Protected Admission and Screenshot Targets * fix: Share Protected Admission and Preserve Native Token Trust * test: Wait for Private Message Concurrency Indexes * fix: Preserve Protected Admission Across Recovery and Titles * fix: Coordinate Protected Root Admission and Early Stop --------- Co-authored-by: Lia <lia@librechat.ai> |
||
|
|
7c4cfa8684
|
♻️ refactor: Native Prompts Behind a Shared Service and Adapter (#16506)
* ♻️ refactor: Native prompts behind a shared service and adapter
* test: Bound Slow Mongo Fixture Startup and Guard Cleanup
---------
Co-authored-by: Lia <lia@librechat.ai>
|
||
|
|
90526cdc16
|
📧 fix: Pass requireTLS So EMAIL_ENCRYPTION=starttls Requires STARTTLS (#16656)
The SMTP transport options set `requireTls`, but nodemailer only reads `requireTLS`, so the key was ignored. With EMAIL_ENCRYPTION=starttls, a server that does not offer STARTTLS received the message over an unencrypted connection instead of the send being refused. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
2eee568542
|
🧳 feat: Choose Agent-Allowed Machines For New Chats (#16651)
* feat: Let New Chats Choose Agent-Allowed Machines * test: Keep Machine Choice Contracts And Native Selectors In Sync * fix: Preserve Graph Machine Choices And Reference Lifecycles * fix: Explain Graph Workspace Requirements And Validate Machine Choices * test: Cover Default And Non-Default Graph Machine Choices * test: Keep Unauthorized Machine Duplication Mocks Isolated * fix: Preserve Graph Agent Machine Ownership And Explain Requirements * fix: Preserve Stable Workspace Ownership Across Runtime And Config Changes * test: Wait For Verified Generation Readiness In Native Canaries |
||
|
|
3f3de65612
|
🪔 feat: Add Bound Scheduled MCP Consent (#16652)
* test: reuse reviewed scheduled MCP authorization fixtures * feat: add bound scheduled MCP consent lifecycle * fix: preserve scheduled root agent capability access * refactor: share scheduled MCP requirement resolution * fix: bind scheduled MCP consent to connection routing * test: type scheduled MCP connection identity fixtures * fix: reject unbound scheduled MCP routing templates --------- Co-authored-by: Lia <lia@librechat.ai> |
||
|
|
aab44c5e35
|
🧾 feat: Serve Built-In Endpoint Model Lists From Config So Overrides Can Narrow Them (#16639)
* feat: Serve Built-In Endpoint Model Lists From Config So Principal Overrides Can Narrow Them OpenAI, Google and Anthropic model lists came only from *_MODELS env vars, which are global, so a role or group override could not narrow them. A configured endpoints.<name>.models list now replaces the env list and is read from the per-request config, matching Bedrock. * fix: Skip OpenAI and Anthropic Model Discovery When a List Is Configured |
||
|
|
59b772f132
|
🥽 feat: Configure Attached Defaults and Honor Skill Read Ranges (#16540)
* feat: configure attached command and read defaults * fix: separate programmatic timeout defaults from ceilings * fix: retain attached programmatic schema instructions * fix: honor explicit skill and sandbox read ranges * fix: remove duplicate command imports after rebase * fix: retrieve complete sandbox text before paging --------- Co-authored-by: Lia <lia@librechat.ai> |
||
|
|
92432e95d5
|
🔐 feat: Enforce Required Two-Factor Authentication (#14731)
Some checks are pending
Backend Unit Tests / Build packages (push) Waiting to run
Backend Unit Tests / Codegraph select (push) Waiting to run
Backend Unit Tests / TypeScript type checks (push) Blocked by required conditions
Backend Unit Tests / Circular dependency checks (push) Waiting to run
Backend Unit Tests / Tests: api (shard 1/3) (push) Blocked by required conditions
Backend Unit Tests / Tests: api (shard 2/3) (push) Blocked by required conditions
Backend Unit Tests / Tests: api (shard 3/3) (push) Blocked by required conditions
Backend Unit Tests / Tests: data-provider (push) Blocked by required conditions
Backend Unit Tests / Tests: data-schemas (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 1/4) (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 2/4) (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 3/4) (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 4/4) (push) Blocked by required conditions
Codegraph E2E Votes / vote (full suite) (push) Waiting to run
Docker Dev Branch Images Build / publish (push) Waiting to run
Frontend Unit Tests / Client build recovery regression (push) Waiting to run
Frontend Unit Tests / Codegraph select (push) Waiting to run
Frontend Unit Tests / Build packages (push) Waiting to run
Frontend Unit Tests / TypeScript type checks (client) (push) Blocked by required conditions
Frontend Unit Tests / Tests: @librechat/client (push) Blocked by required conditions
Frontend Unit Tests / Tests: Ubuntu (shard 1/2) (push) Blocked by required conditions
Frontend Unit Tests / Tests: Ubuntu (shard 2/2) (push) Blocked by required conditions
Frontend Unit Tests / Vite build verification (push) Blocked by required conditions
Sync Locize Translations & Create Translation PR / Sync Translation Keys with Locize (push) Waiting to run
Sync Locize Translations & Create Translation PR / Create Translation PR on Version Published (push) Blocked by required conditions
* feat: enforce required two-factor authentication Require local and LDAP accounts to enroll in TOTP before they can use the app when ENFORCE_TWO_FACTOR_AUTHENTICATION is set. Sign-in, refresh, bearer verification, optional share auth and image authorization all route an unenrolled account into a staged setup flow, and every bearer credential minted before enrollment or a password reset is retired. Password reset retirement uses the existing credentialsChangedAt stamp, and commitPasswordReset clears any staged enrollment in the same write. Passkey sign-in follows the same enrollment gate as password sign-in. * test: cover passkey sign-in handing off to required enrollment * refactor: keep Mongoose user types out of two-factor auth contracts * fix: withdraw a minted session when its retirement recheck fails * fix: hold Agent API keys and the reset CLI to the required two-factor policy * fix: adopt a setup token handed off after the setup screen mounted * fix: move every tab that receives an enrollment hand-off into setup * fix: read the enrollment gate's retirement cutoff in system scope * fix: clear minted session cookies before the fallible session deletion * fix: adopt a setup token persisted before the setup screen subscribed |
||
|
|
3b4e7b1e5e
|
🚷 fix: Stop Reporting Rejected MCP Credentials as Authorized (#16571)
* fix: Keep rejected MCP credentials out of durable authorization * fix: Preserve MCP rejection evidence across recovery and rollback * fix: Coalesce MCP rejection persistence with silent refresh * fix: Record MCP rejections inside the common storage refresh flight * fix: Complete MCP token method test fixtures --------- Co-authored-by: Lia <lia@librechat.ai> |
||
|
|
d349120ec3
|
🪢 fix: Restore MCP OAuth Browser Binding (#16634)
* fix: Require Browser Binding for MCP OAuth Callbacks * fix: Refresh OAuth Browser Binding After Account Switch * fix: Reject Malformed OAuth Binding Cookies Safely |
||
|
|
bbb58a867e |
⛴️ fix: Preserve Canary Sync Resolutions (#16457)
Retain the tracked-file integration outcomes recorded by original canary sync PR #16457. No new implementation is introduced. Shared and ambiguous corrections are carried by the final sync-resolution commit so the resulting tracked tree equals frozen canary |
||
|
|
9dc8db0ea8 |
🛶 fix: Preserve Canary Sync Resolutions (#16361)
Retain the tracked-file integration outcomes recorded by original canary sync PR #16361. No new implementation is introduced. Shared and ambiguous corrections are carried by the final sync-resolution commit so the resulting tracked tree equals frozen canary |
||
|
|
5b84c4b57f |
⏳ feat: Add Ephemeral Retention Mode for Forced Temporary Chats (#13811)
* feat: add ephemeral retention mode for forced temporary chats
Adds RetentionMode.EPHEMERAL, which forces every newly saved chat
temporary: hidden from history and search, given the temporary-chat
expiration, and with the toggle locked on.
Forces isTemporary and applies the temporary expiration in the normal
conversation and message save methods, routes Assistants/Threads
messages through the normal message save, applies the all-data
retention policy to file uploads and shared links, and stamps imports,
forks, and duplicates. Locks the frontend toggle and keyboard shortcut
behind an administrator-enforced badge.
The default temporary mode and the existing all mode are unchanged.
* fix: enforce ephemeral retention when resuming paused chats
* fix: preserve forced retention across pauses and assistant turns
* test: Use Real Module IDs for Installed Package Mocks
* test: Wait for Resumed Retention Persistence
* test: Control Mongo Index Setup in OpenID Fixture
* test: Close Mobile Drawer Before Retention Resume Scenario
* fix: Store Responses API Messages Under the Retention Write Context
Input and output messages were saved with the raw request, so under
ephemeral retention they missed the forced-temporary classification the
conversation received. Route both through getConversationWriteContext
and announce the stored reply as saved.
* fix: Align Resumed Responses With the Parent Retention Deadline
A resumed response was saved with a fresh forced-temporary window while
the re-stamp kept the conversation's earlier deadline, so a chat that
paused again could leave its response stored after the conversation
expired. Stamp the saved response with the parent's deadline.
* fix: Clear Released Bookmark Tags When Forcing a Chat Temporary
stampForcedRetention released a converted chat's bookmark counts but
kept its tags, so deleting that chat before TTL removal decremented the
same tags again and reduced counts owned by other visible chats. Clear
the tags in the conditional conversion update that releases them.
* fix: Store No Bookmark Tags on Forced-Temporary Imports
An ephemeral import, fork or duplicate skipped its tag count increment
but kept the source tags, so deleting the copy before TTL removal
decremented counts owned by other visible chats. Store the same tags the
import counts, which is none for a forced-temporary copy.
* test: Provide the Forced-Temporary Retention Helper to the Header Stacking Mock
* test: Reuse One Admin Login per Worker in Ephemeral Retention Scenarios
* fix: Keep Legacy Temporary Chats Temporary When Forking Under All-Data Retention
* fix: Convert a Resumed Chat Under Ephemeral Retention Before It Can Re-Pause Empty
* fix: Treat a Reloaded Pre-Policy Run as Temporary Once Retention Is Forced
* fix: Stamp Messages with the Deadline a Concurrent Retention Stamp Stored
* fix: Wait for the Startup Config Before Rebuilding a Resumed Submission
* test: Wait for the Resumed Response Row in the Ephemeral Resume Scenario
* test: Provide the Real Command Executor Stamp to the Callbacks Mock
(cherry picked from commit
|
||
|
|
2e0690616f |
⛴️ test: Keep Executor and Timing Callback Adapters Aligned
(cherry picked from commit
|
||
|
|
ea938f6054 |
🚦 feat: Show Exit Status and Stderr for Attached Workspace Commands (#16556)
* feat: Show Exit Status for Attached Workspace Commands
Parse the exit trailer the attached-workspace bash_tool writes so the card
fails a non-zero exit, a signal or a timeout, names the reason beside the
failure suffix, and renders stderr distinctly. The group outcome reads the
same parser so its failed count matches the card. Sandbox output without the
trailer keeps the existing heuristics.
* fix: Parse Exit Status Only for Attached Workspace Calls
The sandbox and attached-workspace tools are both named bash_tool, and the
sandbox output is trimmed, so a sandbox command that printed
"[exit code: 1]" last was read as a failed attached-workspace run by the
card and the group outcome.
The execute handler now records a run step when the resolved tool instance
is the one createAttachedWorkspaceBashTool built (tracked by object
identity), and the step-completed handler stamps executor:
'attached_workspace' on the streamed tool call and the aggregated part.
Redis replay and the client SSE merge carry the field through. BashCall
and outcome.ts parse the trailer only when the marker is set.
* fix: Count Styled Terminal Lines Like Plain Ones When Output Ends in a Newline
(cherry picked from commit
|
||
|
|
e1e1d1b19d |
🎒 feat: Carry Project Context Across Conversations (#15684)
* 🎒 feat: Carry Project Context Across Conversations
* fix: fail a project attach whose upload hold cannot be released and keep file deletes independent of project cleanup
- Attaching a project file now fails, with nothing attached, when the file's
temporary upload hold cannot be released, instead of attaching a file that
can still expire.
- A failed project cleanup after a file delete is logged rather than failing a
delete that already happened, and a user-wide delete clears that user's
project references without reading every file first.
- Both resize handles share the orientation-aware grip, so a primary handle in
a vertical group renders a rotated grip like the alternate one.
* fix: treat an empty tenant id as no tenant in the project file picker
* fix: attach nothing when a project file is deleted while the attach is in flight
* fix: localize project file association failures instead of showing server text
* test: expect a localized reason for a rejected project file association
* fix: scope project file listing to the caller's tenant and name the file limit when attaching an existing file
- Listing a project's attached files now returns not found when the project
belongs to another tenant, matching the available-file listing and the
chat context resolver.
- Choosing an existing file for a full project now names the project file
limit instead of the generic attach error, like the upload path.
* fix: treat an empty tenant id as no tenant in every project tenant check
A caller whose tenant id is an empty string was refused its own tenantless
project when listing attached or available files, because the handlers
compared '' with null. The project handlers and the chat context resolver now
share one comparison that treats an empty tenant id as no tenant, the rule the
project file queries already follow.
* test: wait for the workspace layout swap and the mobile drawer before acting in the long-metadata spec
The desktop title was measured while the phone layout could still be the one
rendered, and the sidebar row menu was opened before the mobile drawer
committed its open state, which closes a menu opened ahead of it. The spec
now waits for the workspace's phone-only sidebar toggle to leave and for the
drawer to drop inert, the same drawer signal the agents helpers use.
* fix: keep the agent context fingerprint of a turn outside any project unchanged
Every turn now passes a project context key into the agent context
fingerprint, and a turn outside any project passed the no-project sentinel,
which changed the digest of every existing no-project checkpoint. An agent
event conversation written before this change then cold-started and reloaded
its history on its next event. The fingerprint now hashes the no-project key
as absent, so those checkpoints keep matching.
* test: load the long-metadata spec at phone width before driving the mobile drawer
The spec crossed back from desktop to phone width without a reload, which
leaves the drawer on the desktop toggle path whose delayed focus handoff to
the close button dismissed the row menu roughly 200ms after it opened. The
spec now reloads at phone width, as a phone arrives, and waits for the
drawer's own focus handoff before opening the menu.
(cherry picked from commit
|
||
|
|
26b6988355 |
🧯 fix: Outlast Failed Auth Cache Eviction on Credential Changes (#16435)
* fix: outlast failed auth cache eviction on credential changes
A credential change committed to MongoDB could report success while a
cached auth user document without the new credentialsChangedAt stayed
readable, so an old OpenID access token kept authorizing until the
cache TTL. The Redis-backed auth cache swallowed every failure (Keyv and
KeyvRedis resolve a failed GET as a miss and a failed DEL as a no-op), and
the eviction helpers stopped at the first error.
- The AUTH_USER_DOC namespace opts into throwOnErrors so a failed read or
delete is visible; every caller of that namespace already catches.
- evictAuthUserDocs attempts every delete even when another fails and
reports whether a document may still be served; the data-schemas and
packages/api invalidation paths share it.
- updateUser waits out AUTH_USER_DOC_CACHE_TTL_MS before returning a
credential change whose eviction was incomplete, so the change is only
confirmed once no pre-change document can be served. Other updates stay
best effort, and later revocations are delayed, never skipped.
* fix: record the reverse index before caching an auth user document
A document written before its reverse-index entry was cached without an
index naming it when the index write failed, so eviction could not find
it. Write the index first with a TTL that outlives the documents it names,
and skip the document when the index write fails.
* test: keep real data-schemas helpers in the pinned order spec
* fix: settle the auth cache after revoking reset credentials
Waiting out the cache TTL inside updateUser held the reset before its
session and passkey revocations, so a live refresh token or passkey could
mint an access token issued after credentialsChangedAt during the wait.
updateUser is best effort again; awaitAuthUserDocEviction retries the
eviction and waits one TTL only when it is still incomplete, and both the
web reset controller and the reset CLI call it after revoking sessions and
passkeys, before confirming the reset.
* fix: settle the credential barrier with a margin and on CLI revocation errors
Timers can fire a millisecond early, so the eviction barrier now waits the
cache TTL plus a 100 ms margin. The reset CLI also settles the barrier when
revoking passkeys or sessions throws, since the password is already changed.
* fix: treat an auth cache that cannot delete as not evicted
* fix: keep the reverse index until every document it names is evicted
A failed eviction still deleted the reverse index, so the credential
barrier's retry found no index and reported the cache clear while the
documents an unreadable index or a failed delete left behind stayed
cached. The index is now deleted only after it was read and every document
it names is gone, so a retry can still find what remains.
* fix: treat a malformed auth reverse index as unreadable
* fix: treat a reverse index with a non-string entry as unreadable
(cherry picked from commit
|
||
|
|
f18db2e84e |
🧪 test: Cover MCP App Operation Limits in Authenticated Startup Config (#16429)
(cherry picked from commit
|
||
|
|
2be35b2f91 |
💬 refactor: ChatForm UI redesign with unified palette (#14473)
* 💬 refactor: ChatForm UI redesign with unified palette
Replace the scattered composer controls (badge row, tools dropdown, attach
menu, floating steer chips) with one system: a searchable palette with
favourites, a composer bar holding active tools plus effort and speech
controls, a tray staging files and manual context, and a queue rail that
buffers messages while a reply is running.
Collapses the 94 development and review-fix commits of PR #14473 into one
commit so the branch could be rebased onto dev once; the upstream merge of
this pull request is a squash merge either way. The pre-rebase history is
kept locally at tag prerebase-backup (afde3e4b9a).
* fix: finish the dev rebase of the composer redesign
The rebase onto dev left four defects the merge itself produced, plus one
review finding the branch had never answered:
- ChatForm's `min-w-0` JSX comment lost its closing brace, so the file did
not parse at all.
- `useSteering` carried both dev's local draft consumer and the host-injected
one under the same name; the host's `consumeDraft` owns the storage key
autosave actually parked on, so the local copy is gone.
- `useUploadOptions` kept dev's `awaitingAgentProvider` gate after the merge
replaced the block that derived `isSavedAgent`; the predicate is back, from
the same `isEphemeralAgentId` the shared allowance helper uses.
- `MessagesView` still reserved a band for the in-flight steer overlay and
read `steerOverlayHeightFamily`, which nothing writes now that pending
steers render inside the streaming reply. The reservation is gone and
`ScrollButton`'s lift is optional; composer panels keep standing the button
down through `composerOverlayCountFamily`.
- The aggregate MCP chip keyed on `mcp:pinned`, which a server literally
named `pinned` also produces (`mcp:${serverName}`), so both entries shared
one React key and one packing slot. It uses a key outside that namespace.
Also drops the locale keys whose only consumers the redesign deleted, ports
dev's extracted-text delivery path into `useAttachExisting` (every
attach-existing surface routes through it now), repoints the mock e2e
built-in helpers at the palette, and repairs test fixtures the merge left
stale (a query mock that blanked agent metadata, a Jotai store mismatch, an
ambiguous tray query, an ephemeral-agent fixture standing in for a saved one).
* test: cover the composer redesign's acceptance scenarios end to end
Twelve mock-harness scenarios, one `@scenario:` tagged test each, over the
behaviours this change is accountable for: the single searchable palette
(open, search, favourite across a reload, keyboard-only operation), the
composer bar and tray (active tool chip, a staged file riding with the
message, a per-turn thinking level that applies to the next turn only), the
queue rail (Enter buffers during a run and drains after it, keyboard reorder
changes the send order, the draft survives run completion), and the composer's
portaled surfaces (Stop reaches the run from inside a portal, a pending tool
approval in the bar resumes the run).
Two contract scenarios are deliberately absent, with reasons: split-pane Stop
isolation is not runtime-reachable because `ChatRoute` mounts one pane, and
code-approval mode mid-run needs an attached stateful code environment the
mock lab does not configure, so dev's `ChatForm.approvalMode` unit spec stays
its coverage.
* fix: make the composer's acceptance run and the whole client suite green
The first verification run of the twelve scenarios passed six and failed six,
and the full client jest suite (which CI runs sharded, unlike the diff-scoped
local precheck) failed fourteen tests. One of each group was a real defect; the
rest were queries and fixtures still aimed at surfaces the redesign replaced.
Defects:
- `useQueueDrain` held its send lock after a revealed queued turn settled, so
the next server-owned row could never be selected. The reveal path now owns
its own lock and releases it when the revealed turn clears.
- `ChatForm` recomputed the during-run slot without `consumeComposer` in its
dependency list, and still carried a landing flag the host prop replaced.
Tests and lab:
- The five `ChatForm.attachments` focus cases now drive the palette dialog and
the tray's quote chips instead of the deleted attach menu and quote popup,
with the same strict focus assertions; the harness gains the `main` landmark
the palette portals into, and the touch fixture a complete `matchMedia`.
- `Palette.spec` no longer closes a hoisted `jest.mock` factory over a later
`const`; `useSteering.spec` follows dev's toast wording.
- The six failing scenarios were repointed at what this lab actually renders:
uploads go through the palette's local-computer row, the reasoning control
needs `interface.parameters`, the queued-row contract is the row and its
drain rather than a control the submit consumes, the palette's keyboard path
uses a built-in the lab grants, the slow-reply wait uses the fixture's chunk
marker, and the approval scenario selects its agent through the builder flow
the passing approval specs use.
* fix: close the eight findings Codex raised on the rebased head
Codex reviewed the rebased heads and reported eight issues; all eight were
real. Two of them concern code this session added.
Behaviour:
- A custom or OpenRouter endpoint that declares neither `paramDefinitions`
nor a `reasoningFormat` no longer gets a reasoning control inferred from the
generic settings list. Capability now has to be declared (a reasoning-key
parameter definition, a non-disabled `reasoningFormat`, or a known reasoning
provider as the default params endpoint); a `disabled` format always
resolves nothing, and every consumer — the composer control, the pre-send
validation and the server — asks the same resolver, so a gateway backed by a
non-reasoning model can no longer offer a level the turn would fail on.
- Restoring a queued attachment keeps its `llmDeliveryPath`, so an extracted
document is routed as its text rather than as raw provider content.
- The placeholder-to-durable reasoning migration now requires this pane's own
live submission, so opening another conversation from a new chat no longer
carries the pending level into it. The created/sync case it was written for
still carries.
- The queue rail treats an acknowledged server-owned row as an ordering
boundary: local rows still reorder among themselves, a server-owned row
cannot move, and a move that would cross one is refused out loud — the
queued-turn API has enqueue, list and cancel only, so a client-side reorder
across that boundary could not be made authoritative.
- The palette resolves an agent's skill scope with `resolveAgentSkillsScope`
instead of treating an empty list as an open catalog, and the attach target
resolves `useResponsesApi` with `resolveUseResponsesApi`, matching what the
run will actually do.
Policy:
- The reasoning-override behaviour moved out of the CJS middleware into
`packages/api/src/modelSpecs/reasoningOverride.ts`, which returns a
discriminated result; the middleware is wiring again, and the behavioural
cases moved with it.
- `showComposerTips` and `showFilesDialog` are Jotai atoms now, the tips
preference keeping its storage key and reaching the composer as a prop.
* fix: make the redesigned composer reachable from the mock e2e helpers
CI's Playwright shard failed four `file-provisioning` tests on this branch
because the shared upload helpers still clicked `#attach-file-menu-button` and
`#attach-file-button`, entry points the redesign removed — attaching now goes
through the palette, which also owns the file input. Both helpers drive the
palette now, `uploadViaLegacyOption` mapping its two destination names onto the
palette rows that route to the code environment and the vector store, and the
specs that drove the old surfaces directly (`code-upload`, `thread-renderers`,
`unified-upload`) follow.
Also closes the last client/server disagreement the acceptance run exposed: a
custom endpoint that declares a reasoning key in `paramDefinitions` had that
declaration merged into the provider defaults and then discarded by model-name
inference, so the composer offered a level for `mock-model-a` that the server
rejected with "Invalid reasoning override". An explicitly declared key now
selects the merged setting before inference, while an undeclared generic custom
or OpenRouter target still resolves nothing.
The twelfth acceptance scenario is rescoped: a paused approval keeps the
composer usable and resumes to completion, but the composer-hosted approval
panel and chip are not asserted, because the pending action is keyed by the
stream's conversation id while the composer stays bound to the new-chat
sentinel — in code byte-identical to dev, and mirroring the write onto the
sentinel did not surface the panel. Tracked at berry-13/LibreChat#39.
* test: finish the acceptance run and keep the client typecheck green
- The thinking scenario read `reasoningOverride` from a `userMessage` wrapper
the chat request does not have; the trace shows the request carrying
`{ key: 'effort', value: 'max' }` at the root, so the assertion reads it
there. Source behaviour was already correct.
- The approval scenario timed out on mobile because the Agent Builder drawer
stayed open after selecting the agent and swallowed the pointer events meant
for the composer; it now closes the sidebar and waits for the drawer to go
inert before sending.
- Two specs typed a named custom endpoint's label as an `EModelEndpoint`, which
CI's client typecheck rejects (the label is exactly what the case is about).
All twelve acceptance scenarios now pass in desktop light, desktop dark and
mobile emulation.
* fix: close the nine findings Codex raised on the verified head
Two were defects in code this session added while closing earlier findings:
- A reasoning key declared in `paramDefinitions` but absent from the generic
settings list was accepted as capability and then never inserted, so the
resolver exposed and validated the generic `reasoning_effort` instead. A
declared key is now appended to the effective settings and resolved before
any fallback, for `effort`, `thinkingLevel` and `thinkingBudget` alike.
- The queue's reorder guard validated from the destination row's own index, so
`target === index` rejected every pointer drag and only keyboard reordering
worked. It validates the dragged row's identity now; the server-owned
boundary, its announcement and the disabled grips are unchanged.
The rest:
- Stop no longer falls through to the document-wide control once a focused
pane has been resolved: focus in an idle pane while another generates used
to abort the other pane's run.
- `PendingSteers` is mounted once in `MessagesView`, above the renderer
switch, so a sent or failed steer keeps its in-flight, retry and
send-as-new surface with `FLAT_THREAD` off, where the recursive renderer
had none and the composer no longer carries a fallback.
- The file-list policy moved out of the CJS route into
`packages/api/src/files/list.ts`, and its cap is `interface`-level config
(`fileListLimit`, default 100) instead of a literal in the route.
- The steer-arm confirmation window is `interface.steerArmConfirmationTimeoutMs`
with its current 10s as the default, travelling the same path as the other
client-consumed timings.
- The pause predicates judge the active branch's tail rather than the last
assistant in array order, so an inactive sibling branch can no longer
enable or disable the inline escalation control.
* fix: move persisted reasoning validation into api package
* fix: restore composer entry points and defaults
* style: normalize reasoning helper formatting
* test: open mobile sidebar before account menu
* test: use settled sidebar layout for mobile account menu
* test: handle empty mobile sidebar in account scenario
* test: target account menu in mobile drawer
* fix: keep composer surfaces and mobile drawer reachable
* fix: let thread approvals receive pointer events
* fix: stabilize composer steering and shortcuts
* fix: commit queue drags and centralize file modal
* fix: return a canceled steer's text to the composer
Canceling a pending steer dropped the words the user had written: the
bubble disappeared and nothing carried the text back, so a reclaim that
the server confirmed still lost the message.
Hand the reclaimed text to `pendingComposerTextByConvoId`, which the
composer already drains on its first render, and append rather than
overwrite when the composer holds a draft the user typed while the cancel
request was in flight.
* fix: close the six findings Codex raised on the pre-rebase head
Pending steers keyed off the Recoil conversation id, which lags the route
during warm-cache navigation, so the surface could sit at the destination
thread's tail while its Cancel and Escalate acted on the source run. It
now keys off the rendered tree, as the mount window already does.
Arming a steer removes the control that was activated, dropping keyboard
focus on the document body. `useSteerEscalate` already exposes `onArmed`
for exactly that; the bubble now passes one that moves focus to the row's
Cancel action.
Opening the file manager from the account menu left its dialog with no
opener: the modal rejects an active element inside a menu, and nothing
supplied a fallback, so closing it returned focus to the body. The opener
is published alongside the open flag and cleared on close, which keeps the
shortcut path's composer-focus behaviour intact.
A steer the server rejected was swept into the queue with no marking, and
the run-end drain then sent those words as a fresh turn without the user
touching Retry or Send as new. Converted failures now carry
`needsExplicitSend`, which the drain skips the same way it skips a row the
rail is mid-edit on.
The queued-turn reconciliation window was a hard-coded 60s, unreachable by
an operator behind a slow proxy or a delayed read replica. It ships as
`interface.queuedTurnReconciliationTimeoutMs` with that value as default,
beside the steer arm timeout it belongs with.
Reasoning-override shape validation moved to
`parseReasoningOverrideRequest` in packages/api, leaving the middleware to
map a rejection onto its own error response.
* fix: keep the composer's reasoning level in step with the parameters panel
`stableConversation` memoized the conversation without any reasoning field
in its key, so editing the level in the Parameters panel produced a new
conversation object that every listed dependency ignored. The composer
went on showing the old level while the next ordinary send already used
the new one.
* test: stop the sidebar helper waiting for a drawer desktop never renders
`ensureSidebarOnScreen` measured `#mobile-drawer` whenever the sidebar had
no Pinned region. Desktop renders no drawer, and `boundingBox()` on a
locator that matches nothing waits for it, so every scenario that reached
that branch at a desktop viewport timed out instead of continuing. Check
for the drawer's absence rather than measuring it.
* test: open the mobile drawer from its inert state, not its geometry
A closed drawer stays mounted and keeps its layout box, so measuring the
Pinned region reported it on screen while every control inside was still
untappable. `inert` is the state the component actually sets when it
closes, so the helper reads that and clicks the header opener before
anything else measures.
* fix: return a canceled steer whole, through one recovery boundary
A steer that stops being a steer was handed back three different ways,
and each one lost something. The immediate cancel wrote `steer.text`
into the composer handoff atom, dropping the attachments, quoted
excerpts, manual skill picks and reasoning override that `settleReclaimed`
then deleted with the pending object. The cancel that won its race
against its own POST cleared the pending marker and restored nothing at
all, so those words disappeared. A definitively rejected steer could
only be resent unchanged, because the row offering to edit it was gone.
Give the recovery one boundary. `useSteerRehome` hands the whole steer
to the composer through the guarded restore the queue rail already uses,
and converts it into an ordinary queued follow-up when the composer
refuses: a draft in the box, another chat on screen, a paused question,
or a composer that unmounted while the reclaim was in flight. The chip
goes either way, since a pending row claiming the server still holds the
words is a lie once they live somewhere else.
The composer is a sibling of the message list rather than its ancestor,
so the thread had no way to reach that restore. The pane's host now
holds the reference and both sides read it there, which also means a
reclaim resolving after the composer is gone refuses instead of writing
into a dead form.
Because the restore refuses rather than overwrites, a draft typed while
a cancel is in flight is no longer glued to the returned steer; the
steer becomes its own queued message and the draft is left as typed.
* test: drive the surfaces these scenarios actually reach
Four scenarios were failing against surfaces the user never touches.
The approval scenario clicked Approve on the thread's copy of the
pending card. The composer's review panel floats over the tail of the
thread and owns the batch submit, so that copy sits behind it and the
click retried until the test timed out. Drive the panel instead; the
thread card stays asserted as the record of the request.
The palette scenario counted rows the moment the dialog painted, then
expected clearing the filter to restore that number. The catalog arrives
in waves: the MCP server list is released by the app-wide warmup timer
and the skills catalog only starts fetching once the dialog's open
effect has run, so the count kept climbing under the test. Wait for the
last wave and for the count to hold still, then snapshot.
The sidebar helper opened the mobile drawer twice through two signals
that disagree. It waited for `inert` to clear, which happens on a state
commit several frames ahead of the slide, then fell through to a
bounding box still reading off-screen and clicked the opener again, into
a machine already opening. One open, through `inert`, then wait for the
drawer to settle in the viewport.
Splitting the cancel scenario follows the recovery change: an empty
composer takes the steer back, and a staged draft keeps the box while
the steer becomes a queued message of its own.
* fix: hold a server-rejected steer for an explicit send
Editing a definitively failed steer falls back to the queue when the
composer will not take it. Queued like any other follow-up, the run-end
drain would send it the moment the reply finished, which turns the
server's refusal into an automatic new turn carrying the payload it
refused.
Mark that fallback the way the rest of the rejected-steer path is
marked, so the row waits for the user to send it.
* test: restore two assertions this branch broke while rewriting specs
Both specs were updated for the redesigned surfaces and both lost a step
they needed, and both fail deterministically in CI as a result.
thread-fold pressed Enter mid-run and waited for a queued row, under a
comment claiming Enter queues by default. It does not: the default
during-run action is steer, so Enter produced a pending steer and the
queued row the next line waits for could never appear. Ctrl/Cmd+Enter is
what takes the other action, which is the one this test needs.
mcp-oauth-readiness asserted on the server card's Cancel button straight
after clicking Connect. Connect opens the OAuth dialog over the panel,
and it is modal, so while it is open the card underneath is marked
aria-hidden and Cancel is not in the accessibility tree at all, which is
why the failure reads "element(s) not found" rather than "not visible".
The rewrite dropped the dismissal the previous flow performed; restore it
as a helper both call sites share.
* test: reach the account menu without the pinned section
The two account-menu tests borrowed `ensureSidebarOnScreen`, which also
settles the Pinned section's placement for the pinned specs. They never
touch that region, and on a run where an earlier test left a pinned
conversation the section exists but has not been laid out yet, so both
tests spent fifteen seconds polling it and failed on the wait rather than
on anything they assert.
Give them a helper that does only what they need: open the mobile drawer
from `inert`, the one signal that distinguishes a closed drawer from an
open one while it stays mounted, then wait for the slide to reach the
viewport. Desktop renders no drawer and needs nothing.
* test: open the drawer by what it shows, not one early read
The helper decided once, from a single read of `inert` taken right after
navigation. On a fresh mobile load the drawer can still be mounting, so
that read reports a state the app has not settled into, the helper
returns believing the drawer is open, and the account menu inside it is
never shown.
Retry against the thing the caller actually needs, the account menu being
visible, re-checking before each attempt. While the drawer is open its
control is labelled "Close sidebar", so the retry cannot toggle it shut.
* fix: keep the composer observing MCP authorization where its tools apply
The old badge row mounted its provider with observeToolAuthorization set
whenever the composer showed ephemeral tools, so on a plain endpoint the
chat kept MCP connection status and discovered tools in the query cache.
The redesigned composer mounts the same provider without the prop, so it
defaults to off and nothing on the chat side loads that state any more.
The Agent Builder's tool library reads that cache. With it empty, every
server reads as Unknown with no tools, and clicking one opens its detail
dialog offering to connect instead of adding it to the agent.
Pass the same gate the badge row used: showTools is the old
showEphemeralBadges expression.
* test: let the palette close before reopening it, and name what is asserted
enableBuiltinTool pressed Escape and returned while the palette was still
animating out. A caller that reopened it straight away resumed the same
popover, scroll offset included, so the Attach rows at the top sat outside
the virtualized window and upload helpers timed out looking for them. Wait
for the dialog to be gone before returning.
The staged-file assertions matched the bare file name, which the palette
now also lists under recent uploads while it closes; scope them to the
tray they are about.
The OAuth dialog dismissal waited for a title built from the server's
display name, but the dialog is titled with the server name.
* feat: make the queued-send lock expiry configurable
The per-pane lock that stops the run-end drain and an explicit Send now
from submitting the same queued message twice gives up a broken claim
after a fixed 60 seconds. Until then every drain and every Send now for
that pane is refused, and a deployment had no way to tune that window.
Expose it as interface.queuedSendLockTimeoutMs beside the queued-turn
reconciliation timeout, defaulting to the same 60 seconds so nothing
changes unless an operator sets it. The interface loader copies each
field explicitly, so the value is added there too; without that line a
configured value would never reach the client.
* fix: decline interrupt-and-steer while reasoning is staged
With a reasoning choice staged, the Interrupt & steer row is disabled,
but its keyboard chord still reached interruptSteer, which fell back to
interruptAndSend: it aborted the run and threw away the partial answer
the action promises to keep.
A staged reasoning choice belongs to a new generation that a steer into
the live one cannot carry, so decline the chord exactly as the row does,
the same way the function already declines while paused on an approval.
The words stay in the composer, where Enter queues them as a turn of
their own.
* fix: wake the queue drain when a late steer retry is queued
Retry marks a failed steer sending, and a sending steer is kept out of
the run-end sweep so its own POST settles it. When the run finishes
while that POST is in flight, the drain spends its one-shot signal on a
queue the steer is not in yet; the late ack or NO_ACTIVE_RUN then moves
it into the queue, where it sat until the user sent it by hand or
another run ended.
Every other late conversion re-posts the last completed run end through
the composer's rewakeDrain. The retry lives in the thread, so the
composer now publishes that function through the same host it already
uses to hand a reclaimed steer back to the draft, and the retry calls it
after converting. It stays a no-op unless the run completed cleanly and
no newer signal is armed, or when no composer is mounted.
* fix: honour thinking-budget ranges wider than 200,000
The request-scoped reasoning override capped thinkingBudget at 200,000
in the shared schema. An operator's paramDefinitions may advertise a
wider range, and the composer renders it, but every value above the cap
was dropped by the control's parse and rejected by the server's before
the range-aware check could run.
That check already exists: resolveReasoningOverride validates the value
against the endpoint's resolved range. Drop the fixed ceiling so the
resolved range is the bound, keeping the integer and lower-bound rules.
The new case covers both directions on a custom endpoint whose range
goes to 500,000.
* refactor: persist the preliminary reasoning override through the shared helper
The agents controller validated the request's reasoning override with
the schema itself before writing the preliminary user message. That is
behavior in the CJS layer, and it duplicated resolvePersistedReasoningOverride,
which @librechat/api already exports and BaseClient already uses for the
same field.
Call the helper instead. A preliminary message is always a fresh turn,
so it is never an edit or a compaction. The two controller specs that
replace @librechat/api with a hand-built mock now take the real helper.
* fix: clear the file manager's state at the session boundary
The file manager's open flag and its opener live in Jotai's default
store, which outlives the authenticated route. A file manager left open
at logout reopened for the next account, still holding a ref to the
previous session's unmounted opener. Reset both in useClearStates, next
to the other composer state this branch already clears there.
* fix: decline interrupt-and-steer on the first turn while reasoning is staged
* test: read the phone layout from the viewport and keep the drawer open
* fix: name both reasons a queued message cannot be edited yet
* test: reuse a published file through the composer palette
* style: move the composer onto the design-system rules
* style: move the file row's new layout styles into classes
* fix: keep the composer's reused thumbnails, focus ring and disabled dimming intact
* fix: bring a steer back when its deferred cancel does not remove it
* fix: treat a run as over only when every pane holding it is idle
* refactor: pass enter-to-send into the composer from its host
* feat: make the palette's recent-file count configurable
* fix: let a file already in the composer be reattached at the limit
* test: hide the chip before replaying a deferred cancel
* refactor: restore the resume request through one packages/api facade
* fix: keep a conversation's staged reasoning across a visit to another model
* fix: keep a connected MCP server's variables configurable from the palette
* fix: resolve every pane-scoped shortcut through the pane holding focus
* refactor: keep every reasoning-override decision out of the /api wiring
* perf: skip paging the skill catalog for an agent that can show no skill
* test: type the reasoning snapshot the override helper records
* test: pin the applied budget and the untouched parameters in the override specs
* style: give the stop button the send button's shared submit recipe
* fix: name only the newline key when no chord sends
* fix: name the stop key only once the stop control can act
* fix: clear every staged reasoning selection at sign-out
* fix: stop advertising send-now while staged reasoning forces a queue
* fix: resolve the reasoning target of an ephemeral agent in the composer and the request
* test: type the staged reasoning the sign-out spec seeds
* fix: check the composer will take a queued row before discarding its parked copy
* style: carry the composer's classes onto Tailwind v4
* style: sort the composer's classes in Tailwind v4 order
* fix: return a refused queued row to the durable queue instead of memory
* i18n: localize the whole attachment-limit message
* refactor: validate the reasoning override inside the packages/api facade
* style: give the composer's submit slot its own IconButton variant
* test: pin the submit slot to IconButton's submit variant
* test: stub the seen-state hook the rebased MessagesView now calls
* fix: turn file search on for an embedded file attached through the shared hook
* chore: record the composer's design-rule counts against the rebased base
* fix: keep the composer's container query inert under Tailwind v4
* test: point the v4 focus scenarios at the redesigned composer's controls
* fix: keep a re-queued row on its own lineage after the run ends
* test: assert a re-queued row carries its lineage
* refactor: pass the dictation preferences into the composer from its host
* test: read the usage atom from the store the ask hook renders under
* fix: read a pending steer's pause from its own pane's branch
* a11y: keep focus on the quote chips until the last one is removed
* fix: keep staged reasoning for the next message across a manual compaction
* test: expect focus on the remaining quote chip after removing one of two
* style: sort the imports the canary rebase merged
* refactor: remove the side-panel files table the account menu replaced
* fix: settle a retried steer's late ack against a racing cancel
A cancel clicked while the retry POST was in flight left the optimistic
marker unread: the ack re-minted a live chip and injected words the user
had asked back, and a failed retry after that cancel lost them entirely,
because the failure path maps chips the optimistic cancel had removed.
The ack path now defers to the marker the way the composer's does, the
failure path re-adds the chip before settling it, and the queued row a
late ack produces binds its recovery identity only under protocol v2,
the same default the composer's degradation path trusts.
* fix: strip a replayed reasoning override that no longer validates on resume
A paused turn's reasoning override is replayed onto its resume request
and then validated as if it were fresh client input, so an operator
changing the endpoint's reasoning config between pause and approve made
the checkpoint permanently unresumable with a 400. The replay now marks
the request, and a replayed override that fails validation is stripped
so the resume proceeds on defaults; a fresh override that fails is still
rejected.
* refactor: derive the enforced spec fields inside the modelSpecs facade
The set of keys an enforced model spec locks is the input contract of
the reasoning-override refusal rule, and deriving it in the route
middleware left the policy untestable from packages/api and free to
diverge from the facade that owns the rest of the preset application.
applyModelSpecPreset now returns the enforced fields beside the private
ones it applies, and the middleware consumes them.
* fix: restore the pre-override parameters when a resume degrades
Stripping a replayed reasoning override that no longer validates removed
only the metadata field, while the resume had already replayed the paused
turn's model parameters with the override applied into the endpoint
option, so the provider still received what validation had refused. The
strip now inverts the application from the replayed base: the recorded
pre-override value returns and the thinking flag the override forced on
comes off.
* fix: resolve the effective responses route for upload targets
The attach target returned the conversation or agent's saved
useResponsesApi flag, so an Azure chat auto-routed to the Responses API
by responsesApiRouting preflighted its uploads against the chat
completions route and lost provider-document uploads. The resolver now
applies resolveEffectiveUseResponsesApi with the endpoint, model,
web-search state and routing policy, the same resolution the during-run
upload target makes.
* fix: name the interrupt chord in the hint only while it still interrupts
The during-run hint advertised Alt+Enter Interrupt & send even when the
chord had been claimed: a submitMessage rebound to Alt+Enter, a chord
yielded to a global shortcut, or shortcuts disabled altogether each make
the keydown resolver return something else. The hint now reads the same
resolver verdict the during-run send button does and omits the chord it
no longer owns.
* test: assert the unseen count the scenario adds rather than a zero baseline
The tab title counts every unseen conversation, and a shared
verification run leaves legitimately-unseen conversations from earlier
scenarios behind, so the three title-count scenarios failed on other
scenarios' leftovers instead of the behavior they seed. Each now reads
its baseline and asserts the count it adds and clears.
* test: hold the unseen count to its direction on the mobile project
The away poll that lights a dot also discovers conversations the client
had not counted yet, so on the mobile project the title count can jump
past any baseline taken mid-test. Opening still has to clear this
conversation's contribution and an away reply still has to raise the
count, which is what the assertions now hold.
* test: enable the MCP Apps server through the redesigned palette
The MCP Apps integration spec still drove the old composer's MCP
Servers menu, which the redesign replaced with toggleable rows in the
attach-and-tools palette; the lane failed on the missing menu on every
run. The helper now opens the palette, waits for the server wave, and
flips the row's pressed state.
* fix: preserve numeric reasoning defaults on blur
* test: reopen persisted code cards before checking highlights
* test: follow the current file manager navigation
* fix: offer only reasoning options a request override can carry
* fix: keep the favorited copy when skills share a name
* fix: restore composer focus by the interaction that closed the palette
* test: expect a keyboard close to refocus the composer on every project
* chore: re-record the design-rule backlog on the rebased composer
* chore: drop the files table and label the rebase brought back
* test: tolerate other projects' unseen conversations when marking one unread
* test: open the file table header scenario from the account menu
* fix: let the stop shortcut reach a hidden stop control from a dialog
* fix: keep staged reasoning out of tool-limit recovery and MCP App turns
* fix: degrade a queued turn's stale reasoning override instead of dead-lettering it
* fix: refresh the attach target when web search changes the route
* fix: re-arm the run-end drain after moving a steer to the queue
* test: hover the MCP row before reaching its revealed Connect action
* test: pick the parts scenario's MCP server from the tools palette
* fix: cancel a recovered row's parked steer only after the composer takes it
A recovered row's only durable copy is the steer parked on the server, and
once its run has ended nothing can re-create it, so a composer that refused
the row after the cancel left the words in memory until the next reload.
The composer now takes the words first; a cancel that then fails holds the
row out of the run-end drain instead of sending it a second time.
* fix: name only the idle composer affordances that act
* fix: keep steer escalation off until the pane owns the rendered conversation
The branch tail that decides whether a run is paused is keyed by the pane's
conversation, which can still name the previous chat while a cached one
renders. Until the pane catches up, a pause on any cached branch now keeps
Escalate disabled instead of reading a missing or foreign tail as unpaused.
* fix: route the host's Enter and auto-send preferences into the composer's nested hooks
ChatForm takes enterToSend and autoSendText from its host, but useTextarea,
DuringRunSendButton and both speech engines still read the store atoms, so a
host whose values differ advertised one behavior while the handlers ran
another. Pass the host values through instead.
* fix: settle a browser dictation take only after its final transcript lands
stopListening resolves on the recognizer's end event, after the final result
reached useSpeechRecognition's reducer but before React committed it, so the
take settled while the composer still held the interim text. Settle from an
effect declared after the transcript effect, off a state update queued behind
the result.
* fix: drop a restored reasoning override the current setting no longer offers
The staged override was only checked for a matching parameter key, so a value
restored after a capability change on the same target stayed staged, blocked
live steering, and was dropped at send time. Validate it against the setting's
options and range.
* test: scan the attach and tools palette for accessibility
The a11y suite still opened the removed tools dropdown. Open the palette
instead, and add a scenario that runs Axe over the open palette.
* fix: make the palette's virtualized list the grid that owns its rows
The rows sat under a wrapper grid behind react-virtualized's scroller, which
always renders aria-label and aria-readonly and so could not be made
presentational. Axe reported both the disallowed attribute and the grid's
invalid child. The scroller is now the labelled grid, with a rowgroup holding
the rows.
* fix: state the palette grid's row total and each row's position
Only the rows in view are mounted, so without aria-rowcount and aria-rowindex
assistive technology reads the rendered window as the whole grid.
* fix: key an empty destination's pending steers to the route
An empty tree has no message naming its conversation, so the pending-steer
surface fell back to the chat context, which still names the source chat
during warm navigation, and its controls acted on the source run. Fall back
to the chat's messages key, which follows the route.
* fix: keep assistant uploads available when the file config fails
Assistants upload directly and never needed the destination policy, which is
why the replaced AttachFileChat rendered their uploader outside the policy
gate. Restore that exception so a failed or paused file config request does
not remove every attachment entry.
(cherry picked from commit
|
||
|
|
8ffdee3b4b |
🗂️ feat: Chat List Properties Menu and Project-Scoped Chats (#16246)
* feat(client): Rebuild the chat list filter as a properties menu
The old menu listed every option at once. It now opens on three rows that
state where the list stands, Show, Sort and Filter, each with its current
value and a submenu holding the choices. Reading the list's state no longer
means reading the whole menu.
Filter holds the five facets and a search field that looks inside them, so
typing openai finds the endpoint rather than the category that contains it,
and typing a category name offers everything under it. Reset sits in the
header next to the title, and the active facet count rides on the trigger.
The facets are one derived atom, so the query key and the request are built
from the same description of the filter. Date cutoffs snap to local
midnight: taken from the current instant they would differ on every render
and refetch the list each time.
The panels also fade their content at the foot when a list runs past the
fold, and the chat list's loading label shimmers the way every other
in-flight label in the app does.
* feat(client): Show a project's chats under that project only
A chat assigned to a project was listed twice in one sidebar: once under
the project and once in Chats. The chats list now asks for the chats that
belong to no project, which the list query and its cache helpers already
knew how to answer.
Search and the archived view keep asking for everything. Projects is not
rendered while a search is on, and an archived chat has no project row to
appear under, so excluding them from either would leave a chat with no way
back to it.
* fix(client): Keep facet-filtered caches honest and the facets session-scoped
Cache writers judged list membership only by project, archive, tags and
sort, so an SSE update or a fork could insert a chat the server's filter
had excluded. The endpoint and date facets are decided from the row
itself, and the attachment and sharing facets mark their variants for a
refetch, since only the server can place a row in them.
The date cutoffs now derive from a day anchor a mounted consumer
advances at local midnight, so a tab left open stops serving
yesterday's today. Facets reset at the authentication boundary with the
rest of the session state, the bookmark query stops firing for roles
without BOOKMARKS:USE, an empty Chats section under existing projects
says so instead of claiming the account is empty, and the design-rule
violations this branch had suppressed in Conversations and
ChatFilterMenu are fixed and their entries pruned.
* test(client): Mock the projects query the chats section now reads
* test(e2e): Acceptance scenarios for the chat list properties menu
* fix(client): Call the account empty only once its projects have loaded
An empty Chats list read as "No chats yet" whenever the projects query
had not succeeded, so a slow or failed projects request claimed an
account was empty when its chats may all live under projects. The
account-level wording now needs a loaded, empty project list; otherwise
the section says only that nothing sits outside a project.
* test(e2e): Scenario for the Filter submenu under a role without bookmarks
* fix(client): Drop a cached chat from an endpoint filter it no longer matches
The endpoint facet only guarded insertion, so a chat already in an
endpoint-filtered list stayed there after switching provider until the
next refetch. List membership now includes the endpoint for existing
rows as well; a row with no endpoint stays until the server decides.
* fix(client): List every chat when the projects fail to load
Scoping Chats to unassigned chats hid every project chat behind the
Projects section, which shows nothing when its request fails. A failed
project list without cached data now leaves Chats unscoped, so those
chats stay reachable, and an empty unscoped list reads as an empty
account.
* test(e2e): Scenario for project chats when the projects fail to load
* fix(client): Count the bookmark filter once in the menu trigger
The trigger added one per selected bookmark while the Filter row counts
the whole bookmark group as one, so a screen reader heard two different
totals for the same state. Bookmarks now count once, like the endpoint
facet.
* fix(client): Stop the endpoint filter at the configured limit
The Endpoint facet let a user pick more endpoints than
conversationList.maxEndpointFilters allows, and the list request past it
answered 400, leaving Chats in its error state. The post-login startup
config now publishes the limit, resolved by the same helper the list
parser uses, and the facet disables further endpoints once the
selection reaches it, with a note saying why.
* test(e2e): Scenario for the endpoint filter limit
* fix(client): Hold the endpoint filter until its limit is known
The sidebar renders before the post-login startup config resolves, and
until then the Endpoint facet had no limit to enforce, so a selection
made in that window could pass conversationList.maxEndpointFilters.
Endpoints are now offered disabled until that config has loaded.
* fix(client): Keep a chosen bookmark removable and a failed config unlocked
A selected bookmark whose last chat dropped it fell out of both bookmark
lists, so only Reset could clear it; a selected tag now stays listed.
The Endpoint facet waits only while the startup config is loading, so a
config that failed no longer locks every endpoint without saying why.
* test(e2e): Scenario for a chosen bookmark whose count drops to zero
* fix(client): Keep a chosen endpoint removable when the deployment stops listing it
An endpoint that left the endpoints config, or a config that failed to
load, dropped out of both endpoint lists while it stayed selected, so it
kept narrowing the chats and could not be turned off. Both lists now come
from one helper that keeps the selection listed.
* docs(client): Punctuate the list membership comments without dashes
* fix: Publish the chat list filter limits the list route enforces
The startup config published maxEndpointFilters from the caller's merged
config while the list route reads the deployment's base config, so a
principal override could let the sidebar allow a selection the route
refused, or disable one it accepted; and the endpoint name limit was not
published at all, so a long custom endpoint name could be selected and
turn the list into a 400. Both limits now come from one loader the list
route also uses and are published together as conversationListLimits;
the Endpoint facet leaves out names past the length limit.
* fix(client): Keep a deleted bookmark removable from the filter
A selected bookmark that was deleted no longer came back from the tags
query, so neither bookmark list could show it and only Reset cleared it.
Both lists now come from one helper that keeps every selected bookmark.
* fix(client): Offer a retry when a project's chats fail to load
Chats lists only chats outside any project, so a project whose own chat
request failed hid its chats behind the empty state. The project now says
its chats could not load and offers a retry.
* test(e2e): Scenario for a project whose chats fail to load
(cherry picked from commit
|
||
|
|
3a73e508fc |
🛶 fix: Reconcile Canary Server Startup and Static Gates
(cherry picked from commit
|
||
|
|
c0ea79ad12 |
🔎 feat: Filter the Conversation List by Date, Endpoint, Files, and Sharing (#16245)
* feat(api): Filter the conversation list by date, endpoint, files and sharing
The list query takes five new facets. Dates and endpoints narrow it
directly; hasFiles matches conversations that carry at least one file;
sharedOnly resolves the user's live share links and matches their
conversation ids, since a share expires and a denormalized flag on the
conversation would outlive it.
parseConversationListFilters owns what a valid facet is, so the route keeps
the call and nothing else. A malformed date fails the request rather than
being dropped: a filter that is quietly ignored answers with the
conversations the user asked not to see. The endpoint list is bounded at 50
names of 128 characters to keep an unbounded $in out of the query.
Two indexes back the new paths: user, archived, endpoint, updatedAt on
conversations, and user, conversationId on shares.
Cursor pagination is unchanged, so a filtered list pages the same way an
unfiltered one does.
* fix(api): Read the attachment facet from messages and tighten filter parsing
The hasFiles facet matched only the conversation's own files array, which
the standard send flow never writes: uploads ride on user messages, so an
ordinary chat with an attachment was invisible to the filter. The facet
now OR-matches message-derived conversation IDs alongside the
conversation-level array.
Dates are validated as ISO 8601 before construction, so 2026-02-30 and a
bare year no longer roll over into an unintended cutoff, and a mistyped
hasFiles or sharedOnly value fails with 400 instead of reading as absent.
The endpoint count and name-length limits moved to conversationList in
configSchema and are injected into the parser, so a deployment serving
more endpoints can raise them. The shared filter resolves its IDs with
distinct and reuses the set to mark isShared, dropping the second
SharedLink query on every filtered page.
* test(api): Exercise the real list-filter parser through the convos route
The route mock re-implemented the parser loosely: it ignored the configured
endpoint limits and dropped a mistyped flag, so a route that stopped
forwarding conversationList or stopped answering 400 still passed. The mock
now wraps the real parser, and the facet tests cover a mistyped flag and an
endpoint list over the configured limit.
* test(e2e): Acceptance scenarios for the conversation list facets
Each facet is exercised against the running API with its own endpoint name, so the
rows a test seeds are the only rows the filter can return: date cutoffs on updated
and created time, an OR-matched endpoint list, an attachment that only exists on a
message, shares that are live, expiring or lapsed, malformed facets answering 400,
and a list without facets returning what it did before.
* fix(api): Read the list filter limits from the base config
conversationList never reached the resolved app config: AppService builds it from
an explicit field list and the new knob was not on it, so a configured limit was
silently ignored and the defaults always applied. It is now carried onto AppConfig.
The list route also stops resolving the caller's merged config for it. The limits
are deployment-level, and configMiddleware put principal and override reads in
front of every cache-cold sidebar request, including ones with no facets; the base
config is in memory.
* fix(api): Read a list cutoff without an offset as UTC
A timestamp without Z or an offset was handed to new Date(), which reads it in the
server's local zone, so the same request selected different conversations on hosts
in different zones. It is now UTC, matching how a date-only cutoff is read.
* test(api): Share the base-config mock across the convos route specs
* perf(api): Start the attachment and share lookups together
With hasFiles and sharedOnly both on, the message-attachment lookup finished
before the share lookup began, adding the two latencies on every page. Both are
independent user-scoped reads, so they now run in parallel.
* refactor(api): Resolve the list filter limits in one place
The 50 and 128 defaults lived in both the parser and the schema's comments. They
are now field defaults on conversationListConfigSchema, AppService resolves them
(an invalid block keeps the defaults), and the parser takes the resolved values.
The base-config read moves out of the CJS route into
resolveConversationListFilters, which receives getAppConfig from the route.
* fix(api): Keep the list config read inside the route's error handling
* perf(api): Read the list limits only when a request names endpoints
The base config sits behind the config cache, which can be Redis, so every
sidebar request paid that round trip and could fail on it even though the limits
bound only the endpoint facet. A request without endpoints now reads no config.
* fix(api): Accept list cutoffs with microsecond or finer fractions
The cutoff pattern allowed at most three fractional digits, so a valid ISO 8601
timestamp from a serializer that emits microseconds (Python, most databases)
answered 400. Any fraction is accepted now and Date keeps the milliseconds.
* fix(data-schemas): Count files attached to message content parts in the file facet
A file attached through a mid-run steer is stored on the steer content part
rather than on the message, so hasFiles=true left that conversation out.
* fix(data-schemas): Match every content-part file shape in the file facet
Replay reads a file on a content part as files[], file.file_id,
image_file.file_id or a bare file_id; the facet matched only files[].
* fix(data-schemas): Count tool and assistant attachments in the file facet
A file a tool produces is persisted on message.attachments, the one place
on a message the facet did not read, so a chat whose only file was
generated output was left out of hasFiles=true.
* fix(data-schemas): Count download-only attachments in the file facet
A code or tool result can persist an attachment with a filepath and no
file_id; the client renders any attachment with a filepath as a file,
so the facet now uses the same rule.
(cherry picked from commit
|