mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-17 13:33:45 +00:00
19 commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
7e575c047f
|
🔍 feat: App-Wide UI Scale Setting (#14903)
* feat: add app-wide UI scale setting * test: align dev's new header, drawer and combobox specs with the scaled shell * fix: keep design-recorded arbitrary values off the same-count swap * fix: scale composer and reasoning spacing on the spacing scale * test: reach scaled rows and wait on the composer under the unpainted drawer * test: cover the scaled composer at both ends of the range * test: reload the composer scenario at each scale from the live page * fix: leave the root style untouched at the default scale * test: align dev's tool output and subagent inset specs with the rem classes * fix: scale a caller's combobox height cap with its rows * fix: size the conversation list's row estimate on the scaled drawer breakpoint * test: align dev's conversation row status spec with the scaled drawer breakpoint * style: sort the settings dialog imports after the dialog layer merge * fix: scale the collapsed combobox's fallback popover width * fix: size the upload glyph on both axes so it grows with the scale |
||
|
|
f156160c99
|
📏 feat: Size Roles for the Select List (#16714)
* feat: Size Roles for the Select List The Select list drew a fixed max-h-96 and min-w-[8rem], the last hard-coded sizes among the ten shared primitives. They are now the listMaxHeight and listMinWidth appearance roles, defaulting to 24rem and 8rem. The ClickHouse theme sizes the list by its trigger and keeps the 24rem cap, since Click UI caps it only at the viewport's available height. * test: Resize the Select List From a Reference Theme |
||
|
|
7baa814868
|
📐 feat: Size Roles for the Shared Primitives (#16617)
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
* feat: Size roles for the shared primitives Button's xs, lg and icon squares, the large title input, the checkbox, menu, select and dialog icons and the switch's hit area read new size roles whose defaults are the fixed sizes they drew, and the menu row corner reads radiusLg. The ClickHouse theme takes Click UI's single button size, its small icon button and its checkbox and icon sizes. A spec pins the strict count of theme-driven primitives at eight of ten and what the other two still hard-code. * fix: Hold the switch hit area to the target minimum in width and scan stylesheet colors * test: Read every raw palette hue in the primitive guard * test: Exempt only theme role fallbacks in the primitive guard * feat: Tab minimum width role and a wider fixed-size guard The primitive guard now also reads absolute arbitrary sizes, ring-offset palettes and 4 and 8 digit hex colors. The Tabs trigger's 100px minimum becomes the tabMinWidth role, which the ClickHouse theme sets to 0 so tabs size by their label as in Click UI. * fix: Keep app icon buttons and their companions on the button size role The passkey rename input keeps the field height, and the agent builder panel headers size their back button and balancing spacer from size-theme-button, so a theme that changes the button height keeps those rows aligned. * fix: Size menu glyphs from the icon role and floor touch targets at the minimum target size * fix: Let menu glyphs fill their slot and keep the dialog close target at the minimum size * test: Probe the menu glyph inside a flex row, as DropdownPopup renders it * fix: Hold icon button squares to the minimum target size * fix: Bound the icon and checkbox size roles to the room their layouts leave iconSize takes 0.75 to 1.25rem, iconSizeLg 1 to 2rem and checkboxSize 1 to 1.5rem, so a theme can retune them without shrinking a checkbox below the box it was or pushing an icon past the inset it sits in. * fix: Hold the icon-only Dropdown and header spacers to the minimum target size * fix: Floor the button size roles at the target minimum and let callers replace the control height * test: Move the unknown appearance markers off the new title field height * fix: Size the compact step, the exported Dialog and the combobox icons from roles The Button and Dropdown compact recipes read a buttonHeightCompact role, the exported Dialog's action buttons and close glyph read buttonHeight and a bounded iconSizeMd, Combobox icons follow iconSize, and the checkbox callers drop their fixed sizes so checkboxSize reaches them. minTargetSize may no longer exceed buttonHeight or fieldHeight, so the target floor never pulls icon buttons out of line with the fields beside them. * fix: Size the collapsed Combobox square from the control height role * fix: Hold every Button size and the collapsed Combobox to the target minimum * fix: Let section header buttons keep their own text height * test: Treat a zero size as a reset in the primitive guard * fix: Enforce the target size at the roles instead of on every Button A minimum height on every Button size grew callers that draw a smaller control on purpose, such as the sortable table header (h-auto) and the 20px artifact and attachment row actions. The floors come off the Button sizes and icon squares; a theme that sets minTargetSize may instead not size any button or field below it, and the new Button size roles keep their 24px floor. * fix: Check the control and large field heights against the target floor * fix: Hold the target floor at a fixed 24px and floor the large field height * fix: Keep the passkey rename field on the button height and drop the fixed MCP checkbox size * fix: Size the Combobox check glyph from the icon role and scope the README floor claim |
||
|
|
d2f970910c
|
🦎 fix: Restore Theme Contrast in Composer and Messages (#16624)
* 🦎 fix: Restore Theme Contrast in Composer and Messages
* Match Sticky Activity Headers to Their Hosting Surface
---------
Co-authored-by: Lia <lia@librechat.ai>
|
||
|
|
6df4b8cb9b |
🔎 feat: Let Themes Focus Fields by Their Edge and Size Fields and Labels (#16550)
* feat: Let Themes Focus Fields by Their Edge and Size Fields and Labels
Shared fields drew a fixed 40px control that could only focus with the
keyboard ring, and Label a fixed text-sm at leading 1, so a theme could not
draw Click UI's 32px field that swaps its stroke on focus, or its 500
0.75rem/1.5 field label.
Fields now read fieldHeight and fieldFocusStyle: ring keeps today's
keyboard-only ring, border swaps the edge to border-field-focus on any focus
with no ring, mirrored on the root as data-theme-field-focus so the pointer
modality reset leaves it alone. Label reads labelSize, labelLeading and
labelFontWeight. Every default reproduces today's field and label; the edge
color follows focus-control and the label size textSm for a theme that
names only those. The ClickHouse theme takes Click UI's field height,
active stroke and label typography, and the drift guard pins them. The
shared Badge, which no app surface renders, keeps a recorded deviation.
* fix: Keep the Pointer Focus Reset for Edge-Focused Fields
Under fieldFocusStyle border the pointer-modality rule was skipped whole,
so a pointer-focused field lost its outline and ring reset along with the
edge reset. Only the edge reset now depends on the focus style.
* fix: Keep the Forced-Colors Outline and Give SecretInput the Field Roles
Under forced colors the edge color and ring drop out, so suppressing the
outline of an edge-focused field left keyboard focus invisible there. The
suppression now applies outside forced colors only.
SecretInput hard-coded h-10 and was not a shared field, so beside an Input
it kept 40px and missed the theme's focus treatment. It now composes
fieldControl, keeping its trailing padding for the controls; its keyboard
focus becomes the same focus-control ring the other fields draw.
* fix: Give Fields a Vertical Padding Role So a Short Field Keeps Its Line
The field kept a fixed py-2 inside the themed height, so ClickHouse's 32px
field left 14px for a 21px line. Fields now read fieldPaddingY, py-2 by
default; the ClickHouse theme takes Click UI's field.space.y, which fills
its 32px exactly, and the drift guard pins it.
* fix: Keep a 2px Keyboard Focus Perimeter and Respect Scoped Edge-Focus Roots
An edge-focused field showed keyboard focus only as its recolored 1px
edge, under the 2px perimeter the app holds as its focus floor. Keyboard
focus now adds a 1px ring in the same color; pointer focus stays edge-only.
The pointer reset checked only the document root for edge focus, so a
border-focus theme applied to a nested root had its edge reset to the
stock border. It now skips any field under an edge-focus root.
(cherry picked from commit
|
||
|
|
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
|
||
|
|
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
|
||
|
|
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
|
||
|
|
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
|
||
|
|
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
|
||
|
|
1dc4e0d278 |
🪶 style: Quieter Primitives, Shared Panel Headers, and Flat Management Lists (#16244)
* style: Quieten the shared primitives and the dark borders
The primitives carried the weight the screens then inherited: boxed empty
states, outlined table shells, raised composer pills. Softening them here
means a screen gets the quieter treatment by composing what it already
composes rather than by overriding it.
Dark moves its border roles one step off the page instead of two, so an
edge separates a surface from the one behind it without reading as a seam.
The values live in style.css for the pre-hydration paint and in dark.ts for
the runtime theme, so both change together.
Checkbox gains CheckboxGlyph, the presentational half of the control, for
rows that are already a button and must not nest a second one inside it.
* feat(client): Panel header and scroll fade for the side panels
Every management panel was building its own title row, so the title, the
search field and the create button sat at a different size and spacing in
each one. PanelHeader is that row, and the panels adopt it next.
PanelContent gains a fade at its foot, fed by useScrollFade, which watches
the viewport and its content and reports whether anything sits below the
fold. A list that is exactly as tall as its box shows no fade, and the
gradient is dropped under prefers-reduced-motion.
The sidebar keeps a right edge in every theme now that it shares a surface
with the content beside it, rather than only in high contrast.
* style: Apply the quieter layout to the panels and management pages
The main content now sits on the same surface as the sidebar, so the app
reads as one plane instead of a page floating on a backdrop. With the fill
gone the containers had nothing left to justify them: cards, outlines and
double borders come off the MCP, Skills, Bookmarks, Memory, Prompts and
Scheduled Chats lists, and spacing and weight carry the hierarchy instead.
The management screens adopt PanelHeader, so title, search and create sit
at one size and one rhythm across all of them, and Schedules gains the
search its siblings already had. Secondary row actions appear on hover and
focus rather than resting in the row.
Two rows also stop nesting interactive controls: the skills row splits into
sibling buttons under a focus-within ring, and the memory and prompt toggles
render CheckboxGlyph inside their button rather than a second control.
* fix(client): Keep the schedules quota and skeleton honest under filtering
The footer counted the filtered list while the create limit is enforced
against all schedules, so filtering made a full account look under quota.
The skeleton reserved a switch, a menu and three text rows the flattened
row no longer has, so the panel visibly collapsed on load; it now mirrors
the healthy row. The skill file expander announced "Show files" even
while expanded, so its label is now a neutral toggle.
* fix(client): Restore schedule row actions and settle the panels' design debt
A schedule row's actions sat in the hover-revealing slot other lists use,
but this panel's rows end at the sidebar's resize handle and a slot
collapsed to zero width put the switch's clickable point outside the
panel, under the handle, where no hover could ever reveal it; the slot
now keeps its width and the menu trigger fades in on row hover alone.
The design-rule violations this branch had suppressed are paid instead:
the tables drop restatements the Table primitives own and take a compact
header size, FilterInput gains the dialog surface instead of a
caller-side color, the projects entries move to the section-action
variant, the MCP cancel cross fades via a wrapper the caller owns, and
the panel group's backdrop moves to its host. The counts this branch had
raised come back down with the entries pruned.
* fix(client): Preserve Shared Row Actions and Verify Panel States
* fix(client): Match Schedule Skeleton Action Height
* fix(client): Preserve Panel Overflow and Schedule History Actions
* refactor(client): Derive Row Action Classes From the Reveal Variant
The reveal recipe was spelled out both in the row-action-reveal Button variant
and in rowActionClasses. The helper now starts from the variant and only adds
the open and always-visible states, and the MCP card spec asserts classes the
real recipe renders instead of a mocked string.
* fix(client): Announce Panel Filter Results and Usage Changes
The schedule filter now reports its match count through a polite live
region, as the prompt filter does. The memory usage badge keeps a status
region beside its toggle so a changed usage is announced while focus is
elsewhere, and the search count reads as a floor while more pages remain.
* fix(client): Keep Row Focus Visible and Warn on Balance-Skipped Runs
The row action slot clipped its overflow even while focus was inside it,
cutting off the focused action's ring. It now clips only while collapsed.
Skill rows drew one focus ring around the whole row, so moving between the
open and disclosure buttons changed nothing on screen. Each button now draws
its own ring.
A run skipped for balance keeps its schedule enabled only until the skip
count disables it, so the row now shows it as a warning instead of reading
as healthy.
* test(e2e): Match the always-applied skill row's full button name
* refactor(client): Render MCP Row Actions Through the Button Primitive
The MCP row actions passed a computed class string to TooltipAnchor, which
the design rules cannot check, and the file carried a new static-classes
suppression for it. They now render the shared Button with the row-action
variants, like the bookmark and memory rows, and the suppression is gone.
* fix(client): Paint Field Notches With the Page Surface and Respect IME Escape
The marketplace, skills and prompts pages moved to the primary-alt surface,
but the floating labels on their fields still painted the presentation
surface, leaving a patch across each field's border in both themes. The
labels now paint the surface they sit on. The create-skill name label is a
plain label like the edit form's, since the Label primitive owns its color
and a notch has to paint its own backdrop.
Escape in the sidebar search cleared the query even while an IME was
composing, where Escape only cancels the composition.
* fix(client): Keep the Chat Column Within the Viewport Beside the Sidebar
Moving the surface off ResizablePanelGroup put a new flex item around it
with the default auto minimum width, so a reply with a wide table grew the
chat column past the viewport and cut its right edge off. The host now
allows itself to shrink, as the group did.
Also covers the sidebar search's IME Escape guard with a unit test, since
the search field is not mounted without a search backend.
(cherry picked from commit
|
||
|
|
cb78d894a9 |
🌊 refactor: Upgrade the Client to Tailwind v4 (#15996)
* 🌊 refactor: Upgrade the Client to Tailwind v4
Moves client/ to tailwindcss 4.3.3 through @tailwindcss/postcss, keeping the
JS config via `@config` so createTailwindColors(), the theme preset and the
high-contrast variant stay exactly as they are.
Renames the utilities whose meaning changed (outline-none -> outline-hidden,
shadow-sm -> shadow-xs), the ones v4 removed (flex-shrink-0 -> shrink-0,
flex-grow -> grow, blur-0 -> blur-none, ring-opacity-N -> a /N color modifier)
and the tailwindcss-radix variants, whose plugin generates nothing under v4, to
the data attributes Radix already sets. Restores the two preflight defaults v4
changed (border-color, ::placeholder) so the upgrade carries no visual change.
Verified by compiling the app's CSS under both versions: every class the source
uses that v3 generated, v4 generates too, and each declaration difference is a
v4 representation (logical properties, color-mix alpha, theme variables) with an
equal computed value.
* 🩹 fix: Keep the v4 Upgrade Invisible Where Review Found It Was Not
Four findings against this pull request, all of them defaults v4 changed under a
tree written against v3:
- v4 moved the blur scale up a step: its `blur-sm` is 8px where v3's was 4px,
and 4px is now `blur-xs`. Nothing in either Tailwind config overrides the
scale, so all six surviving small-blur sites rendered at twice their radius.
They are renamed `blur-xs`/`backdrop-blur-xs`.
- The high-contrast block reset `--tw-ring-opacity`, a variable v4 does not read,
and its comment named `ring-opacity-50`/`ring-opacity-20`, classes this change
deleted. Compiling the converted controls through this tree's own Tailwind
shows the slash modifier baking the alpha into `--tw-ring-color` as a
`color-mix(...)` — the ring measured `oklab(0 0 0 / 0.5)` in the mode that
promises full strength. The block now re-declares the ring colour, and the
same probe measures `rgb(0 0 0)`.
- `ResizableHandle` and its `Alt` twin carry a bare `border`, which v4 paints
with `currentColor`. The app's compatibility shim covers that inside the SPA
but is not part of the published stylesheet, so a standalone consumer drew a
text-coloured hairline around a `border-medium` grip. Both handles now name
`border-border-light` — the same #e3e3e3 the shim resolves to, and it follows
the active theme.
- `tailwindcss` was a devDependency only, while the published components emit
`outline-hidden`, `shadow-xs` and `origin-(--radix-…)`. A Tailwind 3 host
installed the package with no warning and silently lost focus suppression and
popup transform origins. `^4.3.3` is now a peer, like `tailwind-merge`, and the
consumer contract says so.
Two consequences of rebasing onto `dev` are settled here as well. The 28 commits
this branch caught up with added styling to eleven files the upgrade touches, so
their `no-restyle` counts are re-recorded: those violations are `dev`'s existing
code arriving in this pull request's lint scope, not new debt, and the diff shows
which file each belongs to. And `TemplateTable.tsx` goes back to exactly what
`dev` has: it is an unrendered mockup carrying six literal strings the i18n rule
rejects, so renaming its one `radix-state-open:` class would have pulled six
pre-existing errors into this lane for a component nothing mounts. It is the one
file the rename skips, and the reason is here rather than in a suppression.
Six `@scenario`-tagged specs read what the app paints: the 4px blur on the
artifact scrim, the ring resolving to the opaque ink token under high contrast
and to a `color-mix` without it, the handle's border following the theme in dark
mode rather than inheriting `currentColor`, a focused control keeping an outline
under forced colours, the restored v3 border and placeholder defaults, and npm
refusing the packed tarball beside Tailwind 3 with ERESOLVE.
* 🧱 fix: Keep v4's Cascade Layers and Revived Classes Out of the Rendering
Two mechanisms let the upgrade change what the app paints, and each one had more
sites than the reports that found it.
Tailwind 4 emits every utility inside `@layer utilities`, and an unlayered
declaration beats a layered one whatever its specificity. The SPA's hand-written
element and bare-pseudo rules used to lose to utilities by being element
selectors; they started winning. Measured in a browser against the compiled
stylesheet, before and after: a `<p class="my-4">` computed `0px` margins instead
of `16px`, a themed `<select>` fell back to square corners, a white background,
16px text and 40px of native arrow padding instead of `rounded-lg`, transparent,
14px and `px-2`, and a keyboard-focused control painted a 2px black outline over
the ring `focus-visible:outline-hidden` was supposed to leave alone. The `select`
rule, the `blockquote…p, pre { margin: 0 }` reset and the two bare focus rules now
sit in `@layer base`. `.dark :focus-visible`, the `code, pre` font `!important`
reset and the `.hidden`/`.overflow-*` class overrides stay unlayered: those are
meant to beat utilities, and layering them would change behaviour.
Tailwind 3 generated nothing for classes it could not parse, so a number of them
were dead markup; Tailwind 4 honours them. Compiling the same sources under 3.4.1
and 4.3.3 and diffing the generated selectors (2,412 vs 2,435) turns up 27 v4-only
tokens, 12 of which are this upgrade's own renames and 15 of which already existed
on `dev`. Those 15 are restored to what v3 painted: the artifact panel keeps its
150 ms desktop open and 300 ms mobile close rather than 350 ms and 250 ms, the
continue icon stays 12px rather than 76px, agent avatars keep their borderless
edge, file rows and the files side panel stay fluid rather than jumping to 25rem
and 7.5rem, a dialog that sets no `max-w` stays full width, the source rails keep
the scrollbar they had, the composer's control row stops declaring a container,
and the dropdown keeps the height, transform origin and destructive icon colour it
actually had. Each one is a design decision someone wrote and never saw; they are
catalogued for deliberate adoption in berry-13/LibreChat#67 instead of switching
on inside an invisible upgrade.
The reverse direction is clean: of the 70 selectors only v3 emits, every one is
extractor noise — JavaScript negations (`!visible`, `!table`, `!running`) its regex
mistook for important-prefixed classes, and a bare `animate-none` it split out of
`motion-reduce:animate-none`. No class is lost.
Four scenarios cover the two invariants: a paragraph keeps its margin utility, a
focused control shows only its ring, a native select keeps its token styling, and
the classes v3 ignored stay inert — the last one reading the artifact panel's
150 ms and then walking the stylesheets the page loaded to assert no rule exists
for any of the ten revived tokens.
`AddMultiConvo.tsx`'s `no-restyle` count drops 10 → 9, the entry the previous
commit's class removal left unpruned, and `AgentDetail.spec.tsx` loses the blank
line that deleting an assertion left behind — both were failing CI on the previous
head.
`FileListItem` is deleted rather than edited. It carried one of the `w-100` rows,
and nothing renders it: `FileList.tsx` imports it beside a commented-out line and
renders `FileListItem2` instead. Keeping it would have kept a `w-100` rule in the
stylesheet the scenario asserts is empty, and dragged its six unlocalized literals
into this lane — the same reason `TemplateTable` went earlier. Its dead import and
`no-restyle` entry go with it, as does an unused size map in `agents.tsx` that the
avatar never read.
* 🧹 fix: Stop the App's Own `.hidden` From Outranking `md:flex`
`client/src/style.css` declared `.hidden { display: none }`, a duplicate of the
utility Tailwind already emits. Unlayered, it outranked every layered variant that
reveals an element, so `hidden … md:flex` and `hidden … md:block` stayed hidden at
every width: the header's desktop cluster — export/share, the trace button,
temporary chat — never appeared, and the composer's MCP control lost the label its
accessible name comes from, which is why `e2e/specs/mock/activity-labels.spec.ts`
timed out waiting for a button named "MCP Servers" while the same suite passes on
the base branch.
Measured in a browser against the compiled stylesheets, `<span class="hidden
md:block">MCP Servers</span>` inside a button at 1280px:
| Stylesheet | computed display | button name |
|---|---|---|
| Tailwind 3 | `block` | `MCP Servers` |
| Tailwind 4, rule present | `none` | *(empty)* |
| Tailwind 4, rule deleted | `block` | `MCP Servers` |
Deleting it is the whole fix: Tailwind generates the identical `.hidden`, inside
`@layer utilities` where the responsive variants can win. `.overflow-x-auto` and
`.overflow-y-auto` stay unlayered with a note — they deliberately override the
utility of the same name with `overlay`, no source pairs them with a variant that
would need to win back, and both computed values are identical under either major.
`@scenario:the-desktop-header-shows-its-controls` opens a chat at 1280px, requires
the export/share control to be visible, narrows to 500px where it must be hidden,
and widens again.
* 🔗 fix: Let a List Link Keep the Utility That Unstyles It
`client/src/mobile.css` paints every list link blue, bold and underlined. `li a`
is two element selectors, so under Tailwind 3 any class beat it — which is how
the source cards in `verticals.tsx` and the skill file viewer, both carrying
`no-underline`, actually looked. Unlayered under v4's cascade layers it outranked
the utility instead, and those links came back underlined and bold.
`li a` moves into `@layer base`. `p.whitespace-pre-wrap a` does not: at (0,1,2) it
already outranked a single class under v3, and layering it would be the behaviour
change. Measured in a browser against both compiled stylesheets, a
`<li><a class="no-underline">`: Tailwind 3 computes `text-decoration-line: none`
with `font-weight: 700`, and the fixed Tailwind 4 build computes the same, while
the paragraph link keeps its underline in both.
`@scenario:a-list-link-keeps-its-no-underline-utility` paints both links through
the stylesheet the app loaded and asserts the utility wins on the carded one, the
plain one keeps its underline, and the bold the rule owns survives.
* fix: Carry the v4 Upgrade Across What Dev Added
Rebasing onto dev brought seven commits, and three of them land styling and a
test this upgrade has to account for.
ToolCall.tsx and McpOAuthDialog.tsx arrived written in v3 class order, which
prettier-plugin-tailwindcss rejects under v4. Both are reordered, with no class
added or removed. Textarea.tsx already carried the same drift and was the only
file in this branch's own diff against dev still failing the rule, so it is
reordered here as well.
dialog-scrim-role.spec.ts pins the new OGDialog scrim by string-comparing
getComputedStyle().backgroundColor against an rgba literal. Tailwind 4 compiles
a slash modifier to color-mix(in oklab, ...), which Chromium reports as
oklab(L a b / alpha), so all four scenarios would read oklab(0.463999 ... / 0.8)
where they expect rgba(89, 89, 89, 0.8). The paint is unchanged and only the
serialization moved, so readScrim now rounds the computed color through a 1x1
canvas, which returns the same sRGB channels for either spelling. The
expectations stay written as the rgba a reader can check against the palette,
and the spec keeps testing the color rather than its text form.
Dev's change also deleted the overlay this file used to render beside its
content, which was one of its recorded no-restyle violations, so the backlog
entry drops from 8 to 7.
* fix: Give the Primitives the Focus and Elevation Their Callers Were Restating
The design-rule gate reads a renamed utility as a swapped violation, so every
v3 name the upgrade rewrote on a primitive (outline-none to outline-hidden,
shadow-sm to shadow-xs, radix-state-open: to data-[state=open]:) failed it.
Fix the call sites instead of re-recording them:
- Button, Input, Textarea, SecretInput and AnimatedTabs already hide the
outline on the focus state that shows one, so the restated class goes.
- TextareaAutosize, TooltipAnchor, OGDialogContent, OGDialogClose,
OGDialogTitle and CollapsibleTrigger take focusOutline="hidden" for a
caller that draws its own indicator.
- Alert takes elevation="raised" for the auth notices and message errors
that carried a shadow.
- The presets trigger's open fill moves to the Radix Trigger that stamps
data-state; the parameters anchor's never matched, so it is dropped, as is
the MCP config inputs' one-off shadow.
Two controls had lost their keyboard outline under v4, where outline-hidden
sets --tw-outline-style: none and outline-2 reads it: the files table's name
cell gets it back, and the admin settings trigger drops the dead outline for
the ring Button already draws.
* test: Compile the Code Typography Spec With Tailwind v4
The spec dev added in #16146 ran tailwindcss as a PostCSS plugin, which v4
moved to @tailwindcss/postcss. Compile style.css the way the app does, with
source(none) and an inline source standing in for the raw content the v3
config override supplied, and bridge Node's structuredClone into jsdom for
the compiler. The assertions are unchanged and still fail when style.css
restates the code font with !important.
* test: Cover the Focus Outlines the Primitives Now Own
Adds two scenarios beside the upgrade's other focus checks: the files table's
name cell draws its 2px keyboard outline again, and a control that opts into
focusOutline="hidden" drops the browser outline while forced colors still
repaints the transparent one.
* fix: Keep OGDialog's Entrance From Sliding In Half a Width
v4 compiles translate-x-[-50%] and translate-y-[-50%] to the translate
property, which tailwindcss-animate's enter and exit keyframes compose with
through transform instead of replacing as they did in v3. The surface's
slide-in-from-left-1/2 and slide-in-from-top-[48%] therefore started every
OGDialog half its width to the left of centre and slid it across, where v3
started it 2% of its height below its resting place. Name only that 2% in
each direction, which reproduces v3's motion over the centering translate.
Found by #16068's dialog-scrim-role scenarios, which sample the dialog's
position mid-entrance and failed against the upgraded build.
---------
Co-authored-by: berry-13 <berry-13@users.noreply.github.com>
(cherry picked from commit
|
||
|
|
0da30ed479
|
👆 style: Thumb-Sized Send Button on Touch Devices (#15979)
* 👆 fix: Thumb-Sized Send Button on Touch Devices
* fix: floor the submit target wherever touch is reachable, not only on a coarse primary pointer
---------
Co-authored-by: Lia <lia@librechat.ai>
|
||
|
|
69889210d2
|
💠 style: Unify Code Approval With Composer Controls (#15721)
The code approval selector was the only chat control built on the shadcn `DropdownMenu` primitives — a borderless ghost button and default radio dots beside a row of bordered composer pills, with per-item text styled by hand. - Rebuild the control on the composer's own menu language (Ariakit menu + `TooltipAnchor`), matching `MCPSelect`: a pill trigger with a rotating chevron, and a `bg-presentation` popover whose options carry an icon, a description and a check on the selected row, as the model and MCP menus already do. - Extract the pill appearance into `composerControlClasses()` beside `composerSurfaceClasses()` in `@librechat/client`, and consume it from `CheckboxButton` and `MCPSelect`, which each carried their own copy of the same border/radius/height/elevation decision. - Replace the raised hand with a pair that reads as one question — a document with a question mark for "ask", a document with a pen for "accept edits" — leaving the shield to the pending review button that sits in the same row. Roles, keyboard behaviour and the stored `codeApprovalMode` are unchanged: the trigger keeps its `code-approval-mode` test id and `aria-expanded`, and the options stay `menuitemradio`. |
||
|
|
b0a559876f
|
🧩 feat: Collapsible Wake-Up Task Cards and Subagent UI Consistency (#15364)
* 🧩 feat: Collapsible Wake-Up Task Cards and Subagent UI Consistency * 🧩 fix: Codex Round 1 — Shared Composer Surface, Pinned Event Tasks, Durable Wake-Up Links * 🧩 fix: Codex Round 2 — Pin Requested Event Tasks, Share Gating, Focus Return * 🧩 fix: Codex Round 3 — Promote Composer Surface to @librechat/client Semantic Primitive |
||
|
|
cb6dbc8f60
|
⚡ refactor: Migrate @librechat/client build to tsdown (#13596)
* ⚡ refactor: Migrate @librechat/client build from Rollup to tsdown Mirrors the data-schemas migration. Replaces Rollup (rpt2 + postcss) with tsdown (rolldown + oxc); the package build drops from tens of seconds to ~0.3s. - Emit isolated-declaration .d.ts via oxc (dts.oxc) and enforce isolatedDeclarations in tsconfig for editor DX (source made clean: explicit export type annotations added across src, no `any`). - Extract component CSS to dist/style.css so the CJS output stays valid CommonJS (the prior postcss runtime-injection produced an ESM import in the CJS bundle that breaks jest/require). Imported once in the client app entry; Vite bundles it for the app. - Repoint package.json to dual .mjs/.cjs + .d.mts/.d.cts and add ./style.css and ./package.json exports. - Update CI build-cache keys to hash tsdown.config.mjs; remove rollup.config.js. * 🔧 chore: address Codex review on client tsdown migration - Add tsdown.config.mjs to turbo.json build `inputs` so changes to the new bundler config invalidate the Turbo cache (the shared inputs only listed the rollup configs). Also covers the already-migrated data-schemas. - Name the memoized default export (ControlComboboxMemo) instead of the codefix-generated `_default_1`, for clearer stack traces / grepping. |
||
|
|
6b5596ec36
|
🍪 refactor: Refresh CloudFront Media Cookies (#13091)
* fix: refresh CloudFront media cookies * fix: satisfy changed-file lint * fix: centralize CloudFront image retry * fix: honor base path for CloudFront refresh * fix: bypass auth refresh for CloudFront cookie retry * fix: pass app auth header to CloudFront retry * test: cover CloudFront refresh with OpenID reuse * fix: avoid duplicate CloudFront refresh retries * fix: clear CloudFront scope cookie with matching flags |
||
|
|
b4b5a2cd69
|
🪟 feat: DataTable update + Various UI enhancements (#9698)
* 🎨 feat: Enhance Import Conversations UI with loading state and new localization key * fix: Correct pluralization in selected items message in translation.json * Refactor Chat Input File Table Headers to Use SortFilterHeader Component - Replaced button-based sorting headers in the Chat Input Files Table with a new SortFilterHeader component for better code organization and consistency. - Updated the header for filename, updatedAt, and bytes columns to utilize the new component. Enhance Navigation Component with Skeleton Loading States - Added Skeleton loading states to the Nav component for better user experience during data fetching. - Updated Suspense fallbacks for AgentMarketplaceButton and BookmarkNav components to display Skeletons. Refactor Avatar Component for Improved UI - Enhanced the Avatar component by adding a Label for drag-and-drop functionality. - Improved styling and structure for the file upload area. Update Shared Links Component for Better Error Handling and Sorting - Improved error handling in the Shared Links component for fetching next pages and deleting shared links. - Simplified the header rendering for sorting columns and added sorting functionality to the title and createdAt columns. Refactor Archived Chats Component - Merged ArchivedChats and ArchivedChatsTable components into a single ArchivedChats component for better maintainability. - Implemented sorting and searching functionality with debouncing for improved performance. - Enhanced the UI with better loading states and error handling. Update DataTable Component for Sorting Icons - Added sorting icons (ChevronUp, ChevronDown, ChevronsUpDown) to the DataTable headers for better visual feedback on sorting state. Localization Updates - Updated translation.json to fix missing translations and improve existing ones for better user experience. * ✨ feat: Update DataTable component to streamline props and enhance sorting icons * fix: TS issues * feat: polish and redefine DataTable + shared links and archived chats * feat: enhance DataTable with column pinning and improve sorting functionality * feat: enhance deepEqual function for array support and improve column style stability * refactor: DataTable and ArchivedChats; fix: sorting ArchivedChats API * feat(DataTable): Implement new DataTable component with hooks and optimized features - Added DataTable component with support for virtual scrolling, row selection, and customizable columns. - Introduced hooks for debouncing search input, managing row selection, and calculating column styles. - Enhanced accessibility with keyboard navigation and selection checkboxes. - Implemented skeleton loading state for better user experience during data fetching. - Added DataTableSearch component for filtering data with debounced input. - Created utility logger for improved debugging in development. - Updated translations to support new UI elements and actions. * refactor: update SharedLinks and ArchivedChats to use desktopOnly instead of hideOnMobile; remove unused DataTableColumnHeader component * fix: ensure desktopOnly columns are hidden on mobile in DataTable * refactor: reorganize imports in DataTable components and update index exports * refactor: improve styling and animations in Artifacts, ArtifactsSubMenu, and MCPSubMenu components; update border-radius in style.css * refactor(Artifacts): enhance button toggle functionality and manage expanded state with useEffect * refactor: comment out desktopOnly property in SharedLinks and ArchivedChats components; update translation.json with new keys for link actions * refactor(DataTable): streamline column visibility logic and enhance type definitions; improve cleanup timers and optimize rendering * refactor(DataTable): enhance type definitions for processed data rows and update custom actions renderer type * refactor(DataTable): optimize processed data handling and improve warning for missing IDs; streamline DataTableComponents imports * refactor(DataTable): enhance accessibility features and improve localization for selection and loading states * refactor: improve padding in dialog content and enhance row selection functionality in ArchivedChats and DataTable components * refactor(DataTable): remove unnecessary role and tabindex attributes from select all button for improved accessibility * refactor(translation): remove outdated error messages and unused UI strings for cleaner localization * refactor(DataTable): enhance virtualization and scrolling performance with dynamic overscan adjustments * refactor(DataTableErrorBoundary): enhance error handling and localization support * refactor(DataTable): improve column sizing and visibility handling; remove deprecated features * refactor: enhance UI components with improved class handling and state management * refactor(DataTable): improve column width handling and responsiveness; disable row selection * refactor(DataTable): enhance accessibility with row header support and improve column visibility handling * chore(DataTable): comments update * refactor(Table): add unwrapped prop for direct table rendering; adjust minWidth calculation for responsiveness * refactor(DataTable): simplify search handling by removing unnecessary trimming; adjust column width handling for better responsiveness * refactor(translation): remove redundant drag and drop UI text for clarity * refactor(parsers): change uiResources to a constant and streamline artifacts handling * chore: remove unused file, bump @librechat/client to 0.3.2; fix(SharedLinks): missing import; * refactor: change button variant from destructive to ghost for delete actions in SharedLinks and ArchivedChats components * refactor(DataTable): simplify aria-sort assignment for better readability * refactor(DataTable): update aria-label and ariaLabel to use indexed placeholder for localization * refactor(translation): update no data messages for consistency * Refactor code structure for improved readability and maintainability * chore: restore linting fixes * chore: restore linting fixes 2; refactor: remove unused translation keys * feat(tests): add unit tests for DataTable components and error handling - Implement tests for SelectionCheckbox and SkeletonRows components in DataTable. - Add tests for DataTableErrorBoundary to ensure proper error handling and UI rendering. - Create tests for DataTableSearch to validate search functionality and accessibility. - Update DialogTemplate tests to reflect hardcoded cancel text. - Remove redundant IntersectionObserver mock in SplitText tests. - Unmock react-i18next in Translation tests to validate actual i18n functionality. * refactor: Remove jest-environment-jsdom dependency from package.json; fix: reset package-lock * chore: revert lint fixes * chore: clean up package.json by removing unused devDependencies and redundant test scripts * chore: update package dependencies in package.json and package-lock.json - Added new devDependencies: @babel/core, @babel/preset-env, @babel/preset-react, @babel/preset-typescript, @tanstack/react-table, @tanstack/react-virtual, @testing-library/jest-dom, identity-obj-proxy, jest, jest-environment-jsdom, and lucide-react. - Updated existing devDependencies to their latest versions. - Added new module @asamuzakjp/css-color to package-lock.json with its dependencies. - Updated version of @babel/plugin-transform-destructuring and added @babel/plugin-transform-explicit-resource-management in package-lock.json. --------- Co-authored-by: Danny Avila <danny@librechat.ai> |
||
|
|
79197454f8
|
📦 feat: Move Shared Components to @librechat/client (#8685)
* feat: init @librechat/client * feat: Add common types and interfaces for accessibility, agents, artifacts, assistants, and tools * feat: Add jotai as a peer dependency * fix build client package * feat: cleanup unused types from common/index.ts - Remove 104 unused type exports from packages/client/src/common/index.ts - Keep only 7 actually used exports (93% reduction) - Add cleanup script with enhanced import pattern detection - Support both named imports and namespace imports (* as t) - Create automatic backups and comprehensive documentation - Maintain type safety with build verification - No breaking changes to existing code Kept exports: - TShowToast, Option, OptionWithIcon, DropdownValueSetter - MentionOption, NotificationSeverity, MenuItemProps Scripts: cleanup-common-types-safe.js, README-CLEANUP.md * fix: cleanup * fix: package; refactor: tsconfig * feat: add back `recoil` * fix: move dependencies to peerDependencies in client package * feat: add @librechat/client as a dependency in package.json and package-lock.json * feat: update client package configuration and dependencies - Added new dependencies for Rollup plugins and updated existing ones in package.json and package-lock.json. - Introduced a new Rollup configuration file for building the client package. - Refactored build scripts to include a dedicated build command for the client. - Updated TypeScript configuration for improved module resolution and type declaration output. - Integrated a Toast component from the client package into the main App component. * feat: enhance Rollup configuration for client package - Updated terser plugin settings to preserve directives like 'use client'. - Added custom warning handler to ignore "use client" directive warnings during the build process. * chore: rename package/client build script command * feat: update client package dependencies and Rollup configuration - Added rollup-plugin-postcss to package.json and updated package-lock.json. - Enhanced Rollup configuration to include postcss plugin for CSS handling. - Updated index.ts to export all components from the components directory for better modularity. * feat: add client package directory to update configuration - Included the 'client' package directory in the update.js configuration to ensure it is recognized during updates. * feat: export Toast component in client package - Added export for the Toast component in index.ts to enhance modularity and accessibility of components. * feat: /client transition to @librechat/client * chore: fixed formatting issues * fix: update peer dependencies in @librechat/client to prevent bundling them * fix: correct useSprings implementation in SplitText component * fix: circular dependencies in DataTable * fix: add remaining peer dependencies and match actual versions previously used in `client/package.json` * fix: correct frontend:ci script to include client package build * chore: enhance unused package detection for @librechat/client and improve dependency extraction * fix: add missing peer dependency for @radix-ui/react-collapsible * chore: include "packages/client" in unused i18next keys detection * test: update AgentFooter tests to use document.querySelector for spinner checks test: mock window.matchMedia in setupTests.js for consistent test environment * feat: add react-hook-form dependency and update FormInput component to use its types * chore: linting * refactor: remove unused defaultSelectedValues prop from MCPSelect and MultiSelect components * chore: linting * feat: update GitHub Actions workflow to publish @librechat/client * chore: update GitHub Actions workflow to install and build data-provider and client dependencies * chore: add missing @testing-library/react dependency to client package * chore: update tsconfig.json to exclude additional test files * chore: fix build issues, resolve latest LC changes * chore: move MCP components outside of `~/components/ui` * feat: implement dynamic theme system with environment variable support and Tailwind CSS integration * chore: remove unnecessary logging of sttExternal and ttsExternal in Speech component * chore: squashed cleanup commits chore: move @tanstack/react-virtual to dependencies and remove recoil from package.json chore: move dependencies to peerDependencies in package.json feat: update package.json and rollup.config.js to include jotai and enhance bundling configuration feat: update package.json and rollup.config.js to include jotai and enhance bundling configuration refactor: reorganize exports in index.ts for improved clarity refactor: remove unused types and interfaces from common files refactor: update peer dependencies and improve component typings - Removed duplicate peer dependencies from package.json and organized them. - Updated rollup.config.js to disable TypeScript checking during the build process. - Modified AnimatedTabs component to use React.ReactNode for label and content types, and added TypeScript workarounds for compatibility. - Enhanced Label and Separator components to accept an optional className prop and improved prop spreading. - Updated Slider component to include an optional className prop and refined prop handling for better type safety. refactor: clean up client workflow and update package dependencies refactor: update package dependencies and improve PostCSS and Rollup configurations chore: bump version to 0.1.2 in package.json chore: bump client version to 0.1.2 in package-lock.json chore: bump client version to 0.1.3 and update dependencies chore: bump client version to 0.1.4 and update @react-spring dependencies chore: update package version to 0.1.5 and adjust peer dependencies - Bump version in package.json from 0.1.4 to 0.1.5. - Update peer dependency for @tanstack/react-query to allow version 5.0.0. - Add @tanstack/react-table and @tanstack/react-virtual as dependencies. - Update various dependencies to their latest compatible versions. - Simplify postcss.config.js by removing unnecessary options. - Clean up rollup.config.js by removing ignored PostCSS warnings. - Update CheckboxButton component to cast icon as React JSX element. - Adjust Combobox component's class names for better styling. - Change DropdownPopup component to use React's namespace import. - Modify InputOTP component to use 'any' type for OTPInputContext. - Ensure displayLabel and value in ModelParameters are converted to strings. - Update MultiSearch component's placeholder to ensure it's a string. - Cast selectIcon in MultiSelect as React JSX element for consistency. - Update OGDialogTemplate to cast selectText as React JSX element. - Initialize animationRef in PixelCard with undefined for clarity. - Add TypeScript ignore comments in Select and SelectDropDown components for Radix UI type conflicts. - Ensure title in SelectDropDown is a string and adjust rendering of options. - Update useLocalize hook to cast options as any for compatibility. refactor: code structure; chore: translations cleanup chore: remove unused imports and clean up code in NewChat component refactor: enhance Menu component to support custom render functions for menu items style: update itemClassName in ToolsDropdown for improved UI consistency fix: merge conflicts chore: update @radix-ui/react-accordion to version 1.2.11 * refactor: remove unnecessary TypeScript type assertions in AnimatedTabs, Label, Separator, and Slider components * feat: enhance theme system with localStorage persistence and new theme atoms * chore: bump version of @librechat/client to 0.1.7 * chore: fix ci/cd warnings/errors related to linting and unused localization keys * chore: update dependencies for class-variance-authority, clsx, and match-sorter * chore: bump @librechat/client to v0.1.8 * feat: add utility colors for theme customization and remove unused tailwindConfig * v0.1.9 --------- Co-authored-by: Marco Beretta <81851188+berry-13@users.noreply.github.com> |