Commit Graph
293 Commits
Author SHA1 Message Date
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
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
kaitranntt 88560c7119 fix(ui): sync backend state across all CLIProxy UI components
- Add useUpdateBackend mutation hook that invalidates related queries
- Reduce update-check stale time from 1hr to 5min + enable refetchOnWindowFocus
- Settings proxy page now uses mutation hook for proper query invalidation
- Make all CLIProxy labels dynamic based on backendLabel from API:
  - cliproxy-header.tsx: page title
  - app-sidebar.tsx: nav item label
  - cliproxy-stats-overview.tsx: both offline and running descriptions
  - model-preferences-grid.tsx: card description
  - settings proxy section: descriptions for local/remote modes
- Fix API route to use DEFAULT_BACKEND constant instead of hardcoded 'plus'

Ensures backend switching in Settings immediately reflects in all CLIProxy pages.
2026-01-23 13:46:47 -05:00
kaitranntt dad4349994 fix(ui): display dynamic backend label in dashboard
- Add backend/backendLabel fields to CliproxyUpdateCheckResult
- Update proxy-status-widget to show backendLabel from API
- Update cliproxy page header to use backendLabel

Dashboard now shows "CLIProxy" or "CLIProxy Plus" based on configured
backend in config.yaml instead of hardcoded "CLIProxy Plus".
2026-01-23 13:25:24 -05:00
Joseph MearmanandGitHub cd4e13c2f3 Merge branch 'main' into fix/session-stats-display 2026-01-23 07:01:45 +00:00
kaitranntt 5074122d4a feat(ui): add provider logos for alternative API presets
Add icons for GLM, GLMT (Z.AI), Kimi, Azure Foundry, Minimax, DeepSeek, and Qwen presets.
2026-01-22 16:29:30 -05:00
Kai (Tam Nhu) TranandGitHub 4dc6bbaf4c Merge pull request #354 from jellydn/feat/ollama-provider
feat: add Ollama provider support
2026-01-22 15:21:09 -05:00
kaitranntt 8e29c48c6d fix(presets): make requiresApiKey required boolean, add sentinel docs
- Change requiresApiKey from optional to required boolean in CLI
- Add requiresApiKey: true to all existing presets for consistency
- Document 'ollama' placeholder as sentinel value in code comment
- Add trailing newline to ollama.svg
2026-01-22 15:17:06 -05:00
kaitranntt 3ce698c5fe fix(ollama): align property naming and descriptions
- Change CLI noApiKey to requiresApiKey to match UI convention
- Set apiKey='ollama' instead of empty string for local Ollama
- Align ollama-cloud descriptions between CLI/UI
- Keep https://ollama.com endpoint for direct API access
2026-01-22 15:02:49 -05:00
kaitranntt 2cb77f2dfd feat(ui): add Ollama logo and make API key optional
- Add Ollama SVG logo to ui/public/icons/
- Add icon property to both ollama and ollama-cloud presets
- Make API key field optional for local Ollama (show input with hint)
- Update placeholder: "Optional - only if auth is enabled"
- Allows power users with Ollama auth configured to provide key
2026-01-22 14:24:37 -05:00
kaitranntt 2b7d18c4c6 feat(ui): add Ollama provider presets to dashboard
- Add ollama (local) and ollama-cloud presets to UI provider-presets.ts
- Update profile-create-dialog to handle requiresApiKey: false
- Show "No API Key Required" info box for local Ollama
- Add --api-key ignored warning to CLI for local Ollama preset
- Add ollama-cloud to CLI help text preset list

Fixes edge cases identified in PR review:
- UI dashboard now has parity with CLI Ollama support
- Conditional API key validation in profile creation form
2026-01-22 14:09:59 -05:00
Joseph Mearman c5911dde38 test: add project name display tests
- Add comprehensive tests for getProjectDisplayName function
- Test various path structures including worktrees, nested projects, and edge cases
- Include regression tests for the reported bug cases
- Create separate utility file for better testability

Fixes session stats display where wrong fragments were shown
Related to: #348 (quota display), #103 (context display)
2026-01-22 07:17:38 +00:00
Joseph Mearman 01f96104e6 fix(ui): display correct project names in session stats
Replace session.projectPath.split('/').pop() with getProjectDisplayName()
to ensure the actual leaf folder name is shown instead of incorrect fragments.

Example fixes:
- /home/user/projects/my-app now shows "my-app" instead of "app"
- /home/user/workspaces/repo-name/worktrees/feature-branch now shows "feature-branch" instead of "branch"

Addresses potential issues with project name display in analytics dashboard.

Related to: #348 (quota display), #103 (context display)
2026-01-22 06:38:29 +00:00
Joseph Mearman 8ee87c7452 fix: display correct project names in session stats
Replace session.projectPath.split('/').pop() with getProjectDisplayName()
to ensure the actual leaf folder name is shown instead of incorrect fragments.

Example fixes:
- /home/user/projects/my-app now shows "my-app" instead of "app"
- /home/user/workspaces/repo-name/worktrees/feature-branch now shows "feature-branch" instead of "branch"

Addresses potential issues with project name display in analytics dashboard.

Related to: #348 (quota display), #103 (context display)
2026-01-21 23:14:10 +00:00
kaitranntt ca490a9f4e fix(cliproxy): handle edge cases in thinking validation
- model-catalog: add null guard and trim for modelId lookup
- thinking-validator: add 100 char length limit, accept "8192.0" format
- cliproxy-executor: error on empty --thinking= value
- use-thinking-config: handle HTML error pages, return cleanup fn
2026-01-21 17:52:16 -05:00
kaitranntt 3df6587e8d chore(ui): regenerate lockfile after dependency removal 2026-01-21 17:30:25 -05:00
kaitranntt 4491d9f3d3 chore(deps): remove unused auth dependencies from ui
- Remove bcrypt, express-rate-limit, express-session
- Remove @types/bcrypt, @types/express-session
- Clean up unused server-side auth packages
2026-01-21 17:26:07 -05:00
kaitranntt 19b7a49eee feat(thinking): improve config validation and codex support
- Add shouldShowWarnings() helper for cleaner warning control
- Improve applyThinkingSuffix() regex for accurate suffix detection
- Fix provider_overrides validation for nested tier structure
- Add thinking section to YAML config export with documentation
- Update UI to clarify codex uses reasoning effort levels
- Remove unused setManualOverride hook
2026-01-21 17:25:33 -05:00
kaitranntt eec44d54e2 feat(cliproxy): add model-specific reasoning effort caps
Add maxLevel field to ThinkingSupport interface to cap reasoning
effort at model's maximum supported level. This fixes Issue #344
where gpt-5-mini fails with xhigh reasoning (only supports high).

- Add Codex provider to model catalog with gpt-5.2-codex and gpt-5-mini
- Add capLevelAtMax() and capEffortAtModelMax() for runtime capping
- Update UI presets with new Codex models and tier mappings
2026-01-21 14:27:46 -05:00
kaitranntt 2f584802bd chore(deps): add bcrypt, express-session, express-rate-limit for dashboard auth 2026-01-20 20:20:23 -05:00
kaitranntt 99d164901e Merge remote-tracking branch 'origin/dev' into feat/thinking-flag
Resolve merge conflicts keeping both features:
- thinking: extended thinking/reasoning budget control
- dashboard_auth: dashboard authentication
- backups: config backups section
2026-01-20 20:19:51 -05:00
kaitranntt 1eeb8f922d fix(ui): add spacing between Port label and input field
Changed layout from vertical stack (space-y-1) to horizontal flex
with gap (flex items-center gap-2) to properly space the Port label
and input field in the local proxy settings card.
2026-01-18 15:45:28 -05:00
kaitranntt a019ed2cf8 fix(cliproxy): address PR review issues for backend selection
- Remove duplicate CLIProxyBackend type from platform-detector.ts (import from types.ts)
- Add warning for invalid --backend CLI value (was silently ignored)
- Show toast notification when backend change blocked by running proxy
- Migrate from deprecated CLIPROXY_FALLBACK_VERSION to getFallbackVersion()
- Add comprehensive JSDoc for backend API endpoints
2026-01-18 10:24:53 -05:00
kaitranntt 8ade4a6b26 feat(cliproxy): add backend selection for CLIProxyAPI vs CLIProxyAPIPlus
Add cliproxy.backend config field to choose between CLIProxyAPI (original)
and CLIProxyAPIPlus backends. Includes CLI --backend flag, Dashboard toggle,
and provider validation to block Kiro/ghcp on original backend.
2026-01-18 10:10:01 -05:00
Kai (Tam Nhu) TranandGitHub 126b244b36 Merge pull request #338 from kaitranntt/kai/fix/pause-account-cliproxy-usage
fix(cliproxy): move token files when pausing/resuming accounts
2026-01-15 13:06:50 -05:00
kaitranntt 502b30a589 fix(ui): improve paused account display in Live Account Monitor
- Add Pause icon with amber color for paused accounts
- Show styled "PAUSED" badge instead of plain error text
- Distinguish paused state from other errors visually
2026-01-15 13:04:17 -05:00
kaitranntt 28b0faa0cb feat(dashboard): show projectId warning in Live Account Monitor
Add warning indicator on Antigravity account dots when projectId is
missing. Matches the warning shown in Provider Editor for consistency.
2026-01-15 11:59:41 -05:00
kaitranntt bc02ecc94c fix(dashboard): harden projectId handling with edge case fixes
- Validate empty string projectId with typeof check and trim()
- Include projectId in registerAccount return value
- Update projectId when changed (not just when missing)
- Add aria-hidden/aria-label for accessibility
- Add max-width + truncate for long projectId overflow
2026-01-15 11:46:02 -05:00
kaitranntt ed2ce138e4 feat(dashboard): add project_id display for Antigravity accounts
Display GCP project_id for Antigravity (agy) accounts in the Dashboard:

- Add projectId field to AccountInfo interface (account-manager.ts)
- Read project_id from auth files when discovering/registering accounts
- Pass projectId through token-manager when registering new accounts
- Add projectId to OAuthAccount type (api-client.ts)
- Add projectId to AccountRow type (auth-monitor/types.ts)
- Display project_id in account-item.tsx with FolderCode icon
- Show N/A warning with amber tooltip if project_id is missing
  suggesting user remove and re-add account to fetch it

Note: project_id is read-only and respects privacy mode blur.
2026-01-15 10:49:23 -05:00
kaitranntt 7b80dccdd3 fix(persist): add rate limiting, tests, and code quality improvements
- Add express-rate-limit to restore endpoint (5 req/min)
- Add JSDoc documentation to RestoreMutex class
- Extract magic numbers to named constants in BackupsSection
- Add unit tests for persist-routes.ts (23 tests)
- Add unit tests for BackupsSection component (28 tests)

Addresses PR #339 code review feedback.
2026-01-14 17:59:15 -05:00