Commit Graph
33 Commits
Author SHA1 Message Date
Tam Nhu Tran 5013d411a7 feat(cliproxy): self-pause exhausted quota accounts 2026-04-28 20:35:15 -04:00
yousikiandClaude Opus 4.7 0e602932f2 fix(ui): widen getCodexWindowKind parameter to accept CodexWindowSummary
The new helpers added in this PR (inferCodeReviewCadence,
getCodexWindowDisplayLabel) operate on CodexWindowSummary - a Pick subset
of CodexQuotaWindow without usedPercent/remainingPercent/resetAt. They
pass that subset into getCodexWindowKind, which was still typed as
string | CodexQuotaWindow, so tsc -b fails with TS2345 in CI. The
function only reads label/category/cadence, all of which exist on
CodexWindowSummary, so widening the parameter is safe and lets a real
CodexQuotaWindow continue to flow through unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 10:59:58 +09:00
yousiki a90aadd202 fix(cliproxy): tighten Codex window classification on incomplete metadata
Apply Copilot review feedback on PR #1113:
- getCodexWindowKind: require cadence alongside category; fall through
  to label sniffing when missing instead of silently defaulting to 5h.
- getCodexWindowDisplayLabel (CLI): for category 'additional', fall back
  through featureLabel -> window.label -> 'Additional' so partial cached
  windows preserve user-visible context.
2026-04-27 16:57:28 +09:00
yousiki 725d95b0d2 fix(ui): surface Codex Spark windows in dashboard quota views
Mirror the server-side CodexQuotaWindow metadata extension on the UI
side: api-client.ts gains category/cadence/featureLabel; utils.ts
breakdown returns additionalWindows so Spark quota does not pollute
core 5h/weekly badges; quota-tooltip-content renders Spark inline with
prettified labels (GPT-5.3-Codex-Spark -> Codex Spark). Adds breakdown
unit tests and i18n strings for English/Chinese/Vietnamese/Japanese.
2026-04-27 15:50:31 +09:00
Tam Nhu Tran c3401f0a91 feat(ui): complete dashboard i18n coverage across 162 files
Replace all remaining hardcoded English strings with t() calls across
the CCS dashboard UI. Add zh-CN, vi, ja translations for all new keys.

- 162 files updated (components, hooks, pages, lib utilities)
- 7 domains covered: layout/shared, accounts/auth, CLIProxy,
  compatible CLI (Codex/Cursor/Droid/Copilot), logs/monitoring,
  analytics, and lib utilities
- 4 locales: en, zh-CN, vi, ja with natural (not literal) translations
- Fix duplicate customPresetDialog key shadowing in en/zh-CN
- Fix missing ja nav.logs and providerModelSelector keys
- Fix openrouter-banner count type (string → number)
- Fix add-account-dialog double setLocalError call
- Fix codex-model-providers-card missing useTranslation

Closes #983
2026-04-13 20:52:30 -04:00
Tam Nhu Tran bb331ff5d8 feat(cliproxy): add entitlement evidence for gemini and agy 2026-04-10 13:17:50 -04:00
Tam Nhu Tran fc3600e922 fix: improve quota diagnostics and oauth refresh handling 2026-03-07 11:09:15 +07:00
Tam Nhu Tran f63e2cd5a3 fix(cliproxy): denylist deprecated agy 4.5 models 2026-03-03 03:10:53 +07:00
Tam Nhu Tran ca58cb5a08 fix(cliproxy): harden quota guards and review follow-ups 2026-02-22 02:35:07 +07:00
Tam Nhu Tran 8c790f41ff fix(cliproxy): close remaining quota edge-case gaps 2026-02-22 02:12:40 +07:00
Tam Nhu Tran 2385d9028a feat(cliproxy): add Claude quota windows and account failover 2026-02-22 01:19:02 +07:00
Tam Nhu Tran 8201204380 fix(quota): address ghcp review follow-ups 2026-02-20 22:53:49 +07:00
Tam Nhu Tran 2c5b2af55a fix(ui): normalize ghcp quota tooltip and labels 2026-02-20 22:40:22 +07:00
Tam Nhu Tran 8d9d4987dc feat(quota): add GitHub Copilot quota checks for ghcp and copilot 2026-02-20 22:32:27 +07:00
Tam Nhu Tran 40512fe338 fix(codex): stabilize code review window labeling 2026-02-14 06:28:48 +07:00
Tam Nhu Tran 1d2ee827fe fix(codex): infer code review cadence from reset window 2026-02-14 06:09:36 +07:00
Tam Nhu Tran f8af5a8c3c fix(codex): align quota display to 5h and weekly windows 2026-02-14 05:57:06 +07:00
kaitranntt 8ce749581e refactor(ui): extract duplicated quota helpers to shared utils
Address PR review feedback:
- Add type guards (isAgyQuotaResult, isCodexQuotaResult, isGeminiQuotaResult)
- Add unified getProviderMinQuota() and getProviderResetTime() helpers
- Export QUOTA_SUPPORTED_PROVIDERS constant from hooks
- Update account-item.tsx and account-card.tsx to use shared functions
- Eliminate code duplication across provider-specific quota handling

Closes #400 review feedback
2026-01-29 22:17:57 -05:00
kaitranntt 19a57c395c feat(ui): add Codex/Gemini quota API client and hooks
- add CodexQuotaResult and GeminiCliQuotaResult types

- add api.quota.getCodex and api.quota.getGemini API functions

- add useCodexQuota and useGeminiQuota React hooks

- add getMinCodexQuota, getMinGeminiQuota, getCodexResetTime, getGeminiResetTime utils
2026-01-29 21:50:43 -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 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 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 a011908b3c fix(ui): show min Claude quota instead of avg all models
Main quota bar now displays minimum of Claude model quotas rather
than averaging all models. Accurately reflects primary constraint.

Changes:
- Add getMinClaudeQuota() utility in utils.ts (DRY)
- Apply fix to both account-card.tsx and account-item.tsx
- Add comprehensive test suite (23 tests covering edge cases)

Before: 99% (avg of Claude 95% + Gemini 100%...)
After: 95% (min of Claude models)
2026-01-01 14:44:30 -05:00
kaitranntt 6ccf6c5e13 feat(ui): replace misleading token expiry with runtime-based status
- Remove "Token expired" warning (showed stale file state, not runtime)
- Add "Active/Last used" status based on CLIProxyAPI runtime stats
- Show green checkmark for recently used accounts (within 1h)
- Show "Not used yet" for accounts without usage stats
- Remove expired warning from flow-viz account cards
- Add model quota sorting (Claude > Gemini > GPT > other)
- Add quota reset time display in tooltips
- Fix re-auth button to use correct CCS endpoint
- Reduce quota cache staleness (30s stale, 1m refresh)

CLIProxyAPI intentionally doesn't persist refreshed tokens to disk
(to prevent refresh loops), so file-based expiry was misleading.
Dashboard now shows truthful operational state from runtime stats.
2025-12-29 13:03:37 -05:00
kaitranntt 0f029f960a feat(ui): integrate Kiro and Copilot providers, rename to CLIProxy Plus
- Rename sidebar/header from CLIProxy to CLIProxy Plus
- Add Kiro and Copilot to all provider lists and type unions
- Add provider logos and color configs
- Add model catalogs with upstream CLIProxyAPIPlus models
- Update Quick Setup Wizard with new providers
2025-12-21 22:27:36 -05:00
kaitranntt 197848a71b feat(ui): enhance light theme contrast and animations 2025-12-16 07:06:06 -05:00
kaitranntt b97c3bfda4 feat(ui): implement auth monitor components & pages 2025-12-14 04:26:02 -05:00
kaitranntt f255a20a93 feat(analytics): refactor model color management and fix UI display issues
- Extract getModelColor utility to lib/utils.ts with improved FNV-1a hash algorithm
- Replace hardcoded color palette with vibrant tones palette
- Remove color constants from model-breakdown-chart.tsx
- Fix truncated model names in analytics display
- Update project roadmap with analytics enhancements
2025-12-09 14:44:56 -05:00
kaitranntt 6a6f2a2463 feat(web-dashboard): add express server and react ui scaffolding 2025-12-07 11:37:28 -05:00