Commit Graph
682 Commits
Author SHA1 Message Date
kaitranntt ee85a1fd82 fix(ui): improve account-flow-viz layout and styling 2025-12-17 16:40:01 -05:00
kaitranntt 7b876d2364 fix(ui): improve account flow viz layout to fill available width
- Change flow viz section from items-center to items-stretch
- Use justify-center with gap-8 instead of justify-between for middle row
- Add w-full to top/bottom zone containers
- Increase gap from gap-3 to gap-4 for consistent spacing

Fixes issue where visualization left huge blank spaces
2025-12-17 15:26:25 -05:00
kaitranntt 365f820c55 feat(ui): add multi-zone layout and enhanced drag features to account flow viz
- Add 4-zone layout (top/left/right/bottom) based on account count
- Dynamic provider card sizing scales with account count
- Add localStorage persistence for card positions with reset button
- Implement click-to-toggle for account detail panel
- Add drag vs click detection to prevent accidental selections
- Fix connection curves to properly follow dragged cards using getBoundingClientRect
- Add fixed widths (w-44) to all zone cards for consistency
- Add top/bottom connector points to provider card
2025-12-17 15:09:16 -05:00
kaitranntt 6f3fb54cc3 feat(privacy): add privacy/demo mode for personal info blurring 2025-12-17 02:24:36 -05:00
kaitranntt cefb3a59d2 feat(ui): add iflow provider logo support 2025-12-17 01:12:54 -05:00
kaitranntt 99ff14d420 style(ui): improve button variants for better UX 2025-12-17 01:08:39 -05:00
Kai (Tam Nhu) TranandGitHub 287375e5f0 Merge pull request #116 from kaitranntt/kai/feat/websearch-mcp-fallback
feat(websearch): CLI provider fallback chain with OpenCode and Grok support
2025-12-17 00:17:29 -05:00
kaitranntt 14c53d575f feat(websearch): add model config + improve hook UX
- Add model field to Gemini/OpenCode WebSearch providers
- Config.yaml now explicitly stores model (gemini-2.5-flash, opencode/grok-code)
- UI: blur-to-save for model inputs (no save on every keystroke)
- UI: collapsible install hints inside provider cards
- UI: left accent border for enabled providers (better light theme contrast)
- Hook: use systemMessage for info-styled confirmation
- Hook: cleaner result format without defensive "NOT an error" language
2025-12-17 00:16:03 -05:00
kaitranntt 482cda0f8e feat(websearch): add OpenCode CLI as third WebSearch provider
- Add OpenCodeWebSearchConfig type with enabled, model, timeout options
- Implement getOpenCodeCliStatus() for CLI detection with caching
- Add hasOpenCodeCli() and clearOpenCodeCliCache() helper functions
- Update getWebSearchCliProviders() to include OpenCode provider info
- Update hasAnyWebSearchCli() to check all three providers
- Update getCliInstallHints() with OpenCode install command
- Update WebSearchStatus interface to include opencodeCli
- Update getWebSearchReadiness() to report OpenCode status
- Update routes.ts PUT /api/websearch to handle opencode config
- Update routes.ts GET /api/websearch/status to return opencodeCli
- Add OpenCode provider card in settings.tsx UI
- Add purple-themed installation hints for OpenCode
- Order providers: Gemini (1st) -> OpenCode (2nd) -> Grok (3rd/last)

OpenCode uses `opencode run` with `opencode/gpt-5-nano` model for
web search. FREE tier available via OpenCode Zen, no API key required.
2025-12-16 21:37:31 -05:00
kaitranntt b6c1ae48ba fix(websearch): use correct @vibe-kit/grok-cli package
- Update install command to npm install -g @vibe-kit/grok-cli
- Update docs URL to github.com/superagent-ai/grok-cli
- Fix env var from XAI_API_KEY to GROK_API_KEY
- Update description to reflect AI coding agent capabilities
2025-12-16 21:03:53 -05:00
kaitranntt c0938e1c82 feat(websearch): add Grok CLI support and improve install guidance
- Add Grok CLI detection (grok-4-cli by lalomorales22) alongside Gemini CLI
- Add WebSearch health check group to health-service.ts
- Update settings UI to show both Gemini and Grok CLI providers
- Add detailed install hints when no WebSearch CLI is installed
- Update API routes to return grokCli status
- Both CLI and dashboard users now see clear installation guidance

Providers:
- Gemini CLI: FREE tier (1000 req/day), no API key needed
- Grok CLI: Requires xAI API key (XAI_API_KEY), web + X search
2025-12-16 21:00:35 -05:00
kaitranntt 197848a71b feat(ui): enhance light theme contrast and animations 2025-12-16 07:06:06 -05:00
kaitranntt 994bd7765a feat(monitor): Enhance auth monitor and account flow visualization 2025-12-16 06:45:38 -05:00
kaitranntt 66c3edc7e9 style(ui): apply prettier formatting 2025-12-16 05:57:47 -05:00
kaitranntt 3216a0e847 feat(cliproxy-stats): Implement detailed stats fetching and integrate into UI 2025-12-16 05:57:27 -05:00
kaitranntt cadd2e8241 feat(websearch): add advanced configuration and custom MCP support 2025-12-16 05:56:45 -05:00
kaitranntt f7a1a40b42 feat(websearch): enhance Gemini CLI integration, package manager detection, and WebSearch status
- Improve Gemini CLI integration in websearch hook: use gemini-2.5-flash & --yolo.
- Update `dev-install.sh` for better package manager (npm/bun) auto-detection.
- Introduce `displayWebSearchStatus` for improved user experience.
- Refactor `mcp-manager.ts` to track CCS-managed MCP servers.
2025-12-16 04:18:40 -05:00
kaitranntt fd99ebca98 feat(websearch): add MCP fallback and Gemini CLI hook for third-party profiles
- Add Gemini CLI transformer hook (websearch-gemini-transformer.cjs)
- Implement MCP auto-configuration with web-search-prime, brave, tavily fallback
- Add installWebSearchHook() to activate hook on profile launch
- Update settings.tsx to clarify web-search-prime requires z.ai subscription
- Add WebSearch config types and loader support
- Create implementation plan for WebSearch UX enhancement (startup status, dashboard)

Third-party profiles (gemini, agy, codex, qwen, glm, kimi) now have WebSearch
capability via Gemini CLI primary + MCP fallback chain.
2025-12-16 02:49:07 -05:00
kaitranntt 071ec041ed feat(websearch): add multi-tier MCP fallback for third-party profiles
Implements CCS WebSearch Native Infrastructure (Phases 1-3):

Phase 1 - Multi-tier MCP Fallback:
- Add mcp-manager.ts with ensureMcpWebSearch() for auto-configuration
- Support web-search-prime (primary), Brave Search, and Tavily MCPs
- Case-insensitive detection of existing web search MCPs
- Block-websearch hook for optional native WebSearch blocking

Phase 2 - User Configuration:
- Add WebSearchConfig interface to unified-config-types.ts
- Add getWebSearchConfig() to unified-config-loader.ts
- Support configurable webSearchPrimeUrl for security
- Add GET/PUT /api/websearch endpoints in routes.ts
- Add WebSearch settings UI in settings.tsx dashboard

Phase 3 - Documentation & Testing:
- Add WebSearch section to README.md
- Create comprehensive docs/websearch.md guide
- Add 23 unit tests for MCP manager logic

Enables web search for gemini, codex, agy, qwen, glm, kimi profiles
that cannot access Anthropic's native WebSearch API.
2025-12-16 00:42:13 -05:00
kaitranntt 6e4ee805da feat(ui): add documentation button to header 2025-12-15 16:14:59 -05:00
kaitranntt 27de6af8aa feat(ui): add connection timeline and improve account flow layout
- Add ConnectionTimeline component showing recent connection events
- Restructure layout to 2-column design: flow viz (flex) | timeline (fixed)
- Flow chart now expands to fill available space with justify-between
- Timeline has compact fixed width (w-56) on the right
- Detail panel now uses flow-based positioning instead of absolute
- Generate mock connection events based on account success/failure data
2025-12-15 01:23:26 -05:00
kaitranntt 349d81a1b0 chore(ui): update ui build config and typings 2025-12-14 04:26:31 -05:00
kaitranntt b97c3bfda4 feat(ui): implement auth monitor components & pages 2025-12-14 04:26:02 -05:00
kaitranntt 257af14293 chore(deps): update dependencies 2025-12-14 04:25:41 -05:00
kaitranntt 0bd54eb26b refactor(ui/home-page): simplify and refactor home page layout
Remove deprecated components and logic from the home page,
including the progress bar, live clock, and old quick launch sections.
Introduce new components (HeroSection, QuickCommands, StatCard) to streamline the layout.
Delete unused  component.
2025-12-13 02:42:48 -05:00
kaitranntt cf567bb924 feat(ui): redesign home page as Interactive Status Board
- Full-width layout (removed max-w constraints)
- Restored CcsLogo in hero section with live clock
- Added real-time provider status cards with animated indicators
- Health progress bar with color-coded status
- Icon-based quick launch grid (G/C/A/K/L/D shortcuts)
- System navigation panel with all major routes
- Shared resources summary with counts
- Added Progress UI component for status bars
- Subtle grid background for control center aesthetic

Design Proposal 4: Interactive Status Board implementation
2025-12-13 02:26:57 -05:00
kaitranntt dbc13718ef feat(ui): premium home page with gradient glass design
- Gradient mesh background with brand colors
- Glass cards with backdrop-blur effects
- Three Pillars section matching README branding
- Command palette search bar with ⌘K hint
- Quick launch icons (G/C/A + accounts + doctor)
- Click-to-copy commands functionality
- Animated health status badge with pulse
- Micro-animations on hover (lift, scale, opacity)
- Responsive bento-style layout
2025-12-13 02:15:57 -05:00
kaitranntt a2d049c604 feat(ui): implement operational hub core components
- Add ProfileCard component for user profile display
- Add ProfileDeck for managing multiple profiles
- Add CommandBuilder for CLI command construction
- Add ValueMetrics for dashboard statistics
- Add HubFooter for navigation and actions
- Update documentation with Phase 1 summary
2025-12-12 19:09:14 -05:00
kaitranntt 28202bac0d refactor(ui): architecture and layout 2025-12-12 17:43:06 -05:00
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