Commit Graph

200 Commits

Author SHA1 Message Date
jgor20
ab77db5a90 fix(ui): enhance dashboard quota chart responsiveness and layout 2026-01-11 12:43:45 +00:00
jgor20
aafa636ee5 fix(ui): improve dashboard responsiveness and layout
Adjust grid gaps, padding, and font sizes for better mobile and desktop display; add responsive classes and truncate text for improved usability.
2026-01-11 12:02:31 +00:00
Simon Benedict
e9c6b3c10c Merge pull request #1 from simon-ami/copilot/add-restore-default-clause-button
Add "Restore Default Claude CLI" button to web console settings
2026-01-11 13:01:52 +01:00
copilot-swe-agent[bot]
cd594f6e82 Address code review: use constant array for proxy env vars and clean empty env
Co-authored-by: simon-ami <102378134+simon-ami@users.noreply.github.com>
2026-01-11 11:56:01 +00:00
copilot-swe-agent[bot]
8eba68e47a Add Restore Default Claude CLI button to settings page
Co-authored-by: simon-ami <102378134+simon-ami@users.noreply.github.com>
2026-01-11 11:54:13 +00:00
copilot-swe-agent[bot]
66c80452e3 Initial plan 2026-01-11 11:46:26 +00:00
jgor20
f9dd71f411 feat(ui): add responsive sidebar with mobile toggle and overlay
Implement responsive sidebar functionality that auto-opens on desktop (≥1024px) and auto-closes on mobile, with a toggle button for mobile users. Added overlay for mobile sidebar dismissal and CSS for collapsed state on desktop. Minor adjustments to dashboard chart borders and grid layouts.
2026-01-11 11:26:37 +00:00
jgor20
ed4231310b Refactor dashboard layout, quota logic, and connection status pill 2026-01-11 10:53:58 +00:00
jgor20
5879022dc3 fix: use lightweight /api/config for health checks and simplify UI status logic 2026-01-11 09:46:41 +00:00
Badri Narayanan S
325acdba8c fix: preserve tool_use stop reason from being overwritten by finishReason
When a tool call is made, stopReason is set to 'tool_use'. However, when
finishReason: STOP arrives later, it was overwriting stopReason back to
'end_turn', breaking multi-turn tool conversations in clients like OpenCode.

Fix: Initialize stopReason to null and only set it from finishReason if
not already set. This ensures tool_use is preserved once detected.

Fixes #96

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-11 11:52:35 +05:30
Badri Narayanan S
7b921abb1d fix(webui): remove space before [1m] suffix in Gemini model names
The WebUI was generating model names like "gemini-3-flash [1m]" with a
space before the suffix, causing 404 errors when Claude Code used
sub-agents. Changed to "gemini-3-flash[1m]" (no space).

Fixes #97

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-11 11:16:37 +05:30
Badri Narayanan S
a06cd30f61 Merge pull request #93 from Wha1eChai/feature/webui
fix: address issue #92 and refactor frontend architecture for production readiness
2026-01-11 10:58:40 +05:30
jgor20
c3629d660c fix(webui): prevent duplicate visibility change listeners in health check
Ensure the visibility change event listener for health checks is set up only once
and properly removed on destroy to avoid memory leaks and duplicate handlers.
2026-01-10 22:58:11 +00:00
jgor20
69440584fd feat(webui): add health check monitoring for connection status
Implement periodic health checks every 15 seconds to monitor connection status,
pausing when the tab is hidden and resuming on visibility. Update UI bindings
to use data store for connection status instead of global store. Add destroy
method to clean up timers on component teardown.
2026-01-10 22:41:15 +00:00
Wha1eChai
14ef814c1a merge: sync with upstream/main (5xx error fallback feature) 2026-01-11 02:57:59 +08:00
Wha1eChai
bda9623f3a feat(webui): optimize CSS build system and enhance UI quality 2026-01-11 02:57:42 +08:00
Wha1eChai
a56bc06cc1 feat(webui): add Tailwind build system and refactor frontend architecture
- Replace Tailwind CDN with local build (PostCSS + autoprefixer + daisyui)

- Add CSS build scripts with automatic prepare hook on npm install

- Create account-actions.js service layer with unified response format

- Extend ErrorHandler.withLoading() for automatic loading state management

- Add skeleton screens for initial load, silent refresh for subsequent updates

- Implement loading animations for async operations (buttons, modals)

- Improve empty states and add ARIA labels for accessibility

- Abstract component styles using @apply (buttons, badges, inputs)

- Add JSDoc documentation for Dashboard modules

- Update README and CLAUDE.md with development guidelines
2026-01-11 02:11:35 +08:00
Badri Narayanan S
6868bf217c Merge pull request #47 from Wha1eChai/feature/webui
feat: Add Web UI for account and quota management
2026-01-10 22:21:57 +05:30
Badri Narayanan S
c6edb1e507 Merge pull request #90 from tiagonrodrigues/fix/fallback-on-5xx-errors
feat: fallback to alternate model when max retries exceeded with 5xx errors
2026-01-10 20:23:42 +05:30
Tiago Rodrigues
0b477c2552 feat: fallback to alternate model when max retries exceeded with 5xx errors
When all accounts fail with HTTP 500/503 errors (e.g., Google API returning
'Unknown Error' for Claude models on large conversations), the proxy now
attempts to use a fallback model if --fallback is enabled.

This enables graceful degradation when:
- All accounts are exhausted due to 5xx errors (not just rate limits)
- Claude models fail on very large conversations
- The API has temporary issues with specific models

The fallback uses the existing MODEL_FALLBACK_MAP configuration:
- claude-opus-4-5-thinking -> gemini-3-pro-high
- claude-sonnet-4-5-thinking -> gemini-3-flash

Relates to #88
2026-01-10 12:08:53 +00:00
Wha1eChai
ee6d222e4d feat(webui): add subscription tier and quota visualization
Backend:
2026-01-10 06:05:17 +08:00
Wha1eChai
369a66e8cf Merge branch 'main' into feature/webui 2026-01-10 04:46:30 +08:00
Wha1eChai
71c7c2e423 feat(webui): enhance settings UI, persistence and documentation
- Update CLAUDE.md with comprehensive WebUI architecture and API documentation
- Improve settings UI with searchable model dropdowns and visual family indicators
- Migrate usage statistics persistence to user config directory with auto-migration
- Refactor server request handling and fix model suffix logic
2026-01-10 04:22:59 +08:00
Badri Narayanan S
ce2cb72563 docs: add custom port instructions to README
Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-10 01:13:56 +05:30
Badri Narayanan S
e0e72ec5d2 add schema sanitizer to test suite, fix interleaved thinking test
- Add test-schema-sanitizer.cjs to run-all.cjs test runner
- Add test:sanitizer npm script for running it individually
- Update test to use renamed cleanSchema function
- Fix interleaved thinking test to not require thinking blocks after
  tool result (model decides when to use visible thinking)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-10 00:47:47 +05:30
Badri Narayanan S
f1e945a7e6 change cleanSchemaForGemini to cleanSchema 2026-01-10 00:35:50 +05:30
Badri Narayanan S
e4145ad277 Merge pull request #83 from tiagonrodrigues/fix/issue-82-schema-type-conversion
fix: convert schema types to Google uppercase format (fixes #82)
2026-01-10 00:34:35 +05:30
Tiago Rodrigues
90214c43b0 fix: convert schema types to Google uppercase format (fixes #82)
The /compact command was failing with 'Proto field is not repeating,
cannot start list' error for Claude models because tool schemas were
sent with lowercase JSON Schema types (array, object, string) but
Google's Cloud Code API expects uppercase protobuf types (ARRAY,
OBJECT, STRING).

Changes:
- Add toGoogleType() function to convert JSON Schema types to Google format
- Add Phase 5 to cleanSchemaForGemini() for type conversion
- Apply cleanSchemaForGemini() for ALL models (not just Gemini) since
  all requests go through Cloud Code API which validates schema format
- Add comprehensive test suite with 10 tests covering nested arrays,
  complex schemas, and real-world Claude Code tool scenarios

Fixes #82
2026-01-09 18:36:19 +00:00
Wha1eChai
98685241e8 feat(webui): update README with comprehensive documentation for WebUI features and usage 2026-01-09 23:22:28 +08:00
Wha1eChai
48ad476b5f feat(dashboard): comprehensive filter enhancement and UI layout fixes
- Add time range selector (1H/6H/24H/7D/All) with preference persistence
- Implement smart X-axis label formatting for multi-day usage data
- Standardize global component spacing and fix CSS @apply limitations
- Add elegant empty state UI for charts when filtered data is absent
- Update i18n translations for all new dashboard features
2026-01-09 22:33:11 +08:00
Wha1eChai
40d3d3f3b6 feat(webui): improve UI display logic for models and accounts pages 2026-01-09 21:48:55 +08:00
Wha1eChai
8e221e3fc7 feat(webui): optimize frontend terminology and i18n keys 2026-01-09 19:59:32 +08:00
Badri Narayanan S
348fdc3f94 Merge pull request #75 from ahmed0magdy/main
docs: add instructions for running multiple Claude Code instances
2026-01-09 17:04:58 +05:30
Wha1eChai
07a9586aee feat(webui): add MCP CLI toggle and Gemini [1m] suffix settings
- Add ENABLE_EXPERIMENTAL_MCP_CLI toggle in Claude CLI settings (default: true)

- Add Gemini 1M Context Mode toggle for [1m] suffix (default: true)

- Auto-apply [1m] suffix to existing Gemini model configurations

- Add i18n translations for both features (English and Chinese)
2026-01-09 18:34:24 +08:00
Wha1eChai
169e18402f merge: sync with origin/feature/webui after upstream merge 2026-01-09 18:23:52 +08:00
Wha1eChai
f2f0a7452e merge: integrate upstream/main (v1.2.15) into feature/webui
- Resolved conflict in src/constants.js: kept config-driven approach

- Adopted upstream 10-second cooldown default

- Added MAX_EMPTY_RESPONSE_RETRIES constant from upstream

- Incorporated new test files and GitHub issue templates
2026-01-09 18:08:45 +08:00
Wha1eChai
a914821d49 perf(webui): refactor dashboard modules and optimize API performance 2026-01-09 17:58:09 +08:00
Badri Narayanan S
4c5236d4b3 fix: filter Antigravity system prompt from model responses
- Add [ignore] tags around system instruction to prevent model from
  identifying as "Antigravity" when asked "Who are you?"
- Replace full system instruction with minimal version used by
  CLIProxyAPI/gcli2api to reduce token usage and improve response quality

Fixes #76

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-09 14:10:41 +05:30
Badri Narayanan S
c49d94ae0d chore: add GitHub issue templates for bug reports and feature requests
Adopts issue template pattern from opencode-antigravity-auth:
- Bug report template with [BUG] prefix and 6-item checklist
- Feature request template with [FEATURE] prefix
- Config disables blank issues, adds links to Google Cloud Support, TOS, and Discussions

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-09 13:46:04 +05:30
Wha1eChai
e909ea6fe3 style(webui): refine UI polish and enhance component interactions 2026-01-09 07:54:50 +08:00
Wha1eChai
40a766ded6 feat(webui): Add Models tab and refactor model configuration
- Add standalone Models tab with real-time quota/status display
- Move model identity table from Dashboard to Models tab
- Slim down Dashboard to KPI cards and charts only
- Dashboard charts now use unfiltered data (independent of Models filters)

Settings > Models improvements:
- Remove redundant Alias column (only Mapping is functional)
- Fix column misalignment bug (empty td)
- Add column widths and hidden row opacity styling
- Single row edit constraint (only one Mapping editable at a time)
- showHiddenModels toggle now only affects Settings (not Models tab)
- Update description text to match current functionality

i18n:
- Add 'models' and 'modelsPageDesc' keys (EN/ZH)
- Add 'modelMappingHint' for Claude CLI guidance
- Update 'modelsDesc' to reflect new functionality
2026-01-09 04:39:05 +08:00
Wha1eChai
a4814b8c34 feat(webui): refactor settings architecture and achieve full i18n coverage 2026-01-09 03:04:10 +08:00
ahmed0magdy
e3be630bfb docs: add instructions for running multiple Claude Code instances 2026-01-08 20:41:05 +02:00
Badri Narayanan S
73e5d13f45 Merge pull request #72 from s21v1d9p/fix/optimistic-rate-limit-retry
fix: add optimistic reset for transient 429 rate limit errors
2026-01-08 22:27:01 +05:30
SvDp
45755bfa18 fix: add optimistic reset for transient 429 rate limit errors
Fixes issue #71 - 'No accounts available' error when API returns 429

The Google Cloud Code API can return 429 RESOURCE_EXHAUSTED errors even
when accounts have quota available due to:
- Temporary API load/throttling
- Per-minute request limits (not per-day quota)
- Transient backend issues

This fix adds:
1. A 500ms buffer after waiting for rate limits to expire
2. Optimistic rate limit reset when all accounts appear stuck
3. Retry logic that clears rate limits and tries again

The fix works in conjunction with the server-level optimistic reset
that already exists, providing multiple layers of protection against
false 'No accounts available' errors.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-08 21:31:50 +05:30
Wha1eChai
c9c5e7d486 feat(webui): add hot-reload account management with OAuth support 2026-01-08 23:52:31 +08:00
Badri Narayanan S
5f6ce1b97d Update daily Cloud Code endpoint to production URL
Remove sandbox subdomain from daily-cloudcode-pa endpoint.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-08 20:24:23 +05:30
Wha1eChai
dc9bea1100 feat(webui): comprehensive UI modernization and server configuration enhancements 2026-01-08 22:18:04 +08:00
Wha1eChai
a7aacdb0ae feat(webui): enhance server configuration and dynamic dashboard analytics 2026-01-08 22:15:03 +08:00
Badri Narayanan S
def3d90581 Add [1m] suffix to gemini 2026-01-08 18:30:54 +05:30