Commit graph

2610 commits

Author SHA1 Message Date
Marco Beretta
44f42516fb
fix(client): Open the mobile drawer below a site banner (#16611)
The drawer was fixed to the viewport, so a configured site banner, which
sits above the app and is sticky over it, painted over the drawer's header
strip and left its close toggle, panel switcher and New chat untappable.
The drawer is now absolute inside the app container, as the scrim and the
pane already are, so it opens below the banner. Without a banner the
container starts at the top of the screen and nothing moves.
2026-10-01 18:40:09 +02:00
Marco Beretta
66dd692028
🎛️ refactor: Pass the New-Chat Panel Preference Into the Sidebar (#16605)
* refactor(client): Pass the new-chat panel preference into the sidebar

Both new-chat controls, the desktop rail's and the mobile drawer's, read
newChatSwitchToHistory straight from the store. It is an app-global
preference the sidebar only consumes, so the host (Root) reads it and
passes it down, and the sidebar no longer reaches into the store for it.

* test(e2e): Cover the new-chat panel preference on desktop and mobile
2026-10-01 18:39:47 +02:00
Marco Beretta
7305d5dfa5
🔗 fix: Hide the Viewer's Deployment Theme While a Shared Link Loads (#16608)
ShareView registers its deployment-theme override from the commit it mounts,
with no theme until the link's config is ready, so an in-app navigation to
a shared link no longer keeps the viewer's theme on screen while that
config loads.
2026-10-01 18:06:56 +02:00
Marco Beretta
7e466a498d
🎛️ refactor: Hand Chat Preferences to the Host and the Follow-Up Queue to Jotai (#16604)
* refactor: Supply saveDrafts and isTemporary Through Chat Settings

Both preferences are app-global: the settings dialog writes saveDrafts,
and the chat route and keyboard shortcuts write isTemporary. Every chat
reader (composer, autosave, pasted-text edit, new chat and new convo,
file uploads, submissions, the temporary toggle, landing, run code) now
takes them from the host ChatSettings context, which the app fills from
its store. ChatView still reads saveDrafts from the store while #15911
owns it.

* test: Cover Chat Settings Preferences End to End

* fix: Read the Temporary Flag at Run Time in Run Code

* test: Supply saveDrafts Through Chat Settings in the Hook Specs

* test: Pin the Run Code Retention Flag With a Stable Code Ref

* test: Turn Temporary Chat On Through Its Toggle in the Scenario

* refactor: Move the Queue Run-End Atoms to Jotai

The follow-up queue, its settled receipts and pending enqueue ids, the
pane and parked run-end signals, and the interrupt-drain flag are
written and read only by chat logic (queue drain, steering, the SSE
hook, the queue rail). They now live in store/queue as Jotai atoms with
every consumer converted. The run-end FIFO keeps its nullable one-shot
API as a writable derived atom.

* test: Cover the Chat-Owned Queue State End to End

* test: Give Each Queue Rail Its Own Store in the Split-View Spec

* test: Drop the Parked Run-End Scenario Canary Does Not Meet

* refactor: Keep the Queue State Inside the Chat Feature

The queue atoms and their types move from store/queue to hooks/Chat/queue,
next to the drain that owns them. store/families re-exports the types so
existing imports keep working.

* refactor: Import the Queue Types From the Chat Feature

* test: Scope the Split-View Queue Spec to What Its Harness Proves

* test: Run the Split-View Queue Spec on One Shared Store
2026-10-01 17:47:26 +02:00
Marco Beretta
5a6316ec6a
🪗 fix: Open the Lone Tool Call Directly and Label Settled Commands Ran (#16547)
* fix: Open the Sole Tool Call in a Group and Label Finished Commands as Ran

A tool group with exactly one call opened into a second collapsed row, so
reading the result took two clicks. Tool cards now default open when they
are the only call in their group, through SoleToolContext, while nested
subagent messages reset it. The generic finished label for commands reads
Ran command instead of Finished running.

* fix: Open the Sole Tool Call Inside an Activity Phase

The live and settled activity phase card wraps its tool calls without a
ToolCallGroup, so a phase holding one bash call still opened into a second
collapsed row. The phase now sets SoleToolContext for a single call. The
mock tool-steps scenario matches the Ran command label.

* style: Sort Imports in ToolCallGroup Test

* test: Assert Sole Tool Card Disclosure on a Real BashCall

* test: Add Lone Tool Call Scenario

* test: Match Ran Command Label in Exit Status Tests

* fix: Let an Activity Phase Decide Sole Tool State for Its Groups

* fix: Keep the Reader's Tool Card Choice Apart From the Sole Call Default

Every local-state tool card stored its default and the reader's choice in one
sticky boolean. A sole card stayed open after its group gained a second call,
and a card that remounted while a live batch regrouped forgot that the reader
had closed it. Cards now keep the explicit choice in the per-tool disclosure
atom and derive the default on each render. A generic call that returned no
output but has arguments also opens as the sole call.

* test: Add Multi Call Group Scenario

* fix: Keep the Auto Expand Preference Waiting for Output on Generic Calls

* test: Scope the Multi Call Scenario to Its Tool Cards
2026-10-01 17:44:48 +02:00
Marco Beretta
d9fdfddce9
🗂️ feat: Give File-Type Tiles Their Own Theme Roles (#16603)
* feat: Give File-Type Tiles Their Own Theme Roles

The file chips in the composer, the file table and message attachments drew their tile in one of seven hard-coded hex fills from utils/files.ts and their glyph in raw white, so a theme could recolour neither. Each kind of file now has a file-* fill role and the glyph reads file-ink; every LibreChat theme keeps today's colours, and ClickHouse draws the tiles from Click UI palette steps that keep the white glyph legible. The tile fill travels as a fill utility, the way the trace kinds already pass theirs.

* test: Pin the File Tile Roles in the Composer Tray

* test: Attach File Tile Captures to the Report

* fix: Keep FileIcon's Colour Fill and Take the Role Through fillClassName

* fix: Hold High Contrast File Tiles to AA Against Their Glyph

* fix: Ink the File Upload Spinner With the Tile Glyph Role
2026-10-01 17:44:29 +02:00
lia-by-librechat[bot]
99015144e4
🪀 fix: Stop the Textarea Jump During File Uploads (#16623)
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
Co-authored-by: Lia <lia@librechat.ai>
2026-10-01 09:47:34 -04:00
lia-by-librechat[bot]
34df3ace40
🧑‍🍳 fix: Distinguish Tool Preparation From Execution (#16619)
* 🧑‍🍳 fix: Distinguish Tool Preparation From Execution

* fix: Cover Grouped Preparation and Preserve Integration Labels

* fix: Announce Background Tool Preparation Consistently

* style: Match Dev Image Card Class Ordering

* fix: Cover Legacy Tool Preparation and Localized Group Counts

* fix: Align Question Preparation and Activity Integration Fixtures

---------

Co-authored-by: Lia <lia@librechat.ai>
2026-10-01 09:47:15 -04:00
Marco Beretta
d3d9bc9703 🖍️ feat: Give the Remaining Component Colour Literals Theme Roles (#16597)
* feat: Give the Last Component Colour Literals Theme Roles

The default avatar's hairline, the file drop zone's artwork and a dragged badge's lift were literals in Avatar, Icon, MessageIcon, DragDropOverlay and Badge, so no theme could reach them. avatar-edge, the illustration roles and the elevationDrag appearance role now carry them, each defaulting to the literal it replaces in every bundled theme. ClickHouse paints the artwork from Click UI's info ramp.

Canvas, favicon and screenshot code read roles through readThemeColor instead of wrapping channel triplets by hand. The Reasoning fade mask, two comments and dead commented-out SVG fills no longer carry colour literals, and the allowlist is regrouped into nine justified entries.

* test: Pin the Avatar Hairline, Drop Zone Artwork and Drag Lift Roles

* refactor: Export readThemeColor Beside the Theme Atoms

* test: Compare the Avatar Hairline by the Pixel It Paints

* test: Compare the Drag Lift as the Browser Computes It

* test: Attach Drop Zone Artwork Captures to the Report

* test: Pick the Drag Lift Theme From One Init Script

(cherry picked from commit 59a8a31ab2)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16597
2026-10-01 11:50:53 +00:00
Marco Beretta
c664eb8f28 📱 feat: Give the Mobile Drawer One Place for Each Control (#16248)
* feat(client): Give the mobile drawer one place for each control

The drawer put its two global destinations in opposite corners and repeated
one of them under every panel. The marketplace was a bare icon in the top
strip, the hardest thing there to notice; new chat was a large footer button
sitting under prompts, memories and MCP settings alike, none of which it has
anything to do with; and the close toggle wore the chat header's bordered
plate beside two flat icons, so the row read as one control and two
afterthoughts.

They swap. New chat takes the icon slot beside the panel switcher, which is
where the drawer keeps what means the same thing whichever panel is showing,
and its click behaviour moves with it into a component of its own rather than
staying behind in the footer. The marketplace becomes a full-width entry
above the panel content, labelled, in the list where someone already looks
for somewhere to go, and outside the scroller so it stays put while the
panels change under it. The toggle drops to `ghost` like its neighbours. The
footer is left with search alone and stands down entirely on a panel that has
nothing to search, rather than taking its padding out of the list above it.

The drawer now carries a text colour beside its background. Only the panel
nav set one, so the header strip, the new marketplace row and the footer all
inherited black from the document and rendered near-invisible in dark mode,
except where a control happened to name a token itself. That was hidden while
the toggle wore `header-action`, which brought its own.

* fix(client): Keep the mobile drawer clear of the home indicator and apart from its scrim

The footer now renders a safe-area spacer when search is absent, so panel
content no longer runs under the system gesture area on panels with nothing
to search. The marketplace row uses the Button's `row` size instead of
restyling it, which drops its new lint suppression.

The scrim paints the theme's `bg-scrim` role (80% by default) on its own
layer, which separates the drawer by 3:1 in both light palettes, and in dark
mode the drawer draws a `border-xheavy` edge, since no scrim opacity
separates two near-black surfaces. The scrim's focus ring is checked in the
browser instead of by class name.

* fix(client): Paint the mobile scrim's focus indicator above its fill

The scrim's theme fill sits on its own layer, which painted over the
button's inset focus ring, so a keyboard user focusing the scrim with the
chat strip on saw almost none of it. The indicator now draws on a layer
above the fill, in two tones: at the theme's 80% scrim a single dark ring
reaches only 2.3:1 on the light palettes' mid-gray, so a surface band
carries it in light and the focus ring in dark. The scenarios check, in
all four palettes, that the topmost layer at the scrim's edge carries an
indicator with a tone at 3:1 against the fill.

* fix(client): Keep the mobile drawer close toggle on the header's control

The drawer's close toggle is the chat header's open toggle flipping state,
so it keeps the header-action surface and size it shares with that control
rather than going flat like its new neighbours.

(cherry picked from commit 0da898786c)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16248
2026-10-01 11:50:53 +00:00
Marco Beretta
8b9c9a7728 🖼️ feat: Give Media Overlays Their Own Theme Roles (#16596)
(cherry picked from commit d2e11ffd0a)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16596
2026-10-01 11:50:53 +00:00
Marco Beretta
d016c5b586 🧩 refactor: Message Parts Host Context (#16591)
(cherry picked from commit 3b91138906)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16591
2026-10-01 11:50:53 +00:00
Marco Beretta
82127a2269 🌅 fix: Paint the Cached Deployment Theme on the First Frame (#16590)
(cherry picked from commit 2d09fed8d6)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16590
2026-10-01 11:50:53 +00:00
Marco Beretta
3d40b03f0f 🌗 feat: Per-Mode Appearance Defaults for Menu and Tooltip Shadows (#16602)
(cherry picked from commit cfeaee13ab)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16602
2026-10-01 11:50:52 +00:00
Marco Beretta
f83c502c16 📐 feat: Menu, tooltip and tab corner theme roles (#16599)
The menu panel, tooltip and tab trigger read menuRadius, tooltipRadius and tabRadius instead of literal corners. The defaults are the old literals, and the ClickHouse theme sets Click UI's genericMenu, tooltip and tabs radii. The not-expressible list drops the three corners and keeps the field fill and ink, the dark menu shadow and the tooltip shadow.

(cherry picked from commit 98efd35024)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16599
2026-10-01 11:50:52 +00:00
Marco Beretta
379554a8cf 🚦 refactor: Route Chat Send, Stop, Steer and Queue Through the Transport (#16593)
* refactor: Start and Stream Agent Turns Through the Chat Transport

useResumableSSE now POSTs the turn with transport.start and attaches with
transport.stream({ token }).reconnectToStream, both read from ChatTransportContext.
The new transport spec renders the hook with a fake transport and covers the started
and rejected start.

* refactor: Stream Assistants Turns Through the Chat Transport

useSSE sends the turn with transport.stream({ token }).send from ChatTransportContext.
The transport spec covers the request it makes, closing on unmount, and a stream error.

* refactor: Stop Generations Through the Chat Transport

useAbortStreamMutation takes its mutation from transport.abort, and the Assistants
abort request moves from a fetch in useEventHandlers to transport.abortRun. The transport
spec stops an agents run and an Assistants run against a fake transport, including a
rejected stop.

* refactor: Steer Running Generations Through the Chat Transport

The steer, cancel-steer and arm-steer mutation hooks take their requests from
transport.steer, transport.cancelSteer and transport.armSteer. The transport spec
steers a running generation against a fake transport and checks that a refused steer
is kept as a queued turn.

* refactor: Queue Turns Through the Chat Transport

The queued-turn projection reads through transport.listQueued, and the enqueue and
cancel mutation hooks take transport.enqueue and transport.cancelQueued. The transport
spec reads, adds and withdraws a server queued turn against a fake transport, and keeps a
turn local when the server has no queue. The steer tests now answer the projection from
the fake transport instead of the request layer.

* test: Type the Transport Spec's Recoil Seeds

The seed callbacks take recoil's MutableSnapshot instead of a type read off RecoilRoot's
props union, which has no initializeState member on every branch. Drops the unused emit
helper.

* test: Cover Steer Cancel and Arm at the Transport Boundary

useSteerReclaim withdraws a waiting steer through transport.cancelSteer and
useSteerEscalate arms one through transport.armSteer, each against the fake transport.

(cherry picked from commit f772a26a40)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16593
2026-10-01 11:50:52 +00:00
Marco Beretta
b8cbc56f45 refactor: Let the Chat Contract Own Settings and Transport (#16592)
The host-supplied surface (app-global chat settings and the wire turns run over) is now
typed in hooks/Chat/contract.ts. ChatSettingsContext takes its types from there, and a new
ChatTransportContext carries a Transport whose default wraps the existing SSE transport and
generation request functions. The host route supplies both. Nothing reads the transport yet.

(cherry picked from commit 1896bbc16d)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16592
2026-10-01 11:50:52 +00:00
Marco Beretta
5433d5f387 🧾 test: Complete the Click UI Not-Expressible List (#16588)
* feat: Focus ring width and offset theme roles

The global keyboard focus outline and the keyboard-modality text input outline read focusRingWidth and focusRingOffset instead of 2px literals. Both default to 2px, the ClickHouse theme sets Click UI's 2px and 2px, and the drift guard pins those values against Click UI's focus rules.

* test: Complete the Click UI not-expressible list

The parity spec now probes the Dropdown menu shadow, the Tooltip corner and shadow and the Tabs corner. The menu shadow reads the shadowLg role, whose default is the old literal, so ClickHouse matches Click UI in light; the dark app rule, the Tooltip literals and the Tabs corner have no role and are listed with their issues.

* test: Pin the menu panel shadow in the default and ClickHouse themes

(cherry picked from commit d8c4c12dfd)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16588
2026-10-01 11:50:52 +00:00
Marco Beretta
f79ddcf2d6 feat: Focus ring width and offset theme roles (#16587)
The global keyboard focus outline and the keyboard-modality text input outline read focusRingWidth and focusRingOffset instead of 2px literals. Both default to 2px, the ClickHouse theme sets Click UI's 2px and 2px, and the drift guard pins those values against Click UI's focus rules.

(cherry picked from commit 458af5afca)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16587
2026-10-01 11:49:36 +00:00
Lia
443d27ba32 🎋 fix: Reconcile Canary Promotion Static Checks
Move the existing marketplace spacing, pressed state and reduced-motion handling into shared primitive recipes. Supply loading-dot animation delays through a CSS custom property in the published preset. Remove only the five resolved suppression entries and apply the five CI-reported formatting corrections. Add focused regression coverage for GitHub CI; no local tests, builds, lint checks or typechecks were run, as requested.
2026-10-01 04:13:53 +00:00
Lia
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 f66ad88e1c.

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16457
Resolution-Sources: ffa54e0259, 7fe6eab03e, 8f64336ee4, 207ee8b0df, 7f3f82f284, e9e5b36bd2, ff3f0f8bef, 6bd657753a, 84a53a4464, f66ad88e1c
2026-10-01 03:46:19 +00:00
Lia
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 f66ad88e1c.

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16361
Resolution-Sources: 6d7ba72b89, 241c692b63, 6113242b7b, 3c8a5703e7, a45be88578, 3789cbf590, 81e038972f, c505db2256, 420760d8b2
2026-10-01 03:46:19 +00:00
Marco Beretta
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 02a70e9c58)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/13811
2026-10-01 03:46:19 +00:00
Lia
385a648e17 ⛴️ style: Match Canary Theme Class Ordering
(cherry picked from commit 47b3b9b7e8)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16457
2026-10-01 03:46:19 +00:00
Marco Beretta
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 abc9285523)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16556
2026-10-01 03:46:19 +00:00
Marco Beretta
0d8d8f6d38 🪟 feat: Expand, Copy and Tail Long Bash Output (#16555)
* feat: Expand, Copy and Tail Long Bash Output

Render bash output through OutputRenderer with a terminal variant: the
collapsed view keeps the last 15 lines, where failures land, with Show more
and a Copy output button; JSON stdout stays verbatim. The sandbox empty-stdout
notice renders as a localized "No output" state, and the command wraps at the
prompt size despite the global code.hljs rule.

* fix: Keep Terminal Output Verbatim Including Leading Whitespace

* fix: Keep Whitespace-Only Output and Ignore the Final Newline When Tailing

(cherry picked from commit a537ba8e0d)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16555
2026-10-01 03:46:19 +00:00
Marco Beretta
0b7d49f829 🪟 feat: Give OGDialog Theme Roles for Its Edge, Padding and Title (#16546)
* fix: Alias the Button Fills to the Inverted Surface and Size the Legacy Dialog Action

A stylesheet that repainted --surface-inverted or its hover no longer
reached primary buttons, because the stock CSS declared their fills from
palette steps. They now read the inverted surface they split from.

A templated dialog's legacy selection action kept a fixed h-10 and the
inverted fill beside the shared cancel Button, so a theme's button height
split the two. It now reads the Button's height and primary fill roles.

* feat: Give OGDialog Theme Roles for Its Edge, Padding and Title

A templated dialog cleared its edge with border-none and set its title at a
fixed text-lg, semibold, display-family heading in the body ink, so a theme
could not draw Click UI's framed dialog or its 700 1.25rem/1.5 title.

OGDialog now reads a stroke width (in border-light), its inline padding and
header gap, and its title's size, leading, weight, family and ink from theme
roles. Every default reproduces today's dialog; the title size, family and
ink follow textLg, displayFontFamily and text-primary for a theme that names
only those. The ClickHouse theme takes Click UI's dialog stroke, space.x,
title gap, title typography and title color, the drift guard pins them, and
the parity probes now read the dialog stroke and scrim.

* fix: Keep the Dialog Title Ink Out of the Verified Mark's Surroundings

The dialog title color was added to the surfaces the verified mark is
measured against, so a theme that named only the title ink took the
verified fallback. It is a text color, not a surface the mark sits on.

* fix: Let Dialog Titles Take the Dialog Title Ink

Seven dialogs set text-text-primary on their OGDialogTitle, which Tailwind
Merge kept over the new dialog-title role, so a theme that gives dialog
titles their own ink reached only some of them. The redundant classes are
gone; the role defaults to the primary ink, so nothing changes by default,
and the design-rule counts for those files drop by the override each
removed.

(cherry picked from commit bddb8f8ab3)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16546
2026-10-01 03:46:19 +00:00
Marco Beretta
eb5d74dbd5 🧑‍🎨 feat: Give the Default Avatar and Avatar Placeholder Theme Roles (#16545)
* feat: Give the Default Avatar and Avatar Placeholder Theme Roles

The default user avatar filled with a literal rgb(121, 137, 255) in Avatar, MessageIcon and the endpoint Icon, and agent and assistant avatars sat on surface-secondary in light and a dark: surface-tertiary override, so no theme could repaint either.

avatar-fill and avatar-text paint the default avatar and its glyph, and avatar-placeholder paints the backdrop behind an agent or assistant image. Every bundled theme reproduces today's pixels. A theme that sets only its surfaces keeps the placeholder on the surface its mode used before the role existed, both when resolved and through the legacy applyTheme path. ClickHouse takes Click UI's avatar fill and text and its muted background.

* test: Pin the Default Avatar Fill With and Without the ClickHouse Theme

The sidebar account avatar falls back to the default avatar when its image fails; with no theme it keeps rgb(121, 137, 255) in both modes and the placeholder keeps the surface its mode used, and under ClickHouse both take the Click UI values.

* fix: Ink Every Default Avatar Glyph With the Avatar Text Role

The sidebar Avatar, the only default avatar the chat renders, still inked its glyph in text-primary, so a theme's avatar-text never reached it and ClickHouse drew a dark glyph where Click UI draws white. Avatar now reads avatar-text, which defaults to each bundled theme's primary text and follows rgb-text-primary in a theme that does not set it, through resolveTheme and the legacy applyTheme path, so every rendered default avatar keeps its pixels.

* fix: Read the Active Mode Off the Root When applyTheme Is Not Told It

applyTheme is exported, and a caller that applies a legacy palette in dark mode without the new mode argument derived the avatar placeholder from the light surface. It now falls back to the root's dark class.

* fix: Keep CSS-Themed Avatars on Their Legacy Source Variables

The avatar text and placeholder defaults were literal triplets, so a consumer theming through --text-primary and the surface variables left avatars on the stock colors. They now alias text-primary, the secondary surface and, in dark, the tertiary surface, resolving to the same pixels by default. applyTheme's mode fallback also reads a dark ancestor, not only the root itself.

* fix: Let the Stylesheet Alias Carry the Document Root Avatar Backdrop

applyTheme wrote the legacy placeholder inline for the mode active when it ran, which then overrode the per-mode stylesheet alias after a dark toggle without a reapply. On the document root the alias already follows the theme's surfaces and the mode, so the placeholder is now derived only for a scoped root, which that alias cannot see.

* fix: Keep a Scoped Legacy Avatar Backdrop Following the Mode

applyTheme wrote a scoped root's avatar placeholder inline for the mode active when it ran, so after a later dark toggle the backdrop stayed on the light surface, where canary's dark:bg-surface-tertiary switched. applyTheme now marks a scoped root with data-theme-scope and the stylesheet points its backdrop at that root's own secondary surface, or its tertiary one under a .dark ancestor, as the document root's alias does. The mode argument is no longer needed and is removed.

(cherry picked from commit 3ac6a0af37)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16545
2026-10-01 03:46:19 +00:00
Marco Beretta
dd1cb0e5ba 🎚️ feat: Group Model Parameters Into Sections (#16247)
* feat: Group the model parameters and drop the ones that cannot act

The panel rendered a provider's parameter list in the order the definitions
happen to arrive in, so it asked about temperature, then reasoning, then
whether to resend files, with nothing to say which belonged together. The
keys are filed under six headings now, with a count beside each of what this
conversation has changed inside it, which is what the owner scans for before
reaching for Reset. A key this map has never heard of, which is what a
deployment's own customParams look like, keeps its place in the last section
instead of being guessed at or dropped.

Every parameter stays on screen. A settings panel is read as much as it is
edited, and a disclosure trades seeing the current state at a glance for
vertical space that costs nothing to find elsewhere: the headings are
captions rather than buttons, a control is measured against the row it sits
in rather than padded to a fixed block, and only free text takes the full
width. A number, a toggle or a choice says the same thing in half of a 300px
panel, so two sit side by side and the narrow ones in a section come first,
leaving one ragged edge at the bottom instead of a gap beside every
full-width field. Reset and Save As Preset share the closing row. Fifteen
parameters occupy 954px where the same fifteen took 1243px with four of the
six sections shut.

Grouping alone would still show controls that do nothing. A definition can
now declare what it rides along with: OpenAI's reasoning summary, mode and
context travel inside the reasoning object the Responses API takes and are
dropped by the server without it; a thinking budget is read only while
thinking is enabled; a cache lifetime only while the cache is being written.
Those five declare it, the panel judges each one on the companion's
effective value, and a section left with nothing live disappears rather than
standing empty. The rule lives on the definition rather than in the panel so
a deployment defining its own parameters can state one too.

The custom instructions field caps its own rows. It is sized by a shadow
copy of itself, measured as the panel mounts and before the sidebar has
settled on a width, and that measurement can come back as one word per line;
a CSS max-height was hiding the wrong answer rather than correcting it.

No parameter changes what it sends. This drops controls for values the
server was already discarding.

* refactor: Keep every model parameter on screen and drop only empty controls

Hiding a parameter behind a companion toggle judged it by a rule the
client cannot see all of: a reasoningObject endpoint sends the reasoning
fields without the Responses API, adaptive-thinking Claude models ignore
the budget however thinking is set, and a deployment could not declare
the rule in librechat.yaml at all. The panel groups every parameter again
and leaves out only a choice with no options, such as Bedrock's region
when no regions are configured, so no section stands empty. Reset and
Save As Preset share a row while their labels fit and stack when a
translation is too long for the panel.

* test(e2e): Scenarios for the grouped model parameters panel

* fix(client): Wrap a parameter action label longer than the panel

A Spanish Save As Preset label measures 338px on its own against a 282px
row, so stacking the two actions still ran it past the panel. The labels
now wrap inside their buttons.

* fix(client): Scope stretched controls to the panel and say what its counts mean

The shared parameter controls stretched to their parent's height, which
the preset editors' tall columns turned into labels far above their
fields; the panel's cells now stretch their controls instead. The change
count beside a heading is read out as a number of changed settings, and
clearing a default a deployment configured counts as a change.

* test(e2e): Scenario for the preset dialog's label spacing

(cherry picked from commit a78fb3a3a4)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16247
2026-10-01 03:46:19 +00:00
Marco Beretta
d06e7635df 🧩 feat: Ignore Unknown Theme Color Tokens Instead of Dropping the Theme (#16529)
(cherry picked from commit 491ea868da)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16529
2026-10-01 03:46:19 +00:00
Marco Beretta
0eccfbfa58 🎛️ feat: Give the Button Theme Roles for Its Label, Height, Fill and States (#16530)
* feat: Give the Button Theme Roles for Its Label, Height, Fill and States

The Button drew a fixed 500-weight label at 40px and 36px, painted its
primary fill in the inverted surface its checkbox and switch share, focused
in the primary ink, and only dimmed when disabled, so a theme could not
draw Click UI's 400-weight 32px buttons or its #302e32 primary.

Add controlFontWeight, buttonHeight and buttonHeightSm appearance roles and
button-primary and button-primary-hover color roles, which follow the
inverted surface for a theme that names only that. The Button reads them,
focuses in focus-control, presses in the pressed roles and composes the
shared disabled recipe; the defaults reproduce today's button exactly.
Tailwind Merge now knows the new utilities, so a caller's own height or
weight still wins.

SelectTrigger hid its outline on every focus and drew nothing instead; it
now draws keyboard focus in focus-control, like the shared field.

The ClickHouse theme takes Click UI's label weight, button height and
primary fills, and the drift guard pins them and measures the Button.

* fix: Focus the Shared Inputs in the Focus-Control Role and Repair the Button Specs

SecretInput, MultiSearch, InputWithDropDown and InputCombobox drew keyboard
focus in the decorative ring-primary, about 2.3:1 on the dark default canvas.
They now use focus-control, and a guard holds that role at 3:1 on every
control canvas in each theme. The Scrim spec follows the Button's focus role,
and the button-roles scenario opens the Data & Privacy tab by its current name.

* test: Reach the Shared Input Focus Rings by Keyboard

The focus-role guard read component source, which a dead string or a ring on a
non-focusable wrapper would satisfy. Each control is now reached by Tab and
the focused element, or the combobox's ring host while it holds keyboard
focus, is asserted to paint the focus-control ring.

(cherry picked from commit dd5fdf1ff4)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16530
2026-10-01 03:46:19 +00:00
Marco Beretta
5c6578fa25 📏 feat: Give Theme-Sized Controls Their Own Padding and Gap Roles (#16528)
* feat: Give Theme-Sized Controls Their Own Padding and Gap Roles

The theme variants of Button and Chip, CheckboxButton and every composer
control read spaceNormal and spaceCompact, which also pad message rows,
steer bubbles and the composer send button, so a theme could not give its
controls Click UI's button spacing without reshaping the chat.

Add controlPaddingX and controlGap appearance roles, which those controls
read instead. Their defaults are the shared spacing values, a theme that
names only spaceNormal or spaceCompact keeps its controls on them, and the
preset falls back to the shared roles for a stylesheet that predates these.

The ClickHouse theme takes Click UI's button.basic.space.x and space.gap,
and the drift guard pins both values and measures the themed Button's
padding and gap.

* test: Reach the Temporary Chat Chip Through a Sent Message

The header status chip only appears once a temporary chat has its first message, so the scenarios send one, and measure the real message bubble instead of a probe for the shared spacing.

* fix: Let the Control Spacing Roles Replace the Base Gap

Tailwind Merge could not classify px-theme-control-x or
gap-theme-control-gap, so a theme-sized Button kept the base gap-2 beside
the role and a caller's own padding beside both, leaving the winner to
stylesheet order. Register both utilities with their groups.

* fix: Alias the Stock Control Spacing to the Shared Spacing Roles

A stylesheet that set only --theme-space-normal or --theme-space-compact
stopped reaching Button, Chip and the composer controls once the stock CSS
declared the control roles as literals, so the preset's fallback never ran.
The stock declarations now read the shared roles, with the same defaults.

* test: Assert the Control Spacing Utilities Declare Their Own Properties

(cherry picked from commit bdfd3012ea)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16528
2026-10-01 03:46:19 +00:00
Lia
206ef476f6 ⛴️ fix: Align Canary Timing Types and CI Formatting
(cherry picked from commit 5bd84bb627)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16457
2026-10-01 03:46:19 +00:00
Lia
70bf641e50 ⛴️ style: Match Theme Class Ordering in Canary Sync
(cherry picked from commit b881b83393)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16457
2026-10-01 03:46:19 +00:00
Marco Beretta
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 4062bc3c00)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/15684
2026-10-01 03:46:19 +00:00
Marco Beretta
fdef598853 🧽 fix: Paint Freed Feature Surfaces From Theme Roles (#16517)
* fix: Paint Tool Output Panes With the Code Body Role

The output panes of code execution, file authoring and file reads painted
surface-chat in light and surface-primary-alt in dark. surface-code-body is
that same pair in the default, dark and high-contrast themes, and a theme
that styles its code blocks now styles these panes with them.

* fix: Draw the MCP OAuth Logo and QR Tiles From Fixed Roles

The server logo tile and the QR backdrop were bg-white. They take
surface-fixed and surface-qr, both white in every bundled theme, so a theme
can own them without the QR losing its quiet zone.

* fix: Give TextareaAutosize an Invalid State and Use It for Tool Arguments

The tool-approval edit field flagged invalid JSON with border-red-500, a raw
colour the primitive's owner rule rejects in any semantic form. TextareaAutosize
now draws its border in border-destructive when aria-invalid is set, the
attribute the Skills description fields already pass. ToolApproval sets
aria-invalid and points aria-describedby at the Invalid JSON message, so a
screen reader announces the error as well.

* docs: Record the Image Preview, Artifact Scrollbar and Azure Chip Colours

Adds the image preview's media overlays, the sandboxed artifact document's
scrollbar and the Azure file-source gradient to the theme allowlist.

* test: Cover the Tool Output Pane, Invalid Tool Arguments and OAuth QR Tile

Scenarios for the code-body pane behind a file-authoring card, the
announced invalid state of the tool-approval edit field, and the MCP OAuth
QR backdrop staying white in both modes.

* test: Retry the Output Pane Colour and Set Up the Approval and OAuth Scenarios at Desktop Size

The pane is read with a retrying assertion against the resolved role, since
the card re-renders as highlighting lands. The approval agent and the MCP
Settings panel are reached through side panels the mobile layout keeps in its
drawer, so those two scenarios run at desktop size on the mobile project.

(cherry picked from commit 2f16e6b37b)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16517
2026-10-01 03:46:19 +00:00
Marco Beretta
d8797b227c 🗂️ feat: Give the Table Theme Roles for Header Text, Row Rules and Density (#16489)
* feat: Give the Table Theme Roles for Header Text, Row Rules and Density

The shared table could not take Click UI's shape: its header had no fill of
its own, column names were fixed to text-secondary, rows had no rule and
cells were fixed at 1rem. The header now always carries surface-secondary,
which every consumer already painted, and three roles are added: a
table-header-text color that falls back to a theme's secondary text, a
tableCellSpaceY length that sets cell padding and header height, and a
tableRowStroke width that is 0px by default. Tailwind Merge learns the
new padding and height utilities so a caller's own padding still wins.

The ClickHouse theme sets Click UI's header title color, small-size cell
space and 1px row stroke, and the drift guard pins them.

* fix: Carry the Column-Header Role Into Both Data Tables

Both exported data tables set text-secondary on the header cell or its
label, which beat the new role, so a theme never reached their column
names; they now read table-header-text. The legacy table's row titles keep
text-secondary explicitly, since they are row data rendered through
TableHead. The token falls back to --text-secondary for a stylesheet that
predates it.

* refactor: Give TableHeader a filled Variant Instead of a Caller Override

* feat: Route the Data Tables Through Table Density and a Header Fill Role

The density role reached no real table: every data table passed its own
py-1 or py-2. TableCell and TableRowHeader gain compact and dense sizes,
and TableHead sm, compact and row sizes, all derived from the table cell
space (half and a quarter of it), so the three data tables now read the
role while drawing exactly what they drew before. The virtualized table's
rows default to 32px plus half the cell space, 40px as before.

The virtualized table's self-sticking header cells now paint a
table-header-fill role that defaults to each theme's dialog surface, so
Shared Links and Archived Chats look the same by default and take Click
UI's header fill under the ClickHouse theme.

ClickHouse's cell space becomes Click UI's md value, 1rem: its sizes halve
the same way, so the compact tables land on sm, 0.5rem, the size Click UI
tables default to.

* fix: Re-render Mounted Table Rows When the Themed Row Height Changes

The memoized row compared only its data, selection and cells version, so a
theme switch left mounted rows on their old inline height and the
virtualizer measured that stale geometry. It now compares the height too.

* fix: Size Both Virtualizers From the Themed Row Geometry

The legacy table estimated every row at a fixed 48px while its title cells
now follow the cell space, and the dense row budgeted 32px of content that
is really 2rem of controls. A useTableRowHeight hook gives both the dense
and the titled height from the root size, the cell space and the row rule,
48px and 40px as before, and the legacy virtualizer re-measures when it
changes.

* fix: Measure the Legacy Table's Rendered Rows

The legacy table can be given columns without a title, whose rows are
shorter than a titled row, so the estimate alone could not match them.
Each rendered row now reports its size to the virtualizer, and the titled
height is only the first guess for rows not yet rendered.

* test: Compare Archived Header Space Apart From the Theme's Text Line

ClickHouse now draws text-sm on its own 1.5 line height, so its header is
a pixel taller than the default while keeping the same cell space. Compare
the space around the text line instead of the whole header height.

* fix: Keep the Row Rule Inside the Titled Row Estimate

The title cell draws the rule as its own bottom border inside a fixed
border-box height, so adding the stroke again overestimated every
unmounted titled row by the stroke width. Only the content-sized dense
and compact rows grow by it.

* test: Read the Table Defaults From the Published Stock Stylesheet

The table roles' stock values and the no-rule stroke now live in the
package's defaults.css, which replaces controls.css, and the stock
palette counts the two new table color roles.

(cherry picked from commit cf33a478f2)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16489
2026-10-01 03:46:19 +00:00
Marco Beretta
5d39e0b901 📐 fix: Draw Controls at the Theme Control Radius (#16481)
* fix: Draw Controls at the Theme Control Radius

Dropdown gains a shape prop in Button's vocabulary. Omitted, the trigger
takes the theme control radius, which equals rounded-xl in the default
theme, so the settings selects follow a theme's control corner instead of
its dialog step. The marketplace sort and the prompts filter ask for
shape="default" rather than overriding the radius locally.

The settings nav tabs, the agent builder footer buttons and the builder
action controls move from rounded-xl to the control radius.

The Click UI drift guard now measures primitive color and shape parity
against Click UI's component tokens and holds a floor per mode.

* test: Choose the Theme per Navigation Instead of Stacking Init Scripts

(cherry picked from commit ccd9267262)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16481
2026-10-01 03:46:19 +00:00
Marco Beretta
1d01178c63 🧩 fix: Paint Panel Surfaces From Theme Roles (#16484)
* fix: Paint Panel Surfaces From Theme Roles

The tool dialog's logo tile takes the fixed surface that logo tiles use elsewhere,
and the skill image preview icon takes a series slot like the other categorical
marks. The tools category filter drops a raw emerald border and shows its active
state on the filter icon in the accent role instead; the label still names the
active category.

The avatar cropper's media hint and the SharePoint picker background are recorded
in the theme allowlist.

* test: Cover the Skills Category Filter's Active State

* test: Match the Category Filter Trigger Exactly

(cherry picked from commit 8ce9f58fd3)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16484
2026-10-01 03:46:18 +00:00
Marco Beretta
a50ea26fdf 🫧 fix: Paint Chat Surfaces From Theme Roles (#16483)
* fix: Paint Chat Surfaces From Theme Roles

The code window header and skill output panel stop repainting their
surface-secondary container with a per-mode fill that matched it in every bundled
theme, the drag-and-drop backdrop becomes the theme scrim, the OpenAI file-source
chip takes the primary surface, and the banner drops a stopless dark gradient.

ActionIcon, RetrievalIcon, WrenchIcon and the message ProgressCircle had no
importers and carried fixed Lottie colours, so they are removed. The media,
artwork and exported-document colours that stay fixed are recorded in the theme
allowlist.

* fix: Keep the Drag-and-Drop Backdrop Black Until Scrim Opacity Is a Role

The theme scrim is gray in default light, so at the same alpha it dimmed the page
less than the black backdrop it replaced. The backdrop keeps its original colour
and the allowlist records the scrim-opacity role it waits on.

* test: Cover the Code Window Header Showing Its Panel Surface

* test: Exercise the Code Window Header Through a File-Authoring Card

The mock code interpreter exposes bash_tool, whose card has its own header; a skill
file created by the model opens the file-authoring card that renders CodeWindowHeader.

* fix: Keep the OpenAI File-Source Chip's Dark Opacity

The chip composites over the file's own preview, where surface-primary at 75% darkened
it against the shipped black at 65%. It keeps its colours and joins the code-execution
badge in the allowlist as a media overlay.

(cherry picked from commit 0b80ea5ebf)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16483
2026-10-01 03:46:18 +00:00
Marco Beretta
5961f767fd 🔤 fix: Ship the Theme Font Faces With the Package (#16485)
* fix: ship the Inter, Roboto Mono and Inconsolata faces with the package

Move the woff2 files from client/public/fonts into packages/client/src/theme/fonts
and every @font-face rule (the app's Inter and Roboto Mono faces and
client/src/fonts.css) into theme/fonts.css, which tokens.css imports and the build
copies into dist with the files. Each url() names the file by a new
@librechat/client/fonts/* export: a relative path breaks under Vite with
@tailwindcss/postcss, because Vite inlines the import before Tailwind runs and
Tailwind reports every emitted declaration as coming from the root stylesheet.

The app loads the same files through the same import and still emits them to
assets/fonts with their licences, now read from the package; the $fonts alias is
gone. Inter and Roboto Mono gain their OFL texts beside Inconsolata's. The README's
consumer stylesheet moves the package stylesheet import above @config, where
Vite's inliner no longer skips it. The static checks' bundle freshness test reads a
subpath pattern export as the directory it maps into.

* docs: describe how the theme fonts resolve through the package export

* fix: leave subpath pattern exports out of the bundle freshness check

A pattern such as ./dist/fonts/* names no entry the design rules load, and
reading it as its directory made the freshness check depend on a directory the
synthetic build in suppression-baseline.spec.ts never dates. The scenario's
mirror of the manifest reading skips patterns the same way.

(cherry picked from commit 681515c9e5)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16485
2026-10-01 03:46:18 +00:00
Marco Beretta
01f3e52eee 🪞 fix: Publish the Theme Defaults and Scale Mapping to Package Consumers (#16479)
* fix: publish the theme defaults and scale mapping with the package

Move the radius, font and shadow utility mapping from the app stylesheet into
tokens.css, and the stock values of every theme-owned property (the 94 color
roles, the appearance roles and the brand colors, with the primitive scales they
are written against) into a new defaults.css that tokens.css imports and the
build ships beside it. The app reads both through its existing tokens.css
import, so @librechat/client/theme.css now gives a consumer the same utilities
and values the app renders. controls.css folds into the defaults, and the preset
no longer pins rounded-sm, rounded-md and rounded-lg to --radius.

A new mock scenario compiles the app and a consumer from what each loads,
checks the build output and exports, and compares computed styles in light and
dark; defaults.spec.ts holds defaults.css equal to the runtime themes.

* docs: note that hosts load the stock Inter and Roboto Mono faces

(cherry picked from commit a50612f70f)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16479
2026-10-01 03:46:18 +00:00
Marco Beretta
dcd06896f2 🖌️ fix: Apply Controlled Themes Before Paint and Theme Prose Links, Inline Code and QR Backdrops (#16480)
* fix: Apply controlled themes before paint and give prose links, inline code and QR backdrops theme roles

ThemeProvider folds a controlled theme prop change into state during the
render that delivers it and applies the theme in a layout effect, so a
deployment theme, a shared link's theme and the viewer's own theme reach
the root before the commit paints. Storage writes stay after the commit.

Adds rgb-link-prose (link in light, primary text in dark, following a
theme's own link) and registers rgb-surface-qr, and paints inline prose
code with the surface-active-alt and surface-hover-alt roles.

* test: Record the frames a controlled theme paints and the prose and QR roles

(cherry picked from commit 364bf27210)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16480
2026-10-01 03:46:18 +00:00
Marco Beretta
67323e1797 🌫️ feat: Give the Dialog Scrims Theme-Owned Opacity Roles (#16492)
* feat: Give the Dialog Scrims Theme-Owned Opacity Roles

The three dialog families carried their scrim alpha in each utility
(bg-surface-overlay/80, /90, /65), so a theme could recolor a scrim but
not set how much it dims. Add scrimOpacity, alertScrimOpacity and
modalScrimOpacity, exposed as bg-scrim, bg-scrim-alert and
bg-scrim-modal in the published tokens, defaulting to the 80%, 90% and
65% each family drew.

ClickHouse takes Click UI's 0.75 from dialog.color.opaqueBackground,
cited in the drift guard. A bundled scrim never lifts the page and, on
a light canvas, separates the dialog by 3:1, which is why ClickHouse
dark keeps a black overlay rather than Click UI's lighter gray.

* test: Read the Dialog Scrim Through Its Role Class in the Morph and Settings Scenarios

Both scenarios pinned the old bg-surface-overlay/80 literal: the morph
counted elements carrying it and Settings compared its scrim with a
probe of it, whose color-mix value serializes differently from the
role's rgb(). They now use bg-scrim, the class DIALOG_SCRIM_CLASS
exports.

(cherry picked from commit 2d7133fcb1)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16492
2026-10-01 03:46:18 +00:00
Marco Beretta
1b8801dc07 🔤 feat: Give Display Type and the Type Scale Their Own Theme Roles (#16491)
* feat: Give Display Type and the Type Scale Their Own Theme Roles

Add a displayFontFamily appearance role, which the dialog titles compose
through font-display, and textXs..text2xl and leadingXs..leading2xl,
which the app's text-* utilities now read like the radius and shadow
scales. The defaults are Tailwind's own sizes and line heights and the
UI family, so the default theme is unchanged, and a theme that names
only its fontFamily keeps its headings in it.

ClickHouse takes Click UI's display family, font sizes 1 to 6 and its
1.5 product line height, cited in the drift guard. Basier Square is
named but not self-hosted: it is a commercial face, so browsers without
it fall through to the Inter stack.

* fix: Publish the Display Family Utility With the Theme Tokens

* fix: Keep the ClickHouse 2xl Step Below the Unthemed 3xl

Click UI has no size between 1.25rem and 2rem, and 2rem would overtake
Tailwind's unthemed text-3xl (1.875rem), so a responsive text-2xl to
sm:text-3xl heading shrank as the viewport grew. ClickHouse keeps
LibreChat's 1.5rem for 2xl at Click UI's line height, recorded as a
decision in the drift guard, and a registry test holds every bundled
2xl below 3xl.

(cherry picked from commit 400e4549ca)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16491
2026-10-01 03:46:18 +00:00
Marco Beretta
b2da59f08d 🚦 feat: Give Pressed and Disabled States Their Own Theme Roles (#16487)
* feat: Give Pressed and Disabled States Their Own Theme Roles

Add surface-pressed and surface-inverted-pressed, which IconButton takes
while held under a hover. They default to the hover fills a pointer
press has always shown, and a theme that names only its hovers presses
in them, so the default theme is unchanged.

Add surface-disabled, text-disabled and border-disabled, and a
disabledStyle appearance role: dim keeps the half-opacity treatment,
fill paints a disabled Checkbox, Switch, Field or IconButton in the
disabled roles through the theme-disabled variant. The root mirrors
the choice as data-theme-disabled. ClickHouse fills from Click UI's
disabled and active tokens, cited in the drift guard.

* fix: Ink Disabled Placeholders and Press the Submit Button in the State Roles

* fix: Ignore Color Roles a Client Predates and Fill Every Disabled Composer Slot

A cached client reading a newer server's inline theme rejected the
whole definition over one color role it did not know. The client
reader now ignores a well-formed rgb- role holding a triplet with a
warning, as it already did for appearance keys; the server keeps
rejecting unknown roles, where one is a typo in librechat.yaml.

The disabled fill moves into composerSubmitClasses, so the plain send
and stop buttons in Composer and DuringRunSendButton take it too.

* fix: Share One Disabled Fill Recipe Across Every Shared Control

Select, InputNumber, SecretInput, FilterInput and the Slider thumb only
dimmed under a fill theme. The theme-disabled classes now live in one
disabledFillClasses recipe that every shared control composes, and the
variant also matches Radix's data-disabled so a disabled slider thumb
takes the fill.

The deployment-theme scenario for an invalid theme now serves a
malformed color value, since a well-formed role the client predates is
ignored rather than rejected.

* fix: Fill a Disabled InputNumber Through Its Wrapper

rc-input-number puts the component's classes on a wrapper around the
disabled input, so the theme-disabled variant never matched it. Add a
theme-disabled-within variant for a wrapper that contains a disabled
control, and a disabledWithinFillClasses recipe InputNumber composes;
the input inherits the ink and shows the fill through its transparent
background. The default theme's disabled InputNumber is unchanged.

* fix: Carry the Disabled Roles to Every Shared Disabled Surface

Sweep every shared component that dims when disabled. Button-like
controls (AlertDialog and Dialog footer buttons, DialogTemplate's
select, the MultiSelect trigger) compose the fill recipe. Menu items,
tabs and the send-actions rows keep their surface and take the ink
through disabledInkClasses, as Click UI's genericMenu does, and Label
and FilterInput's floating label follow their control through
peerDisabledInkClasses. The variant also matches aria-disabled rows.
OGDialogTemplate and Button stay with the open PR that owns them.

* fix: Gray the Icons of Disabled Menu Rows Under a Fill Theme

A send-action or menu row's icon owns its color (text-status-warning,
text-text-secondary), so the inherited disabled ink left it bright.
The item ink recipe now recolors descendant icons too.

* fix: Fill the Dropdown Trigger and the OTP Group Under a Fill Theme

The default Dropdown trigger only dimmed, and its disabled:hover resets
tied with the fill; the shared recipe now pins the disabled hover fill
and ink too, and the trigger composes it. InputOTP dims its group with
has-[:disabled], so it takes the wrapper recipe.

* fix: Reach Child-Owned Ink and Slot Edges in the Disabled Recipes

A disabled control's own children, the SelectDropDown labels or a
checkbox glyph, kept their explicit ink, and a disabled OTP group's
slots kept their border. The fill and item recipes now carry the
disabled ink to descendants, the wrapper recipe carries the disabled
edge and ink to the group's parts, and SelectDropDown composes the fill
recipe.

* test: Probe Disabled Row Icons With the Recipe's Descendant Selector

* fix: Give Radio Segments, SecretInput Actions and DropdownPopup Items the Disabled Ink

These three dim their disabled state through a JS branch or Ariakit's
aria-disabled rather than a disabled: utility, so the earlier sweep
missed them. Each composes the item ink recipe, whose opacity reset
outranks the branch's opacity-50.

(cherry picked from commit 83d7afb0d1)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16487
2026-10-01 03:46:18 +00:00
Marco Beretta
228191ee7f 🎯 feat: Give Keyboard Focus Its Own Theme Roles (#16478)
* feat: Give Keyboard Focus Its Own Theme Roles

Add rgb-focus-outline for the app-wide keyboard focus outline and
rgb-focus-control for the shared primitives' focus ring. The defaults
reproduce the default theme exactly: a black and white outline, and
primitive rings in the primary text ink. A theme that names only
rgb-ring-primary keeps drawing its outline in that ring, and one that
names only rgb-text-primary keeps ringing its controls in that ink, so
the data-theme-ring marker is no longer needed.

ClickHouse sets both roles to Click UI outline.default, cited in the
drift guard. Every bundled palette holds both roles at 3:1 on its
canvases. Button keeps its ring until the open PR that owns it lands.

* test: Read the Opaque Ring Layer in the Focus Ring Probe

* fix: Draw the Popover Focus Outline in the Control Focus Role

(cherry picked from commit 7a99b5cef7)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16478
2026-10-01 03:46:18 +00:00
Marco Beretta
3f7336cbcd 🎛️ refactor: Supply App-Global Chat Settings From the Host (#16466)
* refactor: Supply App-Global Chat Settings From the Host

The chat hooks read the during-run default, steer interrupts, save drafts,
temporary chat and the artifacts reset from a ChatSettings context that Root
fills from the existing Recoil atoms. liveAppliedSteerIds moves to Jotai with
its reader and writer, and manual compaction submits through the useChat
facade.

* fix: Keep Compaction Off the Message Frame and Read One Interrupt Default

Compaction reads status through useChatActions, which re-renders only when
the status changes instead of mapping every stream frame. The during-run send
button reads the interrupt default from the steering controls instead of a
second store read.

* fix: Supply Only Preferences Every Chat Reader Can Take From the Host

saveDrafts and isTemporary are also read by useNewConvo, useAutoSave and the
upload path, and by ChatView, ChatForm and the resume hook, so a host value
for them would split one preference across two sources. They stay on the
store until all of their readers can move together.

(cherry picked from commit 1d5062cd95)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16466
2026-10-01 03:46:18 +00:00
Marco Beretta
15142ab907 🎨 fix: Fall Back From an Invalid Theme in librechat.yaml Instead of Exiting (#16462)
* fix: Fall Back From an Invalid interface.theme Instead of Exiting

A mistake in interface.theme failed the whole librechat.yaml and stopped
the server. The loader now checks the theme with the rules the client
applies before painting it, drops a theme the client would reject with a
warning naming each problem by path, and loads the rest of the config.
Unknown appearance tokens only warn, matching the reader. Startup and
reload behave the same.

The token lists and the validator move to librechat-data-provider so the
client registry and the server check against one list.

* fix: Reject Unknown Bundled Theme Names at Config Load

A misspelled bundled name such as clickhous passed the server and was
rejected only in the browser. The bundled names now live in
librechat-data-provider; the client's theme map is typed against that
list and the loader drops a name outside it with a warning.

(cherry picked from commit 6ec919e67e)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16462
2026-10-01 03:46:18 +00:00
Marco Beretta
79994cd3e9 🧭 test: Pin the ClickHouse Theme to Click UI and Route Focus Through the Ring (#16461)
* test: Pin the ClickHouse Theme to a Click UI v0.12.0 Snapshot

Add clickui.json, the Click UI v0.12.0 tokens the ClickHouse theme cites,
and a drift guard that matches every color, radius, font, shadow and motion
value to its token, naming both on a mismatch. Correct the citations that did
not resolve, set shadow2xs, motionNormal and the light code text from Click
UI, and document the dark scrim as a deliberate deviation.

Draw the global keyboard focus outline in ring-primary under any theme
definition, keeping the default theme's black and white outline and the
high-contrast rule unchanged.

* test: Anchor the Focus Probe Tab on a Focused Sentinel

Tab moves on from the previously focused element after a blur, so it never
reached the prepended probe. Focus a sentinel outside the tab order first.

* test: Require Three RGB Channels in the Click UI Drift Guard

A truncated theme triplet such as '0 138' matched a source whose leading
channels agreed. Compare only complete, finite triplets.

* fix: Follow the Theme Ring Only When the Theme Names One

A theme that leaves rgb-ring-primary to the default resolves it to #595959,
which a dark surface carries at about 2.3:1. The provider now marks the root
with data-theme-ring when the active mode names its ring, and the global
focus outline follows the ring only under that mark; every other theme keeps
the default black and white outline. Each e2e mode also gets its own page
instead of relying on init-script order.

(cherry picked from commit 7a30d2f08c)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16461
2026-10-01 03:46:18 +00:00