-
Notifications
You must be signed in to change notification settings - Fork 1.4k
🚀 Complete Plugin System + Analytics Dashboard + Theme System [v1.0.49 Updated] #775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
🚀 Complete Plugin System + Analytics Dashboard + Theme System [v1.0.49 Updated] #775
Conversation
✨ UI Theme Improvements: - Fixed notification text contrast in dark theme (black text instead of white) - Enhanced theme selector to use useThemeStyles for proper text colors - Improved glassmorphism effects in advanced theme with better opacity - Fixed mission control route cards styling for advanced theme 🐛 Bug Fixes: - Resolved notification visibility issues in dark theme - Fixed theme selector text colors using hardcoded Tailwind classes - Improved dialog styling with better glassmorphism gradients - Enhanced advanced theme CSS variables for better component contrast 🔧 Technical Changes: - Added useThemeStyles hook integration in ThemeSelector component - Optimized notification background colors for better readability - Enhanced CSS variables for advanced theme glassmorphism effects - Improved route monitoring cards styling in mission control ✅ Tested across all three themes (light, dark, advanced) for consistency
deleted: docs/history/2025-09-04_theme-system-implementation.md deleted: docs/reports/ui_analysis_report.md modified: package-lock.json new file: plugins/analytics/index.ts new file: plugins/analytics/manager.ts new file: plugins/analytics/middleware/tracking.ts new file: plugins/analytics/routes/analytics.ts new file: plugins/analytics/routes/mission-control.ts new file: plugins/analytics/types.ts modified: src/index.ts modified: src/server.ts deleted: ui/src/styles/dashboard-advanced.css deleted: ui/test-advanced-theme.js
- Remove src/routes/analytics.ts (moved to plugins/analytics/routes/) - Remove src/routes/mission-control.ts (moved to plugins/analytics/routes/) - Remove src/utils/analytics.ts (moved to plugins/analytics/manager.ts) - Remove src/middleware/tracking.ts (moved to plugins/analytics/middleware/) Analytics is now completely isolated in the plugin system
- Remove unused routes: cost, performance, forecast, strategy, routes - Remove unused controllers: costController, performanceController - Remove all mock data files (moved inline where needed) - Keep only essential provider health endpoint used by UI - Simplify server.ts imports and registrations - Eliminate ~500+ lines of dead code Result: Dramatically reduced conflicts with upstream while maintaining all used functionality
✅ Analytics fully isolated in plugins/analytics/: - Server integration: plugins/analytics/index.ts - Routes & middleware: plugins/analytics/routes/, plugins/analytics/middleware/ - UI components: plugins/analytics/ui/ (hooks, contexts, types) - Real data endpoints: /api/v1/mission-control/* 🗑️ Dead code cleanup (~500+ lines removed): - Removed unused controllers: cost, performance, forecast, monitor, providerHealth - Removed unused routes: optimization.ts, request-optimization.ts, providers.ts - Removed mock data files and duplicate analytics code from src/ - Cleaned up UI: removed duplicate Dashboard components 🏗️ Plugin architecture: - Core plugin loading: 6 lines added to src/index.ts - UI integration: @plugins alias configured in vite.config.ts & tsconfig.json - Zero conflicts: Analytics completely separated from upstream code 📦 Build status: Ready for merge with advanced-theme-redesign branch
…orking Mission Control - Unified analytics configuration under plugins.analytics.* structure - Implemented proper tracking middleware for data collection - Fixed frontend data parsing in useMissionControl hook - Added comprehensive Mission Control dashboard with live activity - Added route monitoring with per-route activity logs - Fixed TypeScript issues and API response handling - Analytics plugin fully functional with backend and frontend integration - Added config example with analytics configuration - Cleaned up backup files and improved code organization
…-redesign - Complete analytics plugin system with unified configuration - Working Mission Control dashboard with live activity monitoring - Route-specific activity logs and comprehensive analytics - Fixed frontend-backend integration and data parsing - Enhanced theme system with analytics integration
🎯 MAJOR UPDATE: Analytics Plugin Complete! Just pushed complete analytics plugin refactoring:
See ANALYTICS_PLUGIN_REFACTOR_REPORT.md for full details. |
🎯 Plugin loading system implemented and tested: - ✅ Plugin loads from config.plugins.analytics.enabled - ✅ Analytics routes registered (/api/analytics/*) - ✅ Mission Control routes working (/api/v1/mission-control/*) - ✅ Real-time data collection functioning - ✅ Provider health monitoring active - ✅ 66 models tracked, 1000+ metrics loaded - ✅ Web UI accessible at http://127.0.0.1:3456 📊 Confirmed working endpoints: - /api/analytics/realtime - Real-time statistics - /api/analytics/models - Model performance data - /api/v1/mission-control/provider-health - Provider monitoring - /api/v1/mission-control/stats - System statistics 🚀 Analytics Plugin fully operational!
new file: plugins/themes/components/ThemeSelector.tsx new file: plugins/themes/contexts/ThemeContext.tsx new file: plugins/themes/index.ts new file: plugins/themes/styles/components.css new file: plugins/themes/styles/themes.css new file: plugins/themes/styles/variables.css new file: plugins/themes/types/index.ts modified: .vscode/settings.json modified: plugins/themes/README.md modified: plugins/themes/components/ThemeSelector.tsx modified: plugins/themes/contexts/ThemeContext.tsx modified: plugins/themes/styles/themes.css modified: plugins/themes/styles/variables.css modified: src/index.ts modified: ui/src/App.tsx modified: ui/src/components/SettingsDialog.tsx modified: ui/src/types.ts plugins/themes/loader/ plugins/themes/styles/layout.css plugins/themes/styles/overrides.css test-theme.html
🎨 Replace layout-transformer.js with safe TypeScript implementation - Create layout-enhancer.ts with non-destructive DOM manipulation - Progressive enhancement that ONLY adds CSS classes - Safe integration in ThemeContext.tsx with dynamic imports - Remove dangerous layout-transformer.js that destroyed DOM 🔧 Key Features: - Advanced theme gets centered layout (max-width: 1400px) - Glass morphism effects for advanced theme - Navigation enhancement with glassmorphism tabs - Transform .bg-white elements to glass cards - Theme-aware hover effects and animations 🛡️ Safety Features: - Never uses innerHTML = '' (prevents content destruction) - Only adds classes, never removes original functionality - Graceful degradation if enhancer fails to load - Proper cleanup when themes plugin is disabled 🎯 Addresses issue with reproducing advanced-theme-redesign experience through plugin-only CSS without modifying author's components 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
❌ Issues with layout-enhancer.ts: - Interfered with app functionality (buttons stopped working) - Made interface unresponsive - Caused theme rendering issues - Too aggressive DOM manipulation ✅ New Pure CSS Approach: - Removed all JavaScript layout manipulation - Enhanced layout-transformations.css with direct CSS overrides - Advanced theme now gets: • Centered layout (max-width: 1400px) • Glass morphism effects on all .bg-white elements • Space gradient background • Glassmorphism buttons with hover effects • Logo gradient text • Enhanced header with backdrop-filter 🎯 Key Features for Advanced Theme: - .h-screen gets centered container + space background - All .bg-white/.bg-card/.border elements → glassmorphism - Hover effects with translateY and enhanced shadows - Button styling with backdrop-filter blur - No JavaScript interference with app functionality 🛡️ Safety: Pure CSS only - no DOM manipulation, no event blocking 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Fixed useCallback dependencies in PluginContext to prevent infinite re-renders - Fixed useEffect dependency arrays in ThemeContext to prevent loops - Fixed corrupted AnalyticsSettings.tsx syntax and functionality - Re-enabled AnalyticsButton and MissionControlTab in App.tsx - Updated SettingsDialog plugin registration to run only once - Removed debug console.logs that created false loop impression - Plugin system now stable with both Analytics and Themes active Site is now functional with working plugin manager and theme switching
modified: plugins/analytics/ui/AnalyticsSettings.tsx deleted: plugins/analytics/ui/components/dashboard/tabs/MissionControlTabSimple.tsx modified: plugins/themes/components/ThemeSelector.tsx deleted: plugins/themes/styles/advanced-animations.css deleted: plugins/themes/styles/advanced-complete.css deleted: plugins/themes/styles/component-integration.css modified: plugins/themes/styles/components.css deleted: plugins/themes/styles/layout-transformations.css new file: plugins/themes/styles/modern-effects.css modified: plugins/themes/styles/themes.css modified: plugins/themes/styles/variables.css modified: ui/src/components/SettingsDialog.tsx modified: ui/tsconfig.tsbuildinfo
modified: plugins/analytics/ui/components/dashboard/tabs/MissionControlTab.tsx new file: plugins/themes/components/PluginThemeWrapper.tsx modified: plugins/themes/components/ThemeSelector.tsx new file: plugins/themes/components/ThemeSelectorSimple.tsx modified: plugins/themes/contexts/ThemeContext.tsx modified: plugins/themes/index.ts modified: plugins/themes/ui/ThemeSettings.tsx modified: ui/src/components/SettingsDialog.tsx modified: ui/src/contexts/PluginContext.tsx modified: ui/src/main.tsx modified: ui/tsconfig.tsbuildinfo
modified: plugins/analytics/middleware/tracking.ts new file: plugins/analytics/plugin.manifest.json modified: plugins/analytics/ui/components/dashboard/tabs/MissionControlTab.tsx new file: plugins/core/PluginManager.tsx modified: plugins/themes/components/ThemeSelector.tsx new file: plugins/themes/plugin.manifest.json modified: ui/package-lock.json modified: ui/package.json modified: ui/src/components/SettingsDialog.tsx modified: ui/src/contexts/PluginContext.tsx modified: ui/tsconfig.tsbuildinfo
…cess improvements, and REWRITE_SYSTEM_PROMPT support - Added LogViewer component for interactive log viewing - Improved process checking with find-process package - Added REWRITE_SYSTEM_PROMPT configuration option - Enhanced error handling with global uncaught exception handlers - Added roadmap SVG visualization - Updated sponsors list - Maintained plugin system functionality (analytics + themes) - Preserved custom UI enhancements and error handling - Updated @musistudio/llms to v1.0.32
…-provider-detector
@claude review @musistudio UPDATED for v1.0.49 - This PR now includes the latest upstream features while introducing a revolutionary Plugin Architecture that makes future updates seamless and non-breaking. This PR implements a comprehensive plugin-based system with advanced analytics, 3-theme system, and full compatibility with the latest upstream features including LogViewer and improved process management. 🎯 NEW: Plugin Architecture Revolution /api/analytics/* - 8 analytics endpoints Classic Light Theme |
modified: plugins/analytics/index.ts modified: plugins/analytics/middleware/tracking.ts
modified: plugins/analytics/ui/AnalyticsButton.tsx new file: plugins/analytics/ui/components/MissionControlModal.tsx modified: plugins/analytics/ui/components/dashboard/tabs/MissionControlTab.tsx modified: plugins/themes/styles/components.css modified: plugins/themes/styles/variables.css modified: ui/src/App.tsx modified: ui/src/components/JsonEditor.tsx
@claude review @musistudio I have integrated the analytics tab similar to the logviewer to maintain consistency. My plugins are now structured individually, with small code placements in essential files. I consider the current version to be much better, and easier to manage. Today the transition to version 1.0.49 was very simple, which proves the ease of installing plugins. EVERYTHING is updated to the latest version. I hope you find the things I tried to develop useful. ![]() ![]() ![]() ![]() ![]() ![]() |
This is so cool!! |
📋 Overview
🔄 UPDATED for v1.0.49 - This PR now includes the latest upstream features while introducing a revolutionary Plugin Architecture that makes future updates seamless and non-breaking.
This PR implements a comprehensive plugin-based system with advanced analytics, 3-theme system, and full compatibility with the latest upstream features including LogViewer and improved process management.
🎯 NEW: Plugin Architecture Revolution
🔌 Modular Plugin System
📊 Analytics Plugin (Self-contained)
19 Functional API Endpoints:
/api/analytics/*
- 8 analytics endpoints/api/v1/mission-control/*
- 11 mission control endpoints🎨 Themes Plugin (Self-contained)
3 Complete Themes:
🆕 Latest Upstream Integration (v1.0.48-49)
✅ Preserved All New Features:
find-process
integration✅ Zero Breaking Changes:
🔧 Technical Excellence
Backend Architecture
Frontend Innovation
📈 Live Data Verification
System actively processing requests with:
🎯 Files Structure
New Plugin Files (99+ files):
Enhanced Core Files (Integration points):
src/index.ts
- Plugin loading systemsrc/server.ts
- Plugin route registrationui/src/App.tsx
- Plugin UI integrationui/src/contexts/PluginContext.tsx
- Plugin stateDocumentation:
PLUGINS_DOCUMENTATION.md
- Complete plugin docs (1184 lines)PLUGIN_INSTALLATION_GUIDE.md
- Installation guide (661 lines)ANALYTICS_PLUGIN_REFACTOR_REPORT.md
- Technical report (466 lines)🚀 Key Benefits
For Users:
For Maintainers:
📊 Statistics
🧪 Testing Results
✅ All Systems Operational:
🎯 Success Metrics
🔄 Migration Strategy
This PR introduces a Plugin Architecture that:
Ready for Review: This represents a major architectural advancement that future-proofs claude-code-router while adding professional-grade analytics and theming capabilities.
Enhanced by: Mircea Gabriel (@skorpionwap)
Based on: Claude Code Router v1.0.49 by @musistudio
This plugin architecture makes claude-code-router extensible and future-proof! 🚀