Commit Graph
874 Commits
Author SHA1 Message Date
github-actions[bot] 326e7592f2 chore(release): 7.1.1-dev.3 [skip ci] 2025-12-22 00:40:33 +00:00
Kai (Tam Nhu) TranandGitHub 54eb696c44 Merge pull request #167 from kaitranntt/kai/fix/cliproxy-server-debug
feat(cliproxy): add remote CLIProxy routing with dev merge
2025-12-21 19:39:25 -05:00
kaitranntt 28c62625b3 fix(cliproxy): merge dev with proper remote mode integration
Resolve conflicts in cliproxy-auth-routes.ts by combining:
- Dev's improved error handling with try-catch patterns
- Branch's remote mode routing logic

All 638 tests pass.
2025-12-21 19:21:29 -05:00
github-actions[bot] 01c761e664 chore(release): 7.1.1-dev.2 [skip ci] 2025-12-21 23:58:55 +00:00
kaitranntt 36386209be ci: improve issue tagging and label management in release workflows 2025-12-21 18:57:46 -05:00
github-actions[bot] b8c9966e9d chore(release): 7.1.1-dev.1 [skip ci] 2025-12-21 23:26:18 +00:00
Kai (Tam Nhu) TranandGitHub 8b2fceb743 Merge pull request #174 from kaitranntt/kai/fix/add-cliproxy-account
fix(api): resolve CLIProxy account management errors
2025-12-21 18:25:20 -05:00
kaitranntt 3ed961fce9 fix(api): complete error handling and add missing endpoints
- Add try-catch to all route handlers in settings, variant, config routes
- Implement 5 missing endpoints in cliproxy-stats-routes:
  - GET/PUT /config.yaml for YAML config management
  - GET /auth-files to list auth directory files
  - GET /auth-files/download for file download
  - PUT /models/:provider to update model settings
- All handlers now return proper error messages on failure
2025-12-21 18:18:46 -05:00
kaitranntt 85b0f17110 fix(api): add try-catch error handling to route handlers
- Add try-catch to cliproxy-auth-routes GET /
- Add try-catch to health-routes GET / and POST /fix/:checkId
- Add try-catch to config-routes GET /format and POST /migrate
- Improve error messages with specific context
- All handlers now return 500 with error message on failure
2025-12-21 18:03:37 -05:00
kaitranntt 557926ffe3 fix(api): resolve route path mismatches
- Add /usage alias for /cliproxy/stats (frontend compatibility)
- Create account-routes.ts to fix /accounts/accounts double path
- Update index.ts to mount accountRoutes at /accounts
- Remove account code from profile-routes.ts
- Clean up unused imports in profile-routes.ts
2025-12-21 18:03:15 -05:00
kaitranntt e84df00740 fix(ui): correct cliproxy account API paths
- Change /cliproxy/accounts/* to /cliproxy/auth/accounts/*
- Fix 404 errors when managing CLIProxy accounts from dashboard
- Root cause: frontend called wrong endpoints for account management
2025-12-21 18:02:38 -05:00
kaitranntt 3bf9ebe32a feat(ui): add remote mode indicator to provider editor header
Shows "Remote" badge with Globe icon and "Traffic auto-routed to
remote server" message when remote CLIProxy mode is active.
2025-12-21 04:34:29 -05:00
semantic-release-bot a8bda073fb chore(release): 7.1.1 [skip ci]
## [7.1.1](https://github.com/kaitranntt/ccs/compare/v7.1.0...v7.1.1) (2025-12-21)

### Bug Fixes

* **hooks:** memoize return objects to prevent infinite render loops ([f15b989](https://github.com/kaitranntt/ccs/commit/f15b98950865c01ec6d8d846e3a197bb04e6cf6e))
* **settings:** memoize useSettingsActions to prevent infinite render loop ([4f75e10](https://github.com/kaitranntt/ccs/commit/4f75e105a9ab0c498fb1748829396d695836be65))

### Documentation

* update documentation for modularization phases 6-9 ([e45b46d](https://github.com/kaitranntt/ccs/commit/e45b46d20708e29e770307dbfcce33d84465f137))

### Code Refactoring

* **ui:** modularize analytics page into directory structure ([03d9bf7](https://github.com/kaitranntt/ccs/commit/03d9bf76c474f93f12fcc5dbdaa55c1f215b1e39))
* **ui:** modularize auth-monitor into directory structure ([8ead6fa](https://github.com/kaitranntt/ccs/commit/8ead6fa0bf05fc8d37563a618c473d7eae808920))
* **ui:** modularize settings page into directory structure ([104a404](https://github.com/kaitranntt/ccs/commit/104a40414437a4f32492e4bcc33fdfbbec386e2f))

### Tests

* **ui:** add vitest testing infrastructure with 99 unit tests ([3fca933](https://github.com/kaitranntt/ccs/commit/3fca9338f9a77ac202dde6095bf70b5094199888))
2025-12-21 09:30:01 +00:00
kaitranntt 4ee3100622 fix(cliproxy): respect user model settings in remote proxy mode
getRemoteEnvVars was ignoring user settings and always loading
models from base config. Now follows same priority as local mode:
1. Custom settings path (variant configs)
2. User settings file (~/.ccs/{provider}.settings.json)
3. Base config defaults

This fixes the issue where selecting Opus 4.5 in UI resulted in
Gemini 3 preview being loaded when using remote proxy mode.
2025-12-21 04:29:49 -05:00
Kai (Tam Nhu) TranandGitHub 8482aba6b1 Merge pull request #173 from kaitranntt/dev
feat(ui): modularize settings, analytics, auth-monitor pages with test infrastructure
2025-12-21 04:28:52 -05:00
github-actions[bot] 8340c3b0f2 chore(release): 7.1.0-dev.3 [skip ci] 2025-12-21 09:18:58 +00:00
kaitranntt f15b989508 fix(hooks): memoize return objects to prevent infinite render loops
Apply useMemo to hook returns that create new object references on each
render. This prevents downstream useEffect/useCallback dependencies from
detecting false changes and triggering re-execution.

Fixed hooks:
- PrivacyProvider: memoize context value and toggle callback
- useCopilot: wrap large return object with all dependencies
- useWebSocket: memoize status/connect/disconnect object
- useProjectSelection: memoize state and handlers object
- useCliproxyAuthFlow: memoize spread state with auth functions
- useAnalyticsPage: memoize apiOptions to stabilize query params
2025-12-21 04:17:32 -05:00
kaitranntt d86dfab2e7 feat(ui): show remote server info in ProxyStatusWidget
- Add remote mode detection via cliproxy-server-config query
- Display blue-themed "Remote Proxy" widget when remote enabled
- Show remote host and "Traffic auto-routed" message
- Hide local start/stop/restart controls in remote mode
2025-12-21 04:14:55 -05:00
github-actions[bot] b9e69965e2 chore(release): 7.1.0-dev.2 [skip ci] 2025-12-21 09:13:59 +00:00
kaitranntt a2d01bcc8a fix(cliproxy): load remote config from config.yaml for proxy resolution
- Import loadOrCreateUnifiedConfig to access cliproxy_server settings
- Pass remote/local config to resolveProxyConfig() function
- Enables CLI to detect remote mode from user's config.yaml
2025-12-21 04:13:57 -05:00
kaitranntt d0599e8d2c feat(cliproxy): add localhost URL rewriting for remote proxy mode
- Add rewriteLocalhostUrls() to detect and rewrite localhost URLs
- Support 127.0.0.1, localhost, 0.0.0.0 patterns
- Update getEffectiveEnvVars() to accept remoteRewriteConfig param
- Auto-rewrite saved settings URLs to remote server at runtime
2025-12-21 04:13:36 -05:00
kaitranntt 4f75e105a9 fix(settings): memoize useSettingsActions to prevent infinite render loop
- wrap return object in useMemo with all action callbacks as deps

- prevents new object reference on every render

- fixes Maximum update depth exceeded error on settings page
2025-12-21 04:09:13 -05:00
github-actions[bot] b8b9101466 chore(release): 7.1.0-dev.1 [skip ci] 2025-12-21 08:46:23 +00:00
kaitranntt e45b46d207 docs: update documentation for modularization phases 6-9
- mark settings, analytics, auth-monitor splits as complete
- add test infrastructure (99 tests, 90% threshold) to roadmap
- update codebase-summary.md with new modular structure
- add github issues backlog (13 issues categorized by priority)
- add future roadmap: multiple cliproxyapi, git worktree support
- update project-overview-pdr.md with v7.0 release items
- update system-architecture.md with new ui module structure
2025-12-21 03:45:02 -05:00
kaitranntt c3f72e6693 chore: add bunfig.toml and update gitignore for test config
- add bunfig.toml to scope bun test to ./tests/ only
- add ui test output directory to gitignore
- separates main (bun test) and UI (vitest) test runners
2025-12-21 03:29:12 -05:00
kaitranntt 3fca9338f9 test(ui): add vitest testing infrastructure with 99 unit tests
- add vitest, jsdom, testing-library, msw dependencies
- create test setup: vitest-setup.ts, test-utils.tsx, msw-handlers.ts
- add 99 unit tests covering settings, analytics, auth-monitor utils
- configure 90% coverage thresholds on pure-logic files
- add test scripts: test, test:run, test:coverage, test:ui
2025-12-21 03:28:34 -05:00
kaitranntt 8ead6fa0bf refactor(ui): modularize auth-monitor into directory structure
- split auth-monitor.tsx (465 lines) into modular components
- extract provider-card, summary-card, live-pulse, inline-stats-badge
- separate hooks, types, and utils for better maintainability
- export types from monitoring barrel
2025-12-21 03:27:53 -05:00
kaitranntt 03d9bf76c4 refactor(ui): modularize analytics page into directory structure
- split analytics.tsx (420 lines) into modular components
- extract analytics-header, charts-grid, cost-by-model-card
- add analytics-skeleton for loading states
- separate hooks, types, and utils
2025-12-21 03:27:15 -05:00
kaitranntt 104a404144 refactor(ui): modularize settings page into directory structure
- split settings.tsx (1,781 lines) into modular components
- extract hooks into separate files (context-hooks, use-*-config)
- create sections: websearch, proxy, globalenv with subcomponents
- add tab-navigation and section-skeleton components
- add settings-context.ts for state management
2025-12-21 03:26:40 -05:00
kaitranntt 883d9fa585 fix(ui): hide local paths in remote CLIProxy mode 2025-12-21 02:56:24 -05:00
kaitranntt 068d5772f2 fix(cliproxy): add gemini-cli provider mapping for remote auth 2025-12-21 02:37:36 -05:00
semantic-release-bot e8cb273ecb chore(release): 7.1.0 [skip ci]
## [7.1.0](https://github.com/kaitranntt/ccs/compare/v7.0.0...v7.1.0) (2025-12-21)

### Features

* **ui:** add visual feedback for WebSearch model auto-save ([eaf566b](https://github.com/kaitranntt/ccs/commit/eaf566beac65284d0809ca8a29f6ce2d03b79af8)), closes [#164](https://github.com/kaitranntt/ccs/issues/164)

### Bug Fixes

* **ci:** use commit-based changelog for dev release Discord notifications ([1129ec6](https://github.com/kaitranntt/ccs/commit/1129ec6ef570e7b922d2831c53bad83a68311b88))
* **ui:** add unsaved changes confirmation when switching profiles ([b790005](https://github.com/kaitranntt/ccs/commit/b790005c85e9f25fd14a14ac01b79e7562f1a1ea)), closes [#163](https://github.com/kaitranntt/ccs/issues/163)
* **ui:** fix profile switching and improve UX ([86d992f](https://github.com/kaitranntt/ccs/commit/86d992fce623a8378d5f53b1aff7b53d2f80e3c4))

### Documentation

* **readme:** add OpenRouter to built-in providers ([676929f](https://github.com/kaitranntt/ccs/commit/676929fc87c4cc450e3dc6e3f05ff60dfcead255))
* **standards:** add input state persistence patterns ([53a7ba8](https://github.com/kaitranntt/ccs/commit/53a7ba8d3ffe81f87306e84357fce4f6ec9d7135)), closes [#165](https://github.com/kaitranntt/ccs/issues/165)
2025-12-21 07:11:07 +00:00
Kai (Tam Nhu) TranandGitHub fe46f4dfd8 Merge pull request #172 from kaitranntt/dev
feat(ui): improve input state persistence and add save feedback
2025-12-21 02:10:02 -05:00
github-actions[bot] 87b9f81aab chore(release): 7.0.0-dev.5 [skip ci] 2025-12-21 07:00:15 +00:00
kaitranntt 53a7ba8d3f docs(standards): add input state persistence patterns
- Pattern 1: Key-based remounting

- Pattern 2: Unsaved changes confirmation

- Pattern 3: Auto-save with visual feedback

Closes #165
2025-12-21 01:59:10 -05:00
github-actions[bot] 8d4afc59ad chore(release): 7.0.0-dev.4 [skip ci] 2025-12-21 06:52:44 +00:00
Kai (Tam Nhu) TranandGitHub 0cd8d06b32 Merge pull request #171 from kaitranntt/kai/feat/websearch-model-inputs
feat(ui): add visual feedback for WebSearch model auto-save
2025-12-21 01:51:43 -05:00
kaitranntt eaf566beac feat(ui): add visual feedback for WebSearch model auto-save
- Add 'Saved' indicator with checkmark for Gemini/OpenCode model inputs

- Show indicator for 2 seconds after successful save on blur

- Uses fade-in animation for smooth UX

Closes #164
2025-12-21 01:47:18 -05:00
github-actions[bot] 69d4316821 chore(release): 7.0.0-dev.3 [skip ci] 2025-12-21 06:36:31 +00:00
Kai (Tam Nhu) TranandGitHub c3595432cb Merge pull request #170 from kaitranntt/kai/feat/standardize-input-state-persistence
fix(ui): add unsaved changes confirmation when switching profiles
2025-12-21 01:35:28 -05:00
kaitranntt 86d992fce6 fix(ui): fix profile switching and improve UX
- Add key prop to ProfileEditor to force remount on profile change

- Reset editorHasChanges on discard confirmation

- Add text-white to destructive dialog button

- Change OpenRouter default model to claude-opus-4.5
2025-12-21 01:20:57 -05:00
github-actions[bot] 6d49c0068b chore(release): 7.0.0-dev.2 [skip ci] 2025-12-21 06:16:02 +00:00
kaitranntt 1129ec6ef5 fix(ci): use commit-based changelog for dev release Discord notifications
- dev-release.sh: save release notes to .dev-release-info.json
- send-discord-release.cjs: read from generated file for dev releases
- add .dev-release-info.json to .gitignore
2025-12-21 01:14:49 -05:00
kaitranntt b790005c85 fix(ui): add unsaved changes confirmation when switching profiles
- Add onHasChangesUpdate callback to ProfileEditor

- Track editor dirty state in ApiPage parent

- Show confirmation dialog before discarding unsaved changes

- Handle edge case for 'New' profile button

Closes #163
2025-12-21 01:05:23 -05:00
github-actions[bot] bf65de55cf chore(release): 7.0.0-dev.1 [skip ci] 2025-12-21 06:04:07 +00:00
kaitranntt 676929fc87 docs(readme): add OpenRouter to built-in providers
- add OpenRouter row to providers table

- add OpenRouter integration section with v7.0.0 features

- add screenshot for OpenRouter API profiles
2025-12-21 01:01:16 -05:00
kaitranntt cdb465342e fix(cliproxy): address code review findings for remote routing
- Add runtime API response validation in remote-auth-fetcher
- Add AbortController cleanup to prevent state updates after unmount
- Validate postMessage origin matches iframe src before sending creds
- Mask auth token display (show ***last4) for security
- Reset error/connected state on refresh
- Fix port default to use protocol-based (443 for https, 80 for http)
- Normalize path in buildProxyUrl to ensure leading slash
- Add fallback for undefined email (default to 'Unknown')
- Extract timeout constant (REMOTE_FETCH_TIMEOUT_MS)
- Remove unused RemoteAuthFilesResponse interface
2025-12-21 00:42:54 -05:00
kaitranntt bfa55e041c feat(ui): dynamic control panel embed for remote CLIProxy
- Use React Query to fetch cliproxy_server config
- Build URLs dynamically based on remote/local mode
- Add Globe icon and Remote badge indicator
- Show context-aware error messages for remote failures
2025-12-21 00:42:54 -05:00
kaitranntt 17bb6f9836 feat(cliproxy): add remote routing for stats and auth endpoints
- Refactor stats-fetcher.ts: 5 functions now use getProxyTarget()
- Add remote-auth-fetcher.ts: fetch auth status from remote /v0/management/auth-files
- Update cliproxy-auth-routes.ts: branch on isRemote for GET routes
- Return 501 for account management in remote mode (unsupported)
2025-12-21 00:42:54 -05:00
kaitranntt 9e2fd096e4 feat(cliproxy): add proxy target resolver for remote/local routing
- add ProxyTarget interface with host, port, protocol, authToken, isRemote
- implement getProxyTarget() to resolve target from unified config
- add buildProxyUrl() and buildProxyHeaders() utilities
- handle optional auth token (empty = no Authorization header)
2025-12-21 00:42:54 -05:00