Commit Graph
860 Commits
Author SHA1 Message Date
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
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
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
github-actions[bot] b9e69965e2 chore(release): 7.1.0-dev.2 [skip ci] 2025-12-21 09:13:59 +00: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
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
semantic-release-bot 3ec8703be0 chore(release): 7.0.0 [skip ci]
## [7.0.0](https://github.com/kaitranntt/ccs/compare/v6.7.1...v7.0.0) (2025-12-21)

### ⚠ BREAKING CHANGES

* **install:** GLM/GLMT/Kimi profiles no longer auto-created

- remove glm.settings.json auto-creation
- remove glmt.settings.json auto-creation
- remove kimi.settings.json auto-creation
- config.json now starts with empty profiles
- users create via: ccs api create --preset glm
- or via UI: Profile Create Dialog → Provider Presets
- existing profiles preserved for backward compatibility

### Features

* **api:** unify profile management with config-aware services ([4c74e92](https://github.com/kaitranntt/ccs/commit/4c74e92cc46afed9c8232944a2a443709b130a2c))
* **cli:** add --preset option to ccs api create command ([418d121](https://github.com/kaitranntt/ccs/commit/418d121577098722a35b060a37388ea2d267dffd))
* **cli:** add interactive OpenRouter model picker for api create ([d193626](https://github.com/kaitranntt/ccs/commit/d193626e3bfb8962809e2a6daf9697d302a70ff7))
* **install:** remove auto-creation of GLM/GLMT/Kimi profiles ([f96116d](https://github.com/kaitranntt/ccs/commit/f96116d280d1addcaf5ea5ba5e605f8a3f058ad7))
* **openrouter:** prioritize Exacto models for better agentic performance ([ebc8ee2](https://github.com/kaitranntt/ccs/commit/ebc8ee2638a10500c85f0af862f9d99589429b89))
* **proxy:** improve remote proxy UX defaults ([116b6a1](https://github.com/kaitranntt/ccs/commit/116b6a15b0bf7db3a11fb428706dde126814004d))
* **ui:** add dynamic newest models detection for OpenRouter ([a1cbd4d](https://github.com/kaitranntt/ccs/commit/a1cbd4d92397bc15a9cb627bda5cd360603a2bf5))
* **ui:** add OpenRouter badge to API Profiles sidebar item ([a08aef9](https://github.com/kaitranntt/ccs/commit/a08aef9fb79c8cf8c1109414394da43d6e35db31))
* **ui:** add OpenRouter model catalog core infrastructure ([80beb1d](https://github.com/kaitranntt/ccs/commit/80beb1dadafff283c713d8a7ae556e06a7935882))
* **ui:** add OpenRouter model picker and tier mapping components ([3cd21bb](https://github.com/kaitranntt/ccs/commit/3cd21bb67b1e357992e662fe666bd35a4062de04))
* **ui:** add provider preset categories with helper function ([10cfe0f](https://github.com/kaitranntt/ccs/commit/10cfe0fefad9892d1e6314122027dc05bea1a6bf))
* **ui:** add provider presets and OpenRouter promo components ([9c90e1d](https://github.com/kaitranntt/ccs/commit/9c90e1dc2cdc8aa11bb82ae4b337f7fed2f4c373))
* **ui:** add streamlined OpenRouter profile editor ([7788137](https://github.com/kaitranntt/ccs/commit/7788137f1c407854d7d8aa5c10c18fd98dbafa2f))
* **ui:** add value input for new environment variables ([f947aeb](https://github.com/kaitranntt/ccs/commit/f947aeb21b0a3a73c8b401de263deb68c69769ce))
* **ui:** integrate OpenRouter model picker into profile editor ([677f9d1](https://github.com/kaitranntt/ccs/commit/677f9d1e72990e51ed88e00b228369c8be520bbe))
* **ui:** rewrite profile create dialog with provider presets ([adcc323](https://github.com/kaitranntt/ccs/commit/adcc3235f0fcd328f3729125e5c5988f9db0937d))

### Bug Fixes

* **ci:** use custom dev versioning to preserve stable version coupling ([dce4b36](https://github.com/kaitranntt/ccs/commit/dce4b36fc658cb1a692f44152002fe5e1e79f24f))
* **cliproxy:** correct remote proxy URL building for default port ([294d8d5](https://github.com/kaitranntt/ccs/commit/294d8d55e517ce064601ec7fd54827da61e0d0f2))
* **cliproxy:** improve remote proxy error messages ([55464c5](https://github.com/kaitranntt/ccs/commit/55464c5c5cb67b1cc4c2352130384dc6bc013f4c)), closes [#142](https://github.com/kaitranntt/ccs/issues/142)
* **cliproxy:** use /v1/models for remote proxy health check ([5e1d290](https://github.com/kaitranntt/ccs/commit/5e1d290865876a7e002b1e6c3c2911e1ac7e49b2)), closes [#142](https://github.com/kaitranntt/ccs/issues/142)
* **config:** add missing cliproxy_server section to YAML serialization ([b322203](https://github.com/kaitranntt/ccs/commit/b32220364eb3b023b6d62fd12a4cc4cd60da85e5))
* **openrouter:** add ANTHROPIC_API_KEY="" default for OpenRouter profiles ([70bc44e](https://github.com/kaitranntt/ccs/commit/70bc44eb11a28ec3e338d9ef45d33d9beaac6873))
* **openrouter:** correct ANTHROPIC_BASE_URL to https://openrouter.ai/api ([7d4961e](https://github.com/kaitranntt/ccs/commit/7d4961e7a955dd48075aae7e215b3f0aaf4367ef))
* **openrouter:** show all env vars except API key in Additional Variables ([f41d361](https://github.com/kaitranntt/ccs/commit/f41d361fe547c0201b4d49c542391b4e5d96b93e))
* **ui:** deduplicate API key and restore add variable input ([3f7add5](https://github.com/kaitranntt/ccs/commit/3f7add5c10be5485567e2462754c145e94c19d78))
* **ui:** model selection now updates all tiers correctly ([723ce28](https://github.com/kaitranntt/ccs/commit/723ce284314272f05b0413c3f9fdd4bcdb298618))
* **ui:** resolve Radix ScrollArea viewport overflow ([2b6600a](https://github.com/kaitranntt/ccs/commit/2b6600abd74d369dfd245b8f77c26786006e46cb))
* **ui:** show OpenRouterQuickStart by default on API page ([05380e2](https://github.com/kaitranntt/ccs/commit/05380e21b435d09d0105bee3868d4c73028e558d))
* **ui:** use current input values for test connection and persist across tabs ([12b534c](https://github.com/kaitranntt/ccs/commit/12b534cc495337f2c6e24884cde7d7296a34f380)), closes [#142](https://github.com/kaitranntt/ccs/issues/142) [#163](https://github.com/kaitranntt/ccs/issues/163) [#164](https://github.com/kaitranntt/ccs/issues/164) [#165](https://github.com/kaitranntt/ccs/issues/165)
* **update:** correct dev version comparison semantic ([df77745](https://github.com/kaitranntt/ccs/commit/df77745eca747e6877c754f0002a4ba9fd50eb85))

### Code Refactoring

* **config:** remove secrets.yaml architecture ([4f4ab43](https://github.com/kaitranntt/ccs/commit/4f4ab43eb39576b5bd3dfc16ced306d0653e72f0))
* **ui:** rename /api route to /providers ([9382278](https://github.com/kaitranntt/ccs/commit/93822787045188e3e006b8671ea5ae24f94459ce))
* **ui:** reorganize profile create dialog with preset categories ([96310dd](https://github.com/kaitranntt/ccs/commit/96310dd1acd5d6265cd2d68d970b79409d988c1f))
* **ui:** replace hardcoded orange colors with accent tokens ([b9f6823](https://github.com/kaitranntt/ccs/commit/b9f6823fc93c42f0f9af85750386149635428aa0))

### Tests

* **npm:** update tests for preset-based profile creation ([de45fa0](https://github.com/kaitranntt/ccs/commit/de45fa0da9d1345dff5871a71af7bbedb235076f))
2025-12-21 05:13:58 +00:00
Kai (Tam Nhu) TranandGitHub 1d5c54a2fb Merge pull request #169 from kaitranntt/dev
feat(openrouter): OpenRouter model catalog integration and UI improvements
2025-12-21 00:12:59 -05:00
github-actions[bot] 4e54da0688 chore(release): 6.7.1-dev.8 [skip ci] 2025-12-21 05:11:07 +00:00
kaitranntt a08aef9fb7 feat(ui): add OpenRouter badge to API Profiles sidebar item
Shows compact OpenRouter indicator badge with icon and tooltip
(349+ models). Badge colors adapt for proper contrast on hover
and active states in both light and dark themes.
2025-12-21 00:08:45 -05:00
github-actions[bot] e69e47be85 chore(release): 6.7.1-dev.7 [skip ci] 2025-12-21 04:59:50 +00:00
Kai (Tam Nhu) TranandGitHub 13dd5614a2 Merge pull request #168 from kaitranntt/kai/feat/openrouter-model-catalog
feat(openrouter): add model catalog integration with searchable picker and tier mapping
2025-12-20 23:58:50 -05:00
kaitranntt f41d361fe5 fix(openrouter): show all env vars except API key in Additional Variables
Only hide ANTHROPIC_AUTH_TOKEN (has dedicated input). Show all other
env vars (BASE_URL, MODEL, tier models, API_KEY, etc.) in the
"Additional Variables" section for full visibility.
2025-12-20 23:47:14 -05:00
kaitranntt 70bc44eb11 fix(openrouter): add ANTHROPIC_API_KEY="" default for OpenRouter profiles
Per OpenRouter requirements, explicitly blank out the Anthropic API key
to prevent conflicts when using OpenRouter's API. The key is visible in
the "Additional Variables" section of the profile editor.
2025-12-20 23:43:52 -05:00
kaitranntt ebc8ee2638 feat(openrouter): prioritize Exacto models for better agentic performance
- Add isExacto field to CategorizedModel for models with :exacto suffix
- Add sortModelsByPriority function (Free > Exacto > Regular)
- Apply priority sorting within each category in model picker
- Add visual "Exacto" badge (green outline) for exacto variants

Exacto models are OpenRouter's specialized variants optimized for
tool use and agentic behaviors, recommended for Claude Code.
2025-12-20 23:38:07 -05:00
kaitranntt 7d4961e7a9 fix(openrouter): correct ANTHROPIC_BASE_URL to https://openrouter.ai/api
Update OPENROUTER_BASE_URL in provider presets (CLI and UI) which is
used as ANTHROPIC_BASE_URL when creating OpenRouter profiles.
2025-12-20 23:31:11 -05:00
kaitranntt 723ce28431 fix(ui): model selection now updates all tiers correctly
- Add updateEnvBulk function for atomic multi-key updates
- Pass onEnvBulkChange prop to FriendlyUISection
- Fixes race condition where only last tier (haiku) was updated
2025-12-20 23:23:50 -05:00
kaitranntt f947aeb21b feat(ui): add value input for new environment variables
- Add newEnvValue state to profile editor
- Update add variable section to include key + value inputs
- Apply to both OpenRouter and standard profile editors
- Clear both key and value after adding variable
2025-12-20 23:22:04 -05:00
kaitranntt 3f7add5c10 fix(ui): deduplicate API key and restore add variable input
- Add ANTHROPIC_AUTH_TOKEN to openRouterManagedKeys set
- Change collapsible section from "All Environment Variables" to "Additional Variables"
- Only show non-managed env vars in the collapsible section
- Restore "Add Environment Variable" input at bottom of OpenRouter view
2025-12-20 23:17:18 -05:00
kaitranntt 2b6600abd7 fix(ui): resolve Radix ScrollArea viewport overflow
- override inline display:table style causing content expansion

- force min-width:0 on viewport child div
2025-12-20 23:11:52 -05:00