-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
P2Priority 2: Important, fix when possiblePriority 2: Important, fix when possiblefeatureNew feature or enhancementNew feature or enhancementwidgetRelated to frontend widgetRelated to frontend widget
Description
Summary
Replace the hardcoded brain icon in the chat widget header with community-specific logos. Each community should be able to provide their own icon/logo that displays in the widget avatar area.
Logo Resolution (Precedence, highest to lowest)
- Widget JS config (
setConfig({ logo: '...' })) - Embedder override, highest precedence - YAML config (
widget.logo_urlfield) - Community maintainer sets in config.yaml - Convention-based - A
logo.pngorlogo.svgfile in the community's folder (src/assistants/{id}/)
Implementation Plan
Backend
- Add
logo_urlfield toWidgetConfiginsrc/core/config/community.py - Add API endpoint to serve community logo files (e.g.,
GET /{community_id}/logo) - During config loading, auto-detect
logo.png/logo.svgin community folder if no explicitlogo_urlset - Return logo URL in community config API response
Frontend (Widget)
- Update
applyWidgetConfig()to handle logo from API response - Support
logoinsetConfig()for embedder override - Render as
<img>when a URL is provided, fall back to brain SVG icon - Proper sizing/scaling within the existing avatar circle
Config Schema
widget:
title: HED Assistant
logo_url: https://example.com/hed-logo.png # Optional
# ... existing fieldsAcceptance Criteria
- Communities can specify logo via YAML config
- Embedders can override logo via widget JS config
- Convention-based logo detection (file in folder)
- Graceful fallback to brain icon when no logo provided
- Logo properly scaled within avatar circle
- Works with both PNG and SVG formats
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Priority 2: Important, fix when possiblePriority 2: Important, fix when possiblefeatureNew feature or enhancementNew feature or enhancementwidgetRelated to frontend widgetRelated to frontend widget