LibreChat/client/src/components
Marco Beretta 40d2f682a4
feat: theme-adaptive SVG support for custom MCP and group icons
Custom icons (MCP server iconPath, model spec groupIcon) were rendered as
plain <img>, so monochrome SVGs kept fixed dark colors and were nearly
invisible in dark theme.

Introduce a shared CustomIcon component that detects monochrome SVG glyphs
and tints them with currentColor so they follow the active theme, while
multi-color SVG logos and raster images keep their original colors. The
monochrome decision parses the SVG's color tokens; content is fetched once,
cached, and any failure falls back to the original image. Monochrome SVGs
render via CSS mask, never inlined, so no SVG markup reaches the DOM.

Apply across all custom-icon surfaces: MCP settings cards, the chat MCP
dropdown, stacked MCP icons, tool-call headers, and model group icons.

Also support SVG in the MCP avatar uploader: add SVG to the accepted file
types and sanitize uploaded SVGs with DOMPurify before storing them, and
make the dialog preview theme-adaptive via the same component.

Add unit tests for SVG detection, monochrome analysis, sanitization, and
CustomIcon rendering.
2026-06-18 09:13:09 +02:00
..
__tests__ ⚙️ refactor: lazy-load React Query Devtools (#13639) 2026-06-10 13:06:20 -04:00
Agents 🚪 fix: Align Mobile Sidebar Toggle Gating with JS Breakpoint Across Views (#13654) 2026-06-10 15:31:56 -04:00
Artifacts
Audio
Auth
Banners
Bookmarks
Chat feat: theme-adaptive SVG support for custom MCP and group icons 2026-06-18 09:13:09 +02:00
Conversations 🔖 feat: Add Pinned Conversations (#13492) 2026-06-17 20:26:55 -04:00
Endpoints 🩹 chore: Double-Assert Partial Test Fixture in EndpointIcon (#13567) 2026-06-06 21:57:59 -04:00
Files
Input
MCP feat: theme-adaptive SVG support for custom MCP and group icons 2026-06-18 09:13:09 +02:00
MCPUIResource
Messages feat: Show Message Timestamps on Hover (#13709) 2026-06-14 09:39:52 -04:00
Nav ⚙️ refactor: Lazy load locale resources (#13640) 2026-06-10 08:48:58 -04:00
OAuth
Plugins/Store
Projects 🧭 fix: Mobile Sidebar Navigation on Projects View (#13647) 2026-06-10 09:07:21 -04:00
Prompts 🚪 fix: Align Mobile Sidebar Toggle Gating with JS Breakpoint Across Views (#13654) 2026-06-10 15:31:56 -04:00
Share feat: Show Message Timestamps on Hover (#13709) 2026-06-14 09:39:52 -04:00
SharePoint
Sharing
SidePanel feat: theme-adaptive SVG support for custom MCP and group icons 2026-06-18 09:13:09 +02:00
Skills 🚪 fix: Align Mobile Sidebar Toggle Gating with JS Breakpoint Across Views (#13654) 2026-06-10 15:31:56 -04:00
System ⚙️ refactor: Lazy load locale resources (#13640) 2026-06-10 08:48:58 -04:00
Tools
ui feat: theme-adaptive SVG support for custom MCP and group icons 2026-06-18 09:13:09 +02:00
UnifiedSidebar
Web
index.ts
QueryDevtoolsGate.tsx ⚙️ refactor: lazy-load React Query Devtools (#13639) 2026-06-10 13:06:20 -04:00