Commit Graph
324 Commits
Author SHA1 Message Date
kaitranntt 25018431a5 fix(copilot): update fallback model ID to match catalog default
Address code review feedback: update outdated fallback model ID
in copilot config form to use claude-sonnet-4-5-20250929
2026-01-29 00:45:49 -05:00
kaitranntt d238a5d43a fix(cliproxy): update Claude model catalog to latest CLIProxy models
- Updated claude-opus-4-5-20250220 → claude-opus-4-5-20251101
- Updated claude-sonnet-4-5-20250514 → claude-sonnet-4-5-20250929
- Updated claude-haiku-4-5-20250514 → claude-haiku-4-5-20251001
- Updated default model to claude-sonnet-4-5-20250929
- Updated all preset mappings to use new model IDs

Closes #392
2026-01-29 00:37:31 -05:00
kaitranntt 31a91f609f feat(ui): add tier badges to account cards
- flow-viz: inline tier badge (ULTRA/PRO) with violet/yellow colors

- provider-editor: tier badge on avatar corner (U/P)

- subtle design with low opacity backgrounds
2026-01-28 16:31:16 -05:00
kaitranntt 890fd140f2 feat(ui): add granular account tier types (pro/ultra/free)
- update AccountTier from binary to granular

- add tier field to AccountRow and AccountData types

- pass tier through hooks data flow
2026-01-28 16:30:41 -05:00
kaitranntt 87cced8195 fix(ui): fix account card layout overflow
- add min-w-0 flex-1 to left content container for proper shrinking

- add gap-2 between content and dropdown menu

- add shrink-0 to dropdown button to prevent overflow
2026-01-28 15:11:17 -05:00
kaitranntt bbad73b554 fix(cliproxy): harden sync against edge cases
Backend:
- Handle config file deletion race condition with try-catch
- Add null check for empty config files in yaml.load()
- Limit profile names to 64 chars, require alphanumeric content
- Add 5s timeout for watcher close() to prevent hangs

Frontend:
- Add 30s fetch timeout with AbortController for sync requests
2026-01-28 13:58:16 -05:00
kaitranntt c3f85bc4a8 fix(cliproxy): correct sync terminology and add unit tests
- Fix "Remote" → "Local" in sync-dialog.tsx and CLI help text
- Add resetWatcherState() export for test cleanup
- Add unit tests for profile-mapper, local-config-sync, auto-sync-watcher
- Remove unused ModelAlias and AliasesResponse types from hooks
2026-01-28 13:26:40 -05:00
kaitranntt ab9bbedfa9 feat(ui): allow custom model names in Quick Setup wizard
- Add "Custom model name..." option to model dropdown
- Show text input when custom selected
- Allow any CLIProxy-supported model name
- Toggle back to presets with link
2026-01-28 11:57:22 -05:00
kaitranntt 85aa747aeb fix(ui): add scroll boundary for account list in Quick Setup
- Add max-h-[320px] and overflow-y-auto to account grid
- Prevents overflow when many accounts exist
2026-01-28 11:57:22 -05:00
kaitranntt f972a4ee80 feat(ui): add toast feedback for sync actions
- Show success toast with synced profile count
- Show info toast when no profiles to sync
- Show error toast on sync failure
2026-01-28 11:57:22 -05:00
kaitranntt 37616348f8 refactor(ui): merge sync into ProxyStatusWidget
- add sync icon button to widget header

- show inline sync status (Ready/No Config)

- remove separate SyncStatusCard from cliproxy page

- reduces vertical space, better UX
2026-01-28 11:57:22 -05:00
kaitranntt 32dbd5e174 refactor(cliproxy): remove model alias functionality
- delete model-alias-config.ts and cliproxy-alias-handler.ts

- simplify sync to use ANTHROPIC_MODEL directly

- remove alias routes, hooks, and UI components
2026-01-28 11:57:22 -05:00
kaitranntt afa3bdafce feat(ui): mount SyncStatusCard to CLIProxy page 2026-01-28 11:57:22 -05:00
kaitranntt e2b9c465e4 fix(ui): update sync card for local sync design
- rename Remote Sync to Profile Sync

- change status from Connected/Disconnected to Ready/No Config

- update icons and messaging for local config sync
2026-01-28 11:57:22 -05:00
kaitranntt 9924b2fb25 fix(cliproxy): address edge cases in sync module
- Reset isSyncing flag in stopAutoSyncWatcher (prevents stale state)
- Validate empty profile names in mapProfileToClaudeKey
- Add whitespace validation in API routes (POST/DELETE /aliases)
- Add Number.isInteger check for port validation
- Wrap response.json() in try-catch for React hooks (handles non-JSON 502)
2026-01-28 11:57:22 -05:00
kaitranntt 75a4e68f95 feat(ui): add CLIProxy sync components
- add SyncStatusCard for sync status display
- add SyncDialog for sync preview and execution
- add useCliproxySync hook for API integration
2026-01-28 11:57:22 -05:00
kaitranntt 5c62e06d02 fix(ui): add iFlow to PROVIDER_ASSETS + sync validation test
- Add iflow.png to PROVIDER_ASSETS map

- Add backend-ui-provider-arrays-sync.test.ts to catch mismatches

- Addresses PR #384 review: dual source of truth + missing iFlow
2026-01-27 22:20:15 -05:00
kaitranntt a9c5520b8b fix(ui): truncate long account emails in provider editor
- Add min-w-0 flex-1 for proper text overflow

- Add truncate class to prevent layout break
2026-01-27 21:40:29 -05:00
kaitranntt 5a4c8e009c refactor(ui): centralize provider list in provider-config.ts (DRY)
- Add CLIPROXY_PROVIDERS array as single source of truth for UI
- Add CLIProxyProvider type and isValidProvider() helper
- Update api-client.ts to use CLIProxyProvider type
- Update cliproxy-dialog.tsx to import from provider-config
- Update cliproxy-header.tsx to use CLIPROXY_PROVIDERS
- Update use-cliproxy-auth-flow.ts to use isValidProvider()
- Update wizard constants to use typed provider info

Adding a new provider now only requires updating:
- Backend: src/auth/profile-detector.ts (CLIPROXY_PROFILES)
- UI: ui/src/lib/provider-config.ts (CLIPROXY_PROVIDERS)
- UI wizard: ui/src/components/setup/wizard/constants.ts (PROVIDER_INFO)
2026-01-27 21:07:26 -05:00
kaitranntt 4a2abc74ca fix: add claude provider to statsProviderMap, UI types, and provider arrays
Fixes remaining edge cases from #382:
- Add anthropic/claude mapping to statsProviderMap in cliproxy-auth-routes
- Add 'claude' case to provider-refreshers switch statement
- Add 'claude' to 4 UI type definitions in api-client.ts
- Add 'claude' to cliproxy-dialog providers array and options
- Add 'claude' to use-cliproxy-auth-flow VALID_PROVIDERS
- Fix wizard index.tsx type cast to include all 8 providers
2026-01-27 21:02:34 -05:00
kaitranntt 2091a90b77 fix(cliproxy): address PR review feedback
- Remove claude from PLUS_ONLY_PROVIDERS (Claude works with normal CLIProxy too)
- Fix color inconsistency: use #D97757 to match SVG brand color
- Add iflow to checkAuthCodePorts (pre-existing issue, fixed opportunistically)
2026-01-27 20:24:01 -05:00
kaitranntt b385ab131d refactor(cliproxy): reorder providers - Antigravity first, then Claude 2026-01-27 20:17:10 -05:00
kaitranntt d2129957d7 fix(cliproxy): add Claude to all provider lists for sidebar display
Claude was missing from:
- getAllAuthStatus() providers array in token-manager.ts
- PROVIDER_ASSETS, PROVIDER_COLORS, PROVIDER_NAMES in provider-config.ts
- PROVIDERS array in setup wizard constants.ts
- PLUS_ONLY_PROVIDERS in proxy settings
2026-01-27 20:14:22 -05:00
kaitranntt 28d8bd84a5 feat(cliproxy): add Claude (Anthropic) OAuth provider support
Add Claude as a first-class OAuth provider in CCS CLI and dashboard.
Backend support already exists in CLIProxyAPIPlus (port 54545).

Changes:
- Add 'claude' to CLIProxyProvider type and profile detector
- Add Claude OAuth config (port 54545, --anthropic-login flag)
- Add Claude to oauth-port-diagnostics flow types
- Add Claude token discovery prefixes (claude-, anthropic-)
- Add Claude model catalog (Opus 4.5, Sonnet 4.5/4, Haiku 4.5)
- Add Claude logo and provider display name
- Update variant config types and adapters

Closes #380
2026-01-27 15:43:21 -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
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
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 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