Commit Graph
1436 Commits
Author SHA1 Message Date
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
github-actions[bot] f21cc1fed0 chore(release): 7.26.0-dev.1 [skip ci] 2026-01-23 20:47:43 +00:00
Kai (Tam Nhu) TranandGitHub 4d171e77f8 Merge pull request #359 from kaitranntt/kai/fix/cliproxy-backend-switching
fix(cliproxy): make backend switching work with version pins and status
2026-01-23 15:46:43 -05:00
kaitranntt c916356839 fix(ui): add backend fields to CliproxyUpdateCheckResult type
Sync UI type definition with server response that now includes
backend and backendLabel fields for dynamic backend display.
2026-01-23 15:44:04 -05:00
kaitranntt f0c845c32e fix(cliproxy): use backend-aware labels in error messages and API
- Use checkCliproxyUpdate() in checkLatestVersion() for correct repo
- Dynamic error messages based on backend in service-manager
- Dynamic error messages based on backend in cliproxy-executor
- Generic "CLIProxy" message in oauth-process (no backend context)
2026-01-23 15:37:40 -05:00
kaitranntt 2794a548a5 fix(cliproxy): complete backend switching with proper binary extraction
- Add backend field to BinaryManagerConfig type for installer context
- Thread backend parameter through tar/zip extractors to use correct names
- Delete existing binary before install to prevent mismatched binaries
- Track backend in session metadata for debugging/monitoring
- Validate and preserve backend field in config mergeWithDefaults
- Pass backend to registerSession for session tracking

The core issue was extractors calling getExecutableName() without the
backend parameter, causing it to default to 'plus' regardless of user
selection. This resulted in wrong binaries being extracted/renamed.
2026-01-23 15:17:32 -05:00
kaitranntt 0a1cbcc612 fix(cliproxy): use backend-specific GitHub repos for version fetching
Root cause: fetchLatestVersion and fetchAllVersions were hardcoded to
CLIProxyAPIPlus repo, ignoring backend selection.

Changes:
- Add getGitHubApiUrls(backend) helper to types.ts
- Make fetchLatestVersion and fetchAllVersions backend-aware
- Make version list cache backend-specific (bin/{backend}/.version-list-cache.json)
- Update /api/cliproxy/versions route to use configured backend
- Allow version management even when proxy not running (ProxyStatusWidget)
- Show settings button in all states for easier access
2026-01-23 14:55:51 -05:00
kaitranntt 498175e9fb fix(ui): prevent race conditions during backend switch
- Add mutation key to useUpdateBackend for tracking
- Detect backend switching with useIsMutating in ProxyStatusWidget
- Disable install/controls during backend switch (prevents wrong-backend install)
- Reduce useCliproxyVersions staleTime from 1h to 5min for faster refresh
- Enable refetchOnWindowFocus for versions query
2026-01-23 14:50:13 -05:00
kaitranntt a41fd2a093 fix(cliproxy): make version cache backend-specific for proper switching
- Add backend parameter to version cache functions (read/write/path)
- Store cache at bin/{backend}/.version-cache.json instead of shared location
- Pass backend through checkForUpdates() and BinaryManager
- Add refetchType: 'all' to force immediate query refetch on backend change
- Add cliproxy-server-config query invalidation for consistency
2026-01-23 14:40:40 -05:00
kaitranntt 0511c5e2fd fix(ui): align alert icon vertically with text when using py-2 2026-01-23 14:22:12 -05:00
kaitranntt 46e75e2a74 fix(ui): correct warning text to reference Instance Status section 2026-01-23 14:20:38 -05:00
kaitranntt 64581734c6 fix(ui): integrate ProxyStatusWidget in Settings & block backend switch when running
- Add ProxyStatusWidget to Settings/Proxy page for quick start/stop access
- Disable backend selection when proxy is running with clear warning
- Removes UX friction: no need to navigate to CLIProxy page to stop instance
- Shows amber alert explaining why backend switch is blocked

User can now:
1. See proxy status directly in Settings
2. Stop proxy from Settings page
3. Change backend only when proxy is stopped
2026-01-23 13:53:53 -05:00