Commit Graph
3547 Commits
Author SHA1 Message Date
kaitranntt c44a5c221f feat(cli): implement --uninstall handler
- add handleUninstallCommand() with proper cleanup flow

- remove WebSearch hook (file + settings.json)

- remove symlinks from ~/.claude/

- display summary with removal count

- preserve ~/.ccs/ directory
2026-01-25 20:05:31 -05:00
kaitranntt fc4d987d20 feat(websearch): call removeHookConfig on uninstall
- uninstallWebSearchHook() now calls removeHookConfig()

- ensures settings.json cleanup when hook file is removed
2026-01-25 20:04:04 -05:00
kaitranntt 9159aa52cb feat(websearch): add removeHookConfig function
- add removeHookConfig() to remove CCS hook from settings.json

- only removes hooks matching CCS pattern (.ccs/hooks/websearch-transformer)

- preserves user-defined WebSearch hooks

- cleans up empty hooks object after removal

- export from barrel file

Closes #317
2026-01-25 20:03:52 -05:00
semantic-release-bot 588b757d21 chore(release): 7.27.0 [skip ci]
## [7.27.0](https://github.com/kaitranntt/ccs/compare/v7.26.3...v7.27.0) (2026-01-25)

### Features

* **ui:** add bulk account controls to provider editor ([1427d36](https://github.com/kaitranntt/ccs/commit/1427d36f869f8b0eb64d2c5d6893810515d2d4d4))
* **ui:** add expandable provider cards with account controls ([87226e0](https://github.com/kaitranntt/ccs/commit/87226e05c40be83299187b35ba1ca4ca2113fbe3))
* **ui:** add tiered visual grouping to quota tooltip ([ebfc554](https://github.com/kaitranntt/ccs/commit/ebfc554f5f8733b811c1ba8610a1bf11d0154510))
* **ui:** add visible pause toggle button to account item cards ([56dfb24](https://github.com/kaitranntt/ccs/commit/56dfb2429bc93772e260aa6ecaed50ebf714be06))
* **ui:** persist provider selection in cliproxy and auth-monitor ([7fc9ff0](https://github.com/kaitranntt/ccs/commit/7fc9ff0d77ddf89c13e8ec168b700bee38cabc12))

### Bug Fixes

* **api:** add race condition prevention and input validation for account control ([d1b579a](https://github.com/kaitranntt/ccs/commit/d1b579ad1b8c58da352f1a2c803256a427e3f669))
* **hooks:** add stats invalidation to account control mutations ([7086617](https://github.com/kaitranntt/ccs/commit/708661744fa8463ae919cb597bd9c43cca21c336))
* **quota:** fetch quota for paused accounts + simplify exhausted display ([27e8813](https://github.com/kaitranntt/ccs/commit/27e8813cae5379dbd8f9e700155812e59fe99389))
* **quota:** return exhausted models with resetTime from API ([e3920e0](https://github.com/kaitranntt/ccs/commit/e3920e077610b3d31b7e533a629c6b09e8b6d427))
* **ui:** add pause toggle to flow viz account cards, remove dropdown redundancy ([56dfada](https://github.com/kaitranntt/ccs/commit/56dfada31c36425a11d4eff397c925980a43b94c))
* **ui:** display exhausted Claude/GPT models in quota tooltip ([ce16517](https://github.com/kaitranntt/ccs/commit/ce1651714473b0d7484efbbb45ecb503d7490a3b))
* **ui:** improve bulk actions UX in provider editor ([6021c10](https://github.com/kaitranntt/ccs/commit/6021c10ddce84536f01dd8e9bb8a59f279dfc3cc))
* **ui:** improve model quota tooltip tier sorting ([de71381](https://github.com/kaitranntt/ccs/commit/de7138166ca2dca765c05ab59e9d9b1b154277bb))
* **ui:** improve pause toggle position in flow-viz account cards ([eb05342](https://github.com/kaitranntt/ccs/commit/eb053425c074ab150f67181ba7cf62668e0e7b49))
* **ui:** improve tier header contrast in quota tooltip ([41d17e7](https://github.com/kaitranntt/ccs/commit/41d17e7cae7949dbb169963b3a0e71516afa91b3))
* **ui:** remove dead 'Account is paused' error handling from flow-viz ([a84cc03](https://github.com/kaitranntt/ccs/commit/a84cc036df8179442498531fa0b4383f0b96d904))
* **ui:** show 0% quota when Claude/GPT models exhausted ([1f323f0](https://github.com/kaitranntt/ccs/commit/1f323f082c92bd8e740fa519b196f2ed957a0b68))
* **ui:** show Claude reset time for quota display (not earliest) ([9516e71](https://github.com/kaitranntt/ccs/commit/9516e71f17c112eb71d7e0283e5c9d8c654fa2f9))
* **ui:** simplify quota tooltip - delimiter lines only, full model names ([b2b8a85](https://github.com/kaitranntt/ccs/commit/b2b8a85af6c860c2e76d1f0198c2d8bc25f2ff2e))

### Code Refactoring

* **ui:** update cliproxy page for account control flow ([118ce46](https://github.com/kaitranntt/ccs/commit/118ce46e7287aa929f489e218ef30609fb1348c8))
2026-01-25 22:42:10 +00:00
Kai (Tam Nhu) TranandGitHub 2fb85b9a3a Merge pull request #370 from kaitranntt/dev
feat(ui): account control UX improvements and quota display enhancements
2026-01-25 17:41:05 -05:00
github-actions[bot] c501e32310 chore(release): 7.26.3-dev.1 [skip ci] 2026-01-25 22:38:49 +00:00
Kai (Tam Nhu) TranandGitHub 251ae94620 Merge pull request #369 from kaitranntt/kai/fix/account-control-ux-fixes
fix(ui): account control UX improvements
2026-01-25 17:37:51 -05:00
kaitranntt 7fc9ff0d77 feat(ui): persist provider selection in cliproxy and auth-monitor
- save selected provider to localStorage on both pages
- restore selection on page load
- validate saved provider still exists before restoring
- improves UX by eliminating need to re-select provider after reload
2026-01-25 17:34:55 -05:00
kaitranntt e3920e0776 fix(quota): return exhausted models with resetTime from API
- treat models with resetTime but null/missing remainingFraction as 0%
- matches CLIProxy Management Center behavior
- enables accurate Claude reset time display when quota exhausted
- mark primary models at 0% as exhausted for red styling
2026-01-25 17:34:30 -05:00
kaitranntt a84cc036df fix(ui): remove dead 'Account is paused' error handling from flow-viz
Backend now returns quota for paused accounts, no longer returns this error.
2026-01-25 17:15:19 -05:00
kaitranntt 27e8813cae fix(quota): fetch quota for paused accounts + simplify exhausted display
- Remove early return for paused accounts in quota fetcher
- Check both auth/ and auth-paused/ directories when reading auth data
- Allows users to see quota status of paused accounts to know when to unpause
- Remove "Exhausted" text in tooltip, just show 0% in red (saves width)
2026-01-25 17:12:45 -05:00
kaitranntt b2b8a85af6 fix(ui): simplify quota tooltip - delimiter lines only, full model names
- Remove tier group headers, use delimiter lines between tiers
- Show full model names (Claude Opus 4.5 (Thinking), etc.)
- Show "Exhausted" in percentage column instead of appending to name
- Add all known primary models when exhausted
2026-01-25 17:09:59 -05:00
kaitranntt 41d17e7cae fix(ui): improve tier header contrast in quota tooltip 2026-01-25 17:06:44 -05:00
kaitranntt ebfc554f5f feat(ui): add tiered visual grouping to quota tooltip
- Replace generic "Claude/GPT (Exhausted)" with actual model names
- Group models by tier with visual headers:
  - Claude & GPT (primary, weekly limits)
  - Gemini 3 (high capability)
  - Gemini 2.5 (mid tier)
  - Other
- When primary models exhausted, show known models with "(Exhausted)" label
- Add border separators between tier groups for visual clarity
2026-01-25 17:06:06 -05:00
kaitranntt de7138166c fix(ui): improve model quota tooltip tier sorting
Sort models by capability tier instead of just provider:
- Tier 0: Claude + GPT (primary, weekly limits)
- Tier 1: Gemini 3 Pro (high capability)
- Tier 2: Gemini 2.5 Pro/Flash (mid tier)
- Tier 3: Other Gemini models
- Tier 4: Everything else (chat_, tab_, etc.)
2026-01-25 17:03:10 -05:00
kaitranntt ce16517144 fix(ui): display exhausted Claude/GPT models in quota tooltip
When Claude/GPT models are exhausted (0%), API removes them from response.
Added getModelsWithExhaustedIndicator() to prepend synthetic "Claude/GPT
(Exhausted)" entry with 0% when primary models missing. Styled in red for
visibility. Applied to both account-item and flow-viz account-card tooltips.
2026-01-25 16:51:49 -05:00
kaitranntt 1f323f082c fix(ui): show 0% quota when Claude/GPT models exhausted
- include GPT models in primary quota filter (not just Claude)

- return 0% when Claude/GPT missing from API (exhausted, not 100%)

- fallback to all models for reset time when primary exhausted
2026-01-25 16:48:45 -05:00
kaitranntt 9516e71f17 fix(ui): show Claude reset time for quota display (not earliest)
- add getClaudeResetTime to match getMinClaudeQuota logic

- weekly Claude resets now show absolute date (01/27, 12:07)

- daily Gemini resets no longer overshadow Claude weekly limits
2026-01-25 16:38:54 -05:00
kaitranntt 6021c10ddc fix(ui): improve bulk actions UX in provider editor
- move BulkActionBar above account list (was at bottom)

- only show bar when selections exist (cleaner default)

- add selection checkbox to each AccountItem

- highlight selected accounts with ring + background
2026-01-25 16:25:08 -05:00
kaitranntt eb053425c0 fix(ui): improve pause toggle position in flow-viz account cards
- move pause toggle inline with email (was absolute positioned)

- always visible with subtle styling (not hover-only)

- amber highlight when paused for quick visual scan
2026-01-25 16:23:54 -05:00
kaitranntt 56dfada31c fix(ui): add pause toggle to flow viz account cards, remove dropdown redundancy
- Add visible pause/resume toggle button to AccountCard in flow-viz
  (appears on hover or when paused, with tooltip)
- Pass pause toggle props from AuthMonitor through AccountFlowViz
- Remove redundant pause/resume from account-item dropdown menu
  (keeps only "Set as default" and "Remove account")
- Add paused state to AccountData type with opacity indication
2026-01-24 13:01:30 -05:00
kaitranntt 2d42327a89 revert(ui): restore original provider card navigation behavior
Reverts the expandable ProviderCard design back to click-to-navigate.
The pause toggle feature is preserved in AccountItem cards in Provider
Editor, not in the Live Account Monitor overview.

- Remove expandable account list component
- Remove unused pause/resume/solo mutations from AuthMonitor
- Restore original ProviderCard props interface
- Keep acc.paused opacity-50 for visual indication on dots
2026-01-24 12:37:55 -05:00
kaitranntt 56dfb2429b feat(ui): add visible pause toggle button to account item cards
- add pause/play button left of user avatar

- paused accounts show play icon (green) and dimmed card

- active accounts show pause icon

- includes loading spinner and tooltip
2026-01-24 12:33:37 -05:00
kaitranntt 118ce46e72 refactor(ui): update cliproxy page for account control flow 2026-01-24 12:23:18 -05:00
kaitranntt 87226e05c4 feat(ui): add expandable provider cards with account controls
- add ExpandableAccountList for inline account management

- add expand/collapse to ProviderCard with smooth transitions

- wire pause/resume/solo mutations to auth-monitor index

- add paused field to AccountRow type for UI display
2026-01-24 12:23:12 -05:00
kaitranntt 1427d36f86 feat(ui): add bulk account controls to provider editor
- add BulkActionBar component for multi-select pause/resume

- add AccountItem with individual pause toggle and solo button

- fix solo button disabled logic for consistency

- add selection state and bulk operations to AccountsSection
2026-01-24 12:23:04 -05:00
kaitranntt 708661744f fix(hooks): add stats invalidation to account control mutations
- add cliproxy-stats query invalidation to pause/resume/solo mutations

- ensures UI shows fresh stats after account state changes
2026-01-24 12:22:56 -05:00
kaitranntt d1b579ad1b fix(api): add race condition prevention and input validation for account control
- add mutex pattern with providerLocks Map for solo mode

- convert soloAccount to async function

- extract VALID_PROVIDERS constant and isValidProvider helper (DRY)

- allow empty arrays in bulk endpoints (return early success)

- add accountIds string validation (non-empty strings only)
2026-01-24 12:22:49 -05:00
semantic-release-bot caba99c3b5 chore(release): 7.26.3 [skip ci]
## [7.26.3](https://github.com/kaitranntt/ccs/compare/v7.26.2...v7.26.3) (2026-01-24)

### Bug Fixes

* **cliproxy:** propagate backend parameter to version check functions ([2a0efbd](https://github.com/kaitranntt/ccs/commit/2a0efbd954d5126d29920e4992f2f9a6be74fce6))
* **tests:** address edge cases in mock infrastructure ([2b91c40](https://github.com/kaitranntt/ccs/commit/2b91c40e37d5b28420ba9fa45f5b7bcbde6e29d5))
* **tests:** remove undefined MockRoute export and unused imports ([aaa6feb](https://github.com/kaitranntt/ccs/commit/aaa6feb8db6a31e598204448d6f45520313140f3))

### Documentation

* clarify no-emoji rule applies only to CLI terminal output ([0902211](https://github.com/kaitranntt/ccs/commit/0902211d409712f00bc5582e50660f6d76ef4e4c))

### Performance Improvements

* **tests:** replace real network ops with mock infrastructure ([5c83429](https://github.com/kaitranntt/ccs/commit/5c83429a79e178283654ee5d401cd8814d7ed599))
2026-01-24 05:05:24 +00:00
Kai (Tam Nhu) TranandGitHub aada7a6833 Merge pull request #367 from kaitranntt/dev
feat(release): v7.27.0 - test performance and cliproxy fixes
2026-01-24 00:04:20 -05:00
github-actions[bot] 1e2eeb1946 chore(release): 7.26.2-dev.3 [skip ci] 2026-01-24 05:01:25 +00:00
kaitranntt 0902211d40 docs: clarify no-emoji rule applies only to CLI terminal output 2026-01-24 00:00:27 -05:00
github-actions[bot] 1fbf6b0cc7 chore(release): 7.26.2-dev.2 [skip ci] 2026-01-24 04:52:01 +00:00
Kai (Tam Nhu) TranandGitHub a3b7e8bfcb Merge pull request #366 from kaitranntt/kai/perf/test-mock-refactor
perf(tests): mock infrastructure for fast test execution
2026-01-23 23:50:57 -05:00
kaitranntt aaa6feb8db fix(tests): remove undefined MockRoute export and unused imports
- Remove MockRoute from index.ts (type was removed in previous commit)
- Remove unused UPLOAD_SUCCESS, UNAUTHORIZED imports from test file
2026-01-23 23:47:09 -05:00
kaitranntt 2b91c40e37 fix(tests): address edge cases in mock infrastructure
- Prevent spy leak on double mockFetch() call
- Differentiate body types (URLSearchParams, ArrayBuffer, Blob, ReadableStream)
- Fix route path parsing to preserve spaces
- Escape regex special chars before wildcard replacement
- Remove unused MockResponse.error and MockRoute interface
2026-01-23 23:41:49 -05:00
kaitranntt 5c83429a79 perf(tests): replace real network ops with mock infrastructure
- Add centralized mock infrastructure in tests/mocks/:
  - mock-fetch.ts: Bun native fetch interception
  - mock-http-server.ts: Fake server responses (no ports)
  - fixtures/responses.ts: Preset response constants
  - types.ts: Mock type definitions

- Refactor https-tunnel-proxy.test.ts:
  - Remove TEST_CERT constant (~50 lines)
  - Remove real HTTPS server creation
  - Use invalid hosts for error path testing
  - 26/26 tests pass in ~430ms

- Refactor remote-token-uploader.test.ts:
  - Replace 7 real HTTP servers with mockFetch
  - Reduce from 422 to 289 lines
  - 18/18 tests pass in ~120ms

- Add global test timeout (10s) in bunfig.toml

Test suite: 10+ min → 14 seconds
2026-01-23 23:35:17 -05:00
github-actions[bot] 23f3b6dcfd chore(release): 7.26.2-dev.1 [skip ci] 2026-01-24 04:11:02 +00:00
Kai (Tam Nhu) TranandGitHub 883ea5d77e Merge pull request #365 from kaitranntt/kai/fix/cliproxy-backend-propagation
fix(cliproxy): propagate backend parameter to version check functions
2026-01-23 23:10:02 -05:00
kaitranntt 2a0efbd954 fix(cliproxy): propagate backend parameter to version check functions
Root cause: fetchLatestCliproxyVersion() and checkCliproxyUpdate()
ignored the caller's backend selection, always re-computing from config.
This caused --update to report wrong version when config wasn't synced.

Changes:
- Add optional backend param to fetchLatestCliproxyVersion()
- Add optional backend param to checkCliproxyUpdate()
- Pass effectiveBackend in binary-service.ts calls
- Pass backend in cliproxy-stats-routes.ts web endpoints

Fixes inconsistent version reporting when switching between
CLIProxyAPI (original) and CLIProxyAPIPlus backends.
2026-01-23 22:56:27 -05:00
semantic-release-bot 9051ea05bf chore(release): 7.26.2 [skip ci]
## [7.26.2](https://github.com/kaitranntt/ccs/compare/v7.26.1...v7.26.2) (2026-01-23)

### Bug Fixes

* display correct project names in session stats ([8ee87c7](https://github.com/kaitranntt/ccs/commit/8ee87c7452d3b3f71d4dd15031350fdcb2c4a8dc)), closes [#348](https://github.com/kaitranntt/ccs/issues/348) [#103](https://github.com/kaitranntt/ccs/issues/103)
* **glmt:** respect user-configured model instead of hardcoding glm-4.6 ([bd343f3](https://github.com/kaitranntt/ccs/commit/bd343f3f028bf1c5b0648a7566291fa4b94a09c3)), closes [#358](https://github.com/kaitranntt/ccs/issues/358)
* resolve test import paths and vi.mock hoisting issues ([84ec434](https://github.com/kaitranntt/ccs/commit/84ec43430d666ffd26505431d76fd1a8d1d4aaae))
* **ui:** display correct project names in session stats ([01f9610](https://github.com/kaitranntt/ccs/commit/01f96104e65ae02f7a20bad44730922a61b21c02)), closes [#348](https://github.com/kaitranntt/ccs/issues/348) [#103](https://github.com/kaitranntt/ccs/issues/103)

### Tests

* add project name display tests ([c5911dd](https://github.com/kaitranntt/ccs/commit/c5911dde38fedea1eb231a85de96c92dd79aec4e)), closes [#348](https://github.com/kaitranntt/ccs/issues/348) [#103](https://github.com/kaitranntt/ccs/issues/103)
2026-01-23 23:16:50 +00:00
Kai (Tam Nhu) TranandGitHub 87c9f66571 Merge pull request #362 from kaitranntt/dev
fix: GLM model version mismatch and session stats display
2026-01-23 18:15:47 -05:00
github-actions[bot] ad46f3cb4d chore(release): 7.26.1-dev.2 [skip ci] 2026-01-23 23:11:21 +00:00
Kai (Tam Nhu) TranandGitHub e59f51fb8b Merge pull request #361 from kaitranntt/kai/fix/glm-version-mismatch
fix(glmt): respect user-configured model instead of hardcoding glm-4.6
2026-01-23 18:10:23 -05:00
kaitrannttandClaude bd343f3f02 fix(glmt): respect user-configured model instead of hardcoding glm-4.6
Root cause: execClaudeWithProxy() was ignoring ANTHROPIC_MODEL from
user settings and always using hardcoded 'glm-4.6'.

Changes:
- Read model from user's settings file in GLMT proxy flow
- Update default model to glm-4.7 in base configs (matches presets)
- Update fallback models in transformer/response-builder

Closes #358

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-23 17:08:08 -05:00
github-actions[bot] 7c0cd86183 chore(release): 7.26.1-dev.1 [skip ci] 2026-01-23 21:28:08 +00:00
Kai (Tam Nhu) TranandGitHub 1326ee9cc1 Merge pull request #352 from Mearman/fix/session-stats-display
fix: display correct project names in session stats
2026-01-23 16:27:04 -05:00
kaitranntt 84ec43430d fix: resolve test import paths and vi.mock hoisting issues
- Fix import paths (5 '../' → 4 '../' for src imports)
- Fix test-utils import path (2 '../' → 3 '../')
- Fix vi.mock hoisting by inlining mock function
- Fix mockData scope in Privacy Mode test
- Fix test assertions (getByRole → querySelector, getByText → getAllByText)
- Add barrel export for getProjectDisplayName utility
2026-01-23 16:17:23 -05:00
semantic-release-bot 5594ab503c chore(release): 7.26.1 [skip ci]
## [7.26.1](https://github.com/kaitranntt/ccs/compare/v7.26.0...v7.26.1) (2026-01-23)

### Bug Fixes

* **cliproxy:** complete backend param propagation per code review ([388ab69](https://github.com/kaitranntt/ccs/commit/388ab69a970e7bbd249948f34d7ab3e7ab5ddcb9))
* **cliproxy:** complete backend switching with proper binary extraction ([2794a54](https://github.com/kaitranntt/ccs/commit/2794a548a57c94002ab8c4f926bd47f04de3f8ff))
* **cliproxy:** make backend switching work with version pins and status ([628148c](https://github.com/kaitranntt/ccs/commit/628148c3590e09dcb04fb205bd41880c3f295e87))
* **cliproxy:** make version cache backend-specific for proper switching ([a41fd2a](https://github.com/kaitranntt/ccs/commit/a41fd2a093d207d9216cde2a58da8669c09c7c04))
* **cliproxy:** use backend-aware labels in error messages and API ([f0c845c](https://github.com/kaitranntt/ccs/commit/f0c845c32e7f389d8427941dd685898a3f894faa))
* **cliproxy:** use backend-specific GitHub repos for version fetching ([0a1cbcc](https://github.com/kaitranntt/ccs/commit/0a1cbcc612d81ec8dc837cdada7c943ffedd4483))
* **ui:** add backend fields to CliproxyUpdateCheckResult type ([c916356](https://github.com/kaitranntt/ccs/commit/c9163568391208c346a6ca0e04562d2931e8092a))
* **ui:** align alert icon vertically with text when using py-2 ([0511c5e](https://github.com/kaitranntt/ccs/commit/0511c5e2fd008d953b357861a7941c3176280ecd))
* **ui:** correct warning text to reference Instance Status section ([46e75e2](https://github.com/kaitranntt/ccs/commit/46e75e2a746ab46801d4d731a08405dc029fdf5a))
* **ui:** display dynamic backend label in dashboard ([dad4349](https://github.com/kaitranntt/ccs/commit/dad434999469b6ed6e87c186c690004b83676420))
* **ui:** integrate ProxyStatusWidget in Settings & block backend switch when running ([6458173](https://github.com/kaitranntt/ccs/commit/64581734c61f3ad31e52c3decc6de10a6f983050))
* **ui:** prevent race conditions during backend switch ([498175e](https://github.com/kaitranntt/ccs/commit/498175e9fbc70010aececc276749356e8f8a8070))
* **ui:** sync backend state across all CLIProxy UI components ([88560c7](https://github.com/kaitranntt/ccs/commit/88560c71194b66093410cd5189a84d1224b16b2a))
2026-01-23 20:54:50 +00:00
Kai (Tam Nhu) TranandGitHub 108c788d9e Merge pull request #360 from kaitranntt/dev
fix(cliproxy): complete backend switching implementation
2026-01-23 15:53:42 -05:00