Joseph Mearman
01f96104e6
fix(ui): display correct project names in session stats
...
Replace session.projectPath.split('/').pop() with getProjectDisplayName()
to ensure the actual leaf folder name is shown instead of incorrect fragments.
Example fixes:
- /home/user/projects/my-app now shows "my-app" instead of "app"
- /home/user/workspaces/repo-name/worktrees/feature-branch now shows "feature-branch" instead of "branch"
Addresses potential issues with project name display in analytics dashboard.
Related to: #348 (quota display), #103 (context display)
2026-01-22 06:38:29 +00:00
kaitranntt
d9631be81a
fix(deps): add express-rate-limit to production dependencies
...
express-rate-limit was imported in auth-middleware.ts but only the
@types/express-rate-limit package was declared in devDependencies.
This caused "Cannot find module 'express-rate-limit'" error when
running `ccs config` after installing v7.20.0 globally.
Closes #333
2026-01-14 13:06:58 -05:00
kaitranntt
464b410e8b
feat(dashboard): add optional login authentication ( #319 )
...
Add session-based username/password auth for CCS dashboard:
- Backend: Express session middleware with bcrypt password verification
- Frontend: React AuthContext, login page, protected routes
- Config: dashboard_auth section in config.yaml + env var overrides
- Security: Rate limiting (5 attempts/15min), persistent session secret
- 16 unit tests for auth middleware
Auth disabled by default for backward compatibility.
2026-01-13 13:27:38 -05:00
Huynh Duc Dung
bd5c9a0033
feat(minimax): Add full MiniMax M2.1 support
...
- Add MiniMax settings template (config/base-minimax.settings.json)
- Add MiniMax pricing (3 models: M2.1, M2.1-lightning, M2)
- Add validateMiniMaxKey() pre-flight validator
- Integrate MiniMax validation in main CLI flow
- Fix model name casing: M2.1-lightning (lowercase l)
Implementation follows GLM pattern:
- Anthropic-compatible API (no proxy needed)
- Pre-flight validation with health check
- Fail-open on network errors
- Actionable error messages
2026-01-02 20:27:52 +08:00
kaitranntt
0f590c80d6
feat(ci): add semantic-release for dev branch with rich Discord notifications
...
- add .releaserc.cjs with branch-aware config (dev=prerelease, main=stable)
- add scripts/send-discord-release.cjs that parses CHANGELOG.md
- replace custom VERSION bumping with semantic-release
- add Discord webhook URL validation
- add release detection to prevent false notifications
2025-12-19 01:00:41 -05:00
kaitranntt
b915127b3a
fix: resolve ESM/CJS compatibility for Node.js 18
...
Downgrade ESM-only packages to CJS-compatible versions:
- boxen: ^8.0.1 → ^5.1.2
- chalk: ^5.6.2 → ^4.1.2
- chokidar: ^5.0.0 → ^3.6.0
- get-port: ^7.0.0 → ^5.1.1
- gradient-string: ^3.0.0 → ^2.0.2
- listr2: ^9.0.5 → ^3.14.0
- open: ^10.1.0 → ^8.4.2
- ora: ^9.0.0 → ^5.4.1
Update dynamic import handling for CJS module compatibility.
Add type declarations for gradient-string.
Fixes #110
2025-12-15 15:32:34 -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
49b4065186
feat(usage): add internal data aggregation and cost tracking
2025-12-09 23:41:47 -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
23a33820c0
feat(web-dashboard): add dev mode with hmr and optimize build
2025-12-07 16:44:34 -05:00
kaitranntt
56502ab6a8
feat(web-dashboard): add rest api and real-time sync
...
REST API & CRUD:
- Add REST API routes for profiles, cliproxy, accounts
- Integrate React Query with data fetching hooks
- Create API client wrapper with TypeScript types
- Add shadcn/ui components (dialog, input, label, table)
- Build profiles table with edit/delete actions
- Create profile form dialog with zod validation
- Mount QueryClientProvider in App
Real-time Sync & WebSocket:
- Implement file watcher with chokidar for config changes
- Create WebSocket server with broadcast capability
- Add client auto-reconnect with exponential backoff
- Integrate React Query cache invalidation on WS messages
- Add connection status indicator in header
- Implement heartbeat keepalive (30s interval)
- Add graceful cleanup on server shutdown
- Show toast notifications for external config changes
Dependencies:
- Add @tanstack/react-query, react-table, react-hook-form, zod
- Add chokidar for file watching
2025-12-07 12:00:56 -05:00
kaitranntt
6a6f2a2463
feat(web-dashboard): add express server and react ui scaffolding
2025-12-07 11:37:28 -05:00
kaitranntt
716193a682
feat(ui): enhance delegation with listr2 task lists and styled output
...
Phase 5 of CLI UI/UX Enhancement - Delegation + Listr2
Added Listr2 integration for enhanced delegation progress display:
- Intelligent renderer selection (TTY/CI/Claude Code context detection)
- Styled result boxes and tables using ui layer
- Graceful fallback chain: Listr2 → Spinners → Plain text
- All delegation formatters converted to async
Changes:
- src/utils/ui.ts: Added taskList wrapper, isClaudeCodeContext detection
- src/delegation/result-formatter.ts: Async formatting with styled boxes/tables
- src/delegation/delegation-handler.ts: Async format calls
- src/delegation/headless-executor.ts: UI layer progress messages
- tests: Updated all formatter tests to handle async
- docs: Enhanced code standards and codebase summary
All validation passing (157/157 tests)
Phase 5 complete - All 5 phases delivered
2025-12-01 20:53:04 -05:00
kaitranntt
6e49e0e7e1
feat(ui): add central ui abstraction layer for cli styling
...
- create src/utils/ui.ts with semantic colors, status indicators, boxes, tables, spinners
- add ui types (SemanticColor, BoxOptions, TableOptions, SpinnerOptions) to src/types/utils.ts
- add deprecation notice to src/utils/helpers.ts for legacy color functions
- add unit tests for ui module (11 test cases)
- install chalk@5.6.2, boxen@8.0.1, gradient-string@3.0.0
features:
- semantic color system (success, error, warning, info, primary, secondary)
- ascii-only status indicators: [OK], [X], [!], [i]
- tty-aware with NO_COLOR/FORCE_COLOR support
- styled boxes with boxen (round, double, bold borders)
- formatted tables with cli-table3
- animated spinners with ora (fallback to plain text in non-tty)
- gradient text for headers (cyan-to-blue)
- lazy esm module loading for chalk/boxen/gradient-string
2025-12-01 19:22:51 -05:00
kaitranntt
d3d96371de
feat(release): implement semantic versioning automation with conventional commits
...
- Add semantic-release for automated npm publishing
- Add commitlint + husky for commit message enforcement
- Add professional branching strategy (beta → main workflow)
- Create .releaserc.json with multi-branch config
- Create sync-version-plugin.cjs for VERSION file sync
- Update release.yml workflow (Node.js 22 required)
- Update CLAUDE.md and CONTRIBUTING.md with new workflow
- Deprecate manual bump-version.sh script
2025-11-30 18:56:02 -05:00
kaitranntt
0139333146
feat: set up quality gates for CCS TypeScript package
...
- Migrate package manager from npm to bun
- Add ESLint configuration with TypeScript support
- Add Prettier configuration and .prettierignore
- Format all TypeScript source files
- Update CLAUDE.md with bun instructions
- Verify 39 tests passing
2025-11-26 20:43:21 -05:00