feat: Add Chat UX improvements with notifications and @mention support

- Add ActionBar component with expandable toolbar for mobile
- Add @mention functionality with autocomplete dropdown
- Add browser notification system (push, sound, vibration)
- Add NotificationSettings modal for user preferences
- Add mention badges on room list cards
- Add ReportPreview with Markdown rendering and copy/download
- Add message copy functionality with hover actions
- Add backend mentions field to messages with Alembic migration
- Add lots field to rooms, remove templates
- Optimize WebSocket database session handling
- Various UX polish (animations, accessibility)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
egg
2025-12-08 08:20:37 +08:00
parent 92834dbe0e
commit 599802b818
72 changed files with 6810 additions and 702 deletions

View File

@@ -13,10 +13,10 @@ from app.modules.auth import router as auth_router
from app.modules.auth.users_router import router as users_router
from app.modules.auth.middleware import auth_middleware
from app.modules.chat_room import router as chat_room_router
from app.modules.chat_room.services.template_service import template_service
from app.modules.realtime import router as realtime_router
from app.modules.file_storage import router as file_storage_router
from app.modules.report_generation import router as report_generation_router
from app.modules.report_generation import health_router as report_health_router
# Frontend build directory
FRONTEND_DIR = Path(__file__).parent.parent / "frontend" / "dist"
@@ -53,24 +53,17 @@ app.include_router(chat_room_router)
app.include_router(realtime_router)
app.include_router(file_storage_router)
app.include_router(report_generation_router)
app.include_router(report_health_router)
@app.on_event("startup")
async def startup_event():
"""Initialize application on startup"""
from app.core.database import SessionLocal
from app.core.minio_client import initialize_bucket
import logging
logger = logging.getLogger(__name__)
# Initialize default templates
db = SessionLocal()
try:
template_service.initialize_default_templates(db)
finally:
db.close()
# Initialize MinIO bucket
try:
if initialize_bucket():
@@ -80,6 +73,10 @@ async def startup_event():
except Exception as e:
logger.warning(f"MinIO connection failed: {e} - file uploads will be unavailable")
# Check DIFY API Key configuration
if not settings.DIFY_API_KEY:
logger.warning("DIFY_API_KEY not configured - AI report generation will be unavailable")
@app.get("/api/health")
async def health_check():