mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-16 13:00:55 +00:00
* 🧵 fix: Restore Classes tailwind-merge Was Silently Dropping tailwind-merge 1.9.1 predates Tailwind 3.3, so its conflict map has no group for text-wrap, touch-action, gradient color stops, or arbitrary bg-* properties. cn() therefore deleted classes the caller wrote, with no error: touch-pan-y on the mobile sidebar, from-* gradient colors behind three overlays, text-balance and text-pretty across the Projects and Prompts cards, and the checkerboard background on the skill file preview. Bumps client and the @librechat/client peer range to ^2.6.1, the line that supports Tailwind 3.x. Tailwind v4 requires tailwind-merge 3.x and moves in the v4 pull request, so this change is the class map alone. * ✅ test: Cover the Classes tailwind-merge Was Dropping From a Browser Three `@scenario`-tagged specs ask the browser what the DOM actually got, one per class `cn()` was deleting: the mobile drawer's `touch-pan-y` beside `touch-pinch-zoom`, the shared-conversation fade's `from-surface-secondary` beside `from-40%`, and `text-balance`/`text-pretty` beside `truncate` and `line-clamp-2`. Each resolves both sides of its comparison in the browser — computed value against the theme custom property, normalised through a probe — so the same spec holds in light mode, dark mode, under a custom theme and after the Tailwind v4 upgrade that follows this change in the stack. The wrapping scenario asserts the Projects header and description rather than `Prompts/lists/ListCard.tsx`: that component is exported but has no JSX call site anywhere in the repository, so its `text-balance` renders nowhere and the pull request's table overstates it. The `Projects` views carry the same pair and do render. * 🔬 test: Ask the Browser for Styles by Their CSS Names computedStyles took camelCase names straight to getPropertyValue, which only answers to the CSS spelling and returns '' for anything else, so every probe but width and height fell through to an indexed read on the declaration that TypeScript only allowed behind an 'as never' cast. touchAction reached the assertions that way. The helper now hyphenates the name it was given and asks once: a property the browser does not know comes back empty and fails its assertion instead of silently taking another path. --------- Co-authored-by: berry-13 <berry-13@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| sw | ||
| test | ||
| babel.config.cjs | ||
| check_updates.sh | ||
| index.html | ||
| jest.config.cjs | ||
| jest.resolver.cjs | ||
| nginx.conf | ||
| package.json | ||
| postcss.config.cjs | ||
| tailwind.config.cjs | ||
| tsconfig.json | ||
| vite.config.ts | ||