Commit Graph
53 Commits
Author SHA1 Message Date
kaitranntt d64115f91a feat(analytics): add 24H hourly chart with caching and UI improvements
- Add GitHub link button next to connection status for quick issue reporting
- Add 24H button on analytics page with hourly granularity chart
- Add /api/usage/hourly endpoint with date range filtering
- Add hourly data aggregation and caching (disk + memory)
- Fix timezone display: convert UTC hours to local time in chart
- Fix CLIProxy Stats card loading state synchronization
- Bump disk cache version to 3 (includes hourly data)
2025-12-12 15:33:22 -05:00
kaitranntt 70e86757bf chore(cliproxy): improve config and token management 2025-12-12 03:00:53 -05:00
kaitranntt 92b7065e10 feat(cliproxy): add provider editor with presets and control panel
- Add split-view provider editor with model mapping UI and JSON editor
- Implement persistent custom presets (save/load per provider)
- Add provider logos with white backgrounds for light/dark theme
- Integrate CLIProxyAPI control panel embed via iframe
- Add service manager for CLIProxyAPI lifecycle control
- Support variant logo display using parent provider
- Add categorized model selector with search and groups
2025-12-12 01:48:58 -05:00
kaitranntt f8648be6d9 feat(ui): redesign cliproxy page with master-detail layout
- Replace tab-based layout with sidebar + detail panel pattern
- Add provider navigation in left sidebar with quick actions
- Implement provider detail panel with model preferences and accounts
- Add Config Editor and Logs quick access in sidebar
- Fix naming consistency: Clipproxy → Cliproxy (single p) across 8 files
- Fix TypeScript errors for models and stats data shapes
2025-12-11 15:44:51 -05:00
kaitranntt c3b2d50269 feat(ui): add cliproxy stats overview and enhance analytics components
- Add cliproxy-stats-overview component for stats display
- Update analytics page with usage insights integration
- Enhance cliproxy stats card and usage insights card
- Update cliproxy page with improved stats integration
- Refactor config-generator and stats-fetcher for better data handling
2025-12-11 03:31:09 -05:00
kaitranntt a94c3d6600 feat(cliproxy): add stats fetcher and OpenAI-compatible model manager
- Add stats-fetcher.ts for CLIProxy analytics integration
- Add openai-compat-manager.ts for model discovery and listing
- Add CLIProxy stats routes to web-server for real-time metrics
- Create cliproxy-stats-card component for analytics dashboard
- Add use-cliproxy-stats hook for data fetching
- Extend doctor.ts with CLIProxy health checks
- Update analytics page with CLIProxy usage metrics
2025-12-11 02:12:39 -05:00
kaitranntt 720ff9d7d6 feat(profile): refactor create UX with dialog-based interface
- Replace ProfileCreateForm with ProfileCreateDialog for better UX
- Add Select component for dropdown functionality
- Implement sensitive keys detection and masking
- Enhance code editor with improved validation
- Update dependencies and lock files
2025-12-10 23:38:43 -05:00
kaitranntt 46ee1df083 fix(ui): resolve layout and theme issues in profile editor
- Fix overflow issues in main layout by removing pb-12 and adding min-h-0
- Fix code editor theme switching by adding key prop to force re-render
- Fix localhost disclaimer positioning by removing fixed positioning and redundant padding
- Simplify analytics page layout structure and adjust spacing
2025-12-10 22:50:01 -05:00
kaitranntt 8c9d669cce feat(api-profile-ux): implement tabbed profile editor and fix disclaimer visibility 2025-12-10 22:14:01 -05:00
kaitranntt 83570050ef feat(api-profile-ux): Implement API & UI for profile management 2025-12-10 21:36:11 -05:00
kaitranntt 2b1a3b4879 feat(dashboard): add code editor for raw JSON settings editing
- Add GET/PUT /api/file endpoints for generic file access with security validation
- Add GET /api/files endpoint to list editable JSON files in ~/.ccs/
- Create CodeEditor component with JSON syntax highlighting (prism-react-renderer)
- Add "Raw JSON" tab to SettingsDialog for direct JSON editing
- Support conflict detection, atomic writes, and automatic backups
- Lazy load editor to minimize initial bundle impact (~31KB gzipped)

Closes #73
2025-12-10 21:09:38 -05:00
kaitranntt b621b8e47b feat(config): add unified YAML config with migration support
Implements unified config.yaml format consolidating:
- config.json (API profiles)
- profiles.json (account metadata)
- *.settings.json (env vars)

Features:
- Auto-migration from v1 JSON to v2 YAML with backup
- Secrets separation into secrets.yaml (chmod 600)
- Enhanced YAML output with section comments
- CLIProxy OAuth settings migration with env var support
- Feature flag for gradual rollout (CCS_UNIFIED_CONFIG=1)
- Rollback support via ccs migrate --rollback

New commands:
- ccs migrate - Run migration
- ccs migrate --dry-run - Preview changes
- ccs migrate --rollback <path> - Restore from backup
- ccs migrate --list-backups - List available backups

Closes #75
2025-12-10 17:42:40 -05:00
kaitranntt 824c3baecf feat(ui): replace anomaly alert badge with usage insights card 2025-12-10 02:59:00 -05:00
kaitranntt d81a5e6266 feat(usage-analytics): implement token cost breakdown and anomaly detection 2025-12-10 02:36:43 -05:00
kaitranntt 9506327343 refactor(analytics): inline sessions table component 2025-12-09 22:46:10 -05:00
kaitranntt 8f5c006f07 feat(ui): simplify CLIProxy page UX with dedicated Add Account dialog
- Remove redundant "Create Variant" button (Quick Setup is more comprehensive)
- Add AddAccountDialog component for per-provider account addition
- Keep "Quick Setup" for full variant creation wizard
- Keep "Add Account" per-row for adding accounts only
2025-12-09 16:51:24 -05:00
kaitranntt d868dc4c32 feat(cliproxy): add multi-account support phases 02-03
Phase 02 - CLI Account Selector in Variant Wizard:
- Add --account flag to cliproxy create command
- Implement inline OAuth flow when no accounts exist
- Add account selector for multiple accounts
- Auto-select single account

Phase 03 - Dashboard Quick Setup Wizard:
- Create quick-setup-wizard.tsx component
- Add step-by-step wizard: Provider → Auth → Account → Variant → Success
- Add Quick Setup button to CLIProxy page
2025-12-09 16:27:31 -05:00
kaitranntt f255a20a93 feat(analytics): refactor model color management and fix UI display issues
- Extract getModelColor utility to lib/utils.ts with improved FNV-1a hash algorithm
- Replace hardcoded color palette with vibrant tones palette
- Remove color constants from model-breakdown-chart.tsx
- Fix truncated model names in analytics display
- Update project roadmap with analytics enhancements
2025-12-09 14:44:56 -05:00
kaitranntt abb156d9f4 perf(analytics): instant dashboard loading with disk cache persistence
- Add React lazy loading for heavy pages (Analytics, Settings, etc.)
- Remove blocking prewarmUsageCache() from server startup
- Add disk cache module for persistent usage data storage
- Fix disk cache not being created on first Analytics visit
- Write cache immediately when daily data available (don't wait for all 3 types)

Dashboard now loads in <10ms from disk cache instead of waiting for
better-ccusage library on every visit.
2025-12-09 01:07:42 -05:00
kaitranntt 69e6a32224 perf(analytics): add cache pre-warming and SWR pattern for instant page load
- Add server-side cache pre-warming on startup (non-blocking)
- Implement stale-while-revalidate pattern (1hr stale window)
- Add /api/usage/status endpoint for cache status
- Remove full-page blocking skeleton, use per-component loading
- Add "Updated X ago" timestamp indicator in UI header
- Export AnalyticsSkeleton component for potential future use
2025-12-08 23:09:01 -05:00
kaitranntt a721af3cf3 feat(analytics): add usage analytics page with caching layer
- Add Analytics page with usage trends, model breakdown, sessions table
- Add server-side caching layer for better-ccusage data (TTL-based)
- Add request coalescing to prevent duplicate concurrent API calls
- Add /api/usage/refresh endpoint to manually clear cache
- Add date-range filter, summary cards, trend charts components
- Fix API parameter mismatch (since/until in YYYYMMDD format)
- Wire up Refresh button with loading state animation
2025-12-08 21:47:36 -05:00
kaitranntt efb42ba8f6 fix(security): improve API key detection patterns to prevent false positives
- Change from substring to pattern-based matching for sensitive keys
- Prevents ANTHROPIC_MAX_TOKENS from being incorrectly censored
- Synchronize backend and UI detection logic for consistency
2025-12-08 16:32:52 -05:00
kaitranntt 639eec7930 fix(ui): reduce focus ring size to prevent overlapping content 2025-12-08 16:32:52 -05:00
kaitranntt ed5c3fc83a fix(ui): update dropdown menu item SVG color on focus
- Add focus:[&_svg:not([class*='text-'])]:text-current to DropdownMenuItem
- Add focus:[&_svg:not([class*='text-'])]:text-current to DropdownMenuSubTrigger
- Ensures SVG icons inherit text color on focus for better visibility
2025-12-08 16:08:15 -05:00
kaitranntt 4ff6f08512 feat(ui): add modular health dashboard components
- Add health-gauge component for visual status representation
- Add health-group-section for organized health checks display
- Add health-stats-bar for summary statistics
- Refactor health-check-item with improved structure
- Update health.tsx to use new modular components
2025-12-08 15:18:02 -05:00
kaitranntt 8aae0db7da feat(ui): redesign health dashboard to match ccs doctor output
- Rewrite health-service.ts with 20+ comprehensive checks in 5 groups
  (System, Configuration, Profiles & Delegation, System Health, CLIProxy)
- Add async support for port checking functionality
- Create new health-check-item.tsx component with collapsible design
- Redesign health.tsx with professional grouped layout, hero section,
  summary stats, and issues panel with actionable fix commands
- Update use-health.ts with HealthGroup type support
- Add development server documentation to CLAUDE.md
2025-12-08 15:00:07 -05:00
kaitranntt cc1655624c feat(ui): Enhance web overview with new components and data 2025-12-08 14:11:44 -05:00
kaitranntt ffb6e066a7 refactor(ui): standardize page layout across all routes
Applied consistent centered layout (max-w-6xl mx-auto) from cliproxy page
to all pages except home page. Updated spacing to space-y-8 for uniformity.
2025-12-08 01:01:32 -05:00
kaitranntt 3a1e8c0afc fix(ui): remove padding from cliproxy card 2025-12-08 00:34:07 -05:00
kaitranntt 10d05502f3 fix(ui): improve cliproxy dashboard layout and dropdown styling 2025-12-08 00:28:06 -05:00
kaitranntt 4dc17fac4f feat(cliproxy): add multi-account support for CLIProxy providers
- Implement account-manager.ts for managing multiple OAuth accounts per provider
- Add account selector in UI dialog with dropdown for authenticated accounts
- Extend auth-handler.ts to support account registration and multi-account authentication
- Update web-server routes with account management endpoints (GET/POST/DELETE)
- Add account badges and management UI in cliproxy page
- Support account field in CLIProxy variant configuration
- Add Badge component from shadcn/ui for UI styling
- Enable default account selection and account removal functionality
2025-12-08 00:16:49 -05:00
kaitranntt 4adb94b90c feat(ui): enhance settings dialog with tabbed interface and scrollable areas
- Add Radix UI scroll-area and tabs components
- Redesign settings dialog with tabbed layout for better organization
- Add Card components for structured content display
- Update accounts and profiles tables UI
- Add scrollable areas for better content management
- Improve overall dialog loading and styling
2025-12-07 21:41:17 -05:00
kaitranntt 1f215d8ecb refactor(ui): replace settings page with deprecation notice
- Remove complex settings editor (217 lines)
- Add simple deprecation redirect to API Profiles page
- Improve UX by consolidating settings functionality
2025-12-07 20:57:30 -05:00
kaitranntt 9b4a5d80c5 fix(ui): improve table column widths and spacing 2025-12-07 20:47:51 -05:00
kaitranntt db68cf06af style(cliproxy): fix formatting in cli command and ui page 2025-12-07 20:33:28 -05:00
kaitranntt a283f942a9 feat(cliproxy): add authentication status display to web dashboard
- Add auth status endpoint to show built-in profiles authentication state
- Display auth status in UI with visual indicators for authenticated state
- Show last authentication date and token file count
- Update CLI command to better differentiate between built-in profiles and custom variants
- Improve UI layout to separate built-in profiles from custom variants
2025-12-07 20:32:00 -05:00
kaitranntt bd1f5c610c style(ui): remove padding top from shared page card content 2025-12-07 20:10:48 -05:00
kaitranntt e078f15297 feat(web): update shared routes and home page for dashboard 2025-12-07 20:00:01 -05:00
kaitranntt 6e2da6458a feat(web): enhance dashboard functionality and ui components 2025-12-07 19:56:26 -05:00
kaitranntt 03059dbdcc feat(ui): add accounts and cliproxy management dashboard 2025-12-07 18:35:58 -05:00
kaitranntt d11071ad90 fix(ui): prettier formatting for documentation link 2025-12-07 17:59:10 -05:00
kaitranntt c65d9c9c34 feat(ui): enhance visual contrast and update project link
- Increase border and input opacity from 0.25 to 0.35 for better visibility
- Update GitHub repository link from claude-cli to ccs
- Maintain consistent theme styling across components
2025-12-07 17:57:43 -05:00
kaitranntt ad5859c157 fix(ui): adjust layout of localhost disclaimer
- Center the content and close button
- Position the close button next to the text
2025-12-07 17:45:23 -05:00
kaitranntt c8890f33c2 feat(ui): redesign sidebar and fix disclaimer
- Redesign AppSidebar with collapsible groups ("Identity & Access", "System")
- Nest "Shared Data" under "Accounts" in sidebar
- Add collapsible UI component for sidebar nesting
- Fix LocalhostDisclaimer by moving it inside SidebarProvider
- Add roadmap entry for sidebar redesign
2025-12-07 17:21:24 -05:00
kaitranntt cf072c03b2 fix(ui): suppress react compiler warning in profiles-table 2025-12-07 16:54:49 -05:00
kaitranntt 23a33820c0 feat(web-dashboard): add dev mode with hmr and optimize build 2025-12-07 16:44:34 -05:00
kaitranntt 235bd6b36a feat(ui): reorganize theme colors and add dev script
Move Crail from primary to accent color and promote neutral grey to primary.
Update all related color variables for both light and dark themes to maintain
visual consistency. Add new dev script to streamline development workflow.
2025-12-07 15:54:38 -05:00
kaitranntt b5f22e415b feat(ui): update theme colors to match brand palette 2025-12-07 15:36:18 -05:00
kaitranntt 1b163050f7 feat(ui): add ccs branding assets and logo component 2025-12-07 15:05:23 -05:00
kaitranntt 707af2f01a feat(ui): add comprehensive quality gates and fix linting issues
- Added ESLint, Prettier, TypeScript strict mode to ui/ directory
- Fixed 40+ lint/format issues across ui codebase
- Created extraction files for react-refresh compliance:
  - button-variants.ts for Button component styles
  - use-sidebar.ts, use-websocket-context.ts custom hooks
  - ws-context.ts WebSocket context provider
- Fixed React hooks issues (setState ordering, dependency arrays)
- Added ui:validate script to enforce quality checks
- Updated husky pre-commit to validate UI files on change
2025-12-07 14:51:29 -05:00