Commit Graph
347 Commits
Author SHA1 Message Date
kaitranntt ddf7b704a5 Merge remote-tracking branch 'origin/dev' into kai/feat/error-log-viewer 2025-12-18 02:33:06 -05:00
kaitranntt 170dcdc44f fix(ui): limit Connection Timeline to 100 events to prevent lag
- add MAX_TIMELINE_EVENTS constant (100)

- slice events in useMemo to cap DOM elements

- prevents UI freeze with high request counts
2025-12-18 02:30:47 -05:00
kaitranntt f813ad06f6 feat(ui): add copilot-api install button and version display
- add CopilotInfo type and install mutation to useCopilot hook

- show version in status card when installed

- add Install button with loading state when not installed
2025-12-18 02:27:35 -05:00
kaitranntt 5b3d56548a feat(dashboard): add error log viewer for CLIProxy diagnostics
Add ErrorLogsMonitor component to Home page that displays CLIProxyAPI
error logs when requests fail. Users can now diagnose why success rates
drop by viewing detailed error log contents.

Backend:
- Add fetchCliproxyErrorLogs/fetchCliproxyErrorLogContent in stats-fetcher
- Add GET /api/cliproxy/error-logs and /api/cliproxy/error-logs/:name routes
- Include path traversal protection for filename validation

Frontend:
- Add CliproxyErrorLog type and errorLogs API methods
- Add useCliproxyErrorLogs/useCliproxyErrorLogContent hooks
- Create ErrorLogsMonitor component with expandable log viewer
- Integrate into Home page below AuthMonitor

Closes #132
2025-12-18 02:15:35 -05:00
kaitranntt 63bdc3ae39 fix(copilot): widen sidebar and balance split-view layout
- Increase sidebar width from w-64 to w-80 (320px)
- Increase model name truncation from 100px to 160px
- Balance config form split-view to 50%/50%
2025-12-18 01:38:02 -05:00
kaitranntt 589cd2c2b7 feat(dashboard): add CLIProxy status widget with start button 2025-12-18 01:26:30 -05:00
kaitranntt 7886259c36 feat(copilot): redesign config form to match CLIProxy pattern
- Split-view layout (40% left / 60% right) matching CLIProxy design
- Left panel: Model Config tab with FlexibleModelSelector components,
  Settings tab, and Info tab
- Right panel: Raw JSON editor for copilot.settings.json
- Add preset buttons for quick model tier mapping
- Bidirectional sync between UI and raw JSON
- Simplify copilot.tsx page layout with narrower sidebar
2025-12-18 00:22:14 -05:00
kaitranntt 882792a4fb feat(copilot): add raw settings support to useCopilot hook
Add CopilotRawSettings interface and API functions for reading/writing
copilot.settings.json with conflict detection via expectedMtime.
2025-12-18 00:21:33 -05:00
kaitranntt 2e77646d60 fix(ui): add error state handling to API Profiles page
Adds proper error handling when useProfiles() hook fails to fetch data.
Previously, API errors would cause a blank screen as the component had
no error state handling. Now shows a user-friendly error message with
a retry button.

Fixes #125
2025-12-18 00:20:25 -05:00
kaitranntt 6b04532f41 feat(ui): add copilot dashboard page
- use-copilot.ts: React hook for copilot state management

- copilot-status-card.tsx: status display with auth/daemon controls

- copilot-config-form.tsx: configuration form with model selector

- copilot.tsx: main page combining status and config

- add /copilot route and sidebar navigation
2025-12-17 21:41:06 -05:00
kaitranntt 9028b742f8 feat(ui): add ClaudeKit badge and Sponsor buttons to navbar
- replace "CCS Config" header text with two promotional buttons
- add ClaudeKit badge with logo linking to claudekit.cc
- add Sponsor button with heart icon linking to GitHub Sponsors
- both buttons feature hover effects and consistent styling
- fix dark theme hover text visibility
2025-12-17 18:57:12 -05:00
kaitranntt ab4c95bac9 fix(ui): unify account card padding and fix SVG glow filter
- add filterUnits="userSpaceOnUse" to flow-glow filter for consistent rendering
- unify connector-side padding to p*-4 across all zones (top/bottom/left/right)
- previous: top pb-5, left pr-6, right pl-6, bottom no extra
- now: all zones have consistent 16px padding on connector side
2025-12-17 18:33:58 -05:00
kaitranntt 740f31b1b2 style(ui): use earthy sophisticated colors for flow connection lines
Replace generic gray connection lines with curated earthy palette
(Charcoal Brown, Forest Moss, Vintage Berry, Harvest Gold, Blue Slate,
Burnt Caramel) for more visually interesting bezier curves in account
flow visualization.
2025-12-17 18:14:35 -05:00
kaitranntt 572703f439 fix(ui): optimize bundle size and fix calendar crash
- optimize vite manualChunks to reduce bundle sizes
- update calendar to react-day-picker v9 API
- fix calendar crash by removing broken drag-to-select
- improve calendar UI with compact styling and better navigation
- resolve fast-refresh lint error by separating button variants
2025-12-17 18:04:50 -05:00
kaitranntt 2bf7992a8a feat(ui): extend privacy mode to blur cost/token values in analytics 2025-12-17 16:40:05 -05:00
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