1. 28 Feb, 2026 2 commits
  2. 26 Feb, 2026 1 commit
  3. 25 Feb, 2026 1 commit
  4. 24 Feb, 2026 1 commit
    • erio's avatar
      feat: add mixed-channel precheck API for account-group binding · aaac1aac
      erio authored
      Add a dedicated CheckMixedChannel endpoint that allows the frontend
      to pre-validate mixed channel risk before submitting create/update
      requests. This improves UX by showing warnings earlier in the flow
      instead of only after form submission.
      
      Backend changes:
      - Add CheckMixedChannelRequest struct and CheckMixedChannel handler
      - Register POST /check-mixed-channel route
      - Expose CheckMixedChannelRisk as public method on AdminService
      - Simplify Create/Update 409 responses (remove details/require_confirmation)
      - Add comprehensive handler tests and stub methods
      
      Frontend changes:
      - Add checkMixedChannelRisk API function and TypeScript types
      - Refactor CreateAccountModal to precheck before step transition and submission
      - Refactor EditAccountModal to precheck before update submission
      - Replace pendingPayload pattern with action-based dialog flow
      aaac1aac
  5. 23 Feb, 2026 1 commit
  6. 19 Feb, 2026 1 commit
  7. 14 Feb, 2026 2 commits
    • yangjianbo's avatar
      feat(accounts): 自动刷新改为ETag增量同步并优化单账号更新体验 · 06b0f62e
      yangjianbo authored
      - 前端自动刷新改为 ETag/304 增量合并,减少全量重刷
      
      - 单账号更新后增加静默窗口,避免刚更新即被自动刷新覆盖
      
      - 列表筛选移除时改为待同步提示,不再立即触发全量补页
      
      - 后端账号列表支持 If-None-Match,命中返回 304
      
      - 单账号接口统一补充运行时容量字段并暴露 ETag 头
      06b0f62e
    • yangjianbo's avatar
      fix(accounts): 账号管理改为单行增量更新并避免全量刷新 · 9cafa46d
      yangjianbo authored
      
      
      - 将编辑与重新授权成功事件改为回传更新后的账号对象
      - 在账号列表页按 id 就地补丁更新单行数据并保留运行时容量字段
      - 单账号操作(刷新凭证/清错/清限流/临时不可调度重置)改为单行更新
      - 后端增强 clear-rate-limit 接口,返回更新后的账号对象
      - 同步前端 clearRateLimit API 类型定义
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      9cafa46d
  8. 11 Feb, 2026 1 commit
    • kyx236's avatar
      feat(admin): Add group filtering for account listings · fe1d46a8
      kyx236 authored
      - Add groupID parameter to ListAccounts and ListWithFilters methods
      - Implement account filtering by group ID in repository query
      - Add group query parameter parsing in account handler
      - Update all ListAccounts/ListWithFilters call sites with groupID parameter
      - Add group filter UI component to AccountTableFilters
      - Add i18n translations for group filter label in English and Chinese
      - Update API contract and test stubs to reflect new signature
      - Enable filtering accounts by their assigned groups in admin panel
      fe1d46a8
  9. 09 Feb, 2026 1 commit
    • QTom's avatar
      feat(admin): 新增 CRS 同步预览和账号选择功能 · 5e0d7894
      QTom authored
      - 后端新增 PreviewFromCRS 接口,允许用户先预览 CRS 中的账号
      - 后端支持在同步时选择特定账号,不选中的账号将被跳过
      - 前端重构 SyncFromCrsModal 为三步向导:输入凭据 → 预览账号 → 执行同步
      - 改进表单无障碍性:添加 for/id 关联和 required 属性
      - 修复 Back 按钮返回时的状态清理
      - 新增 buildSelectedSet 和 shouldCreateAccount 的单元测试
      - 完整的向后兼容性:旧客户端不发送 selected_account_ids 时行为不变
      5e0d7894
  10. 07 Feb, 2026 3 commits
    • yangjianbo's avatar
      fix: 修复批量更新凭证明细与缓存TTL抖动 · 4a20a2a8
      yangjianbo authored
      - BatchUpdateCredentials 返回 success/failed/results 及 success_ids/failed_ids
      
      - billing jitteredTTL 改为只减不增,确保TTL不超上界
      
      - crypto/rand 失败时随机ID降级避免 panic
      
      - OpenAI SelectAccount 失败日志去重并补充字段
      
      - 修复两处类型断言以通过 errcheck
      4a20a2a8
    • yangjianbo's avatar
      fix(audit): 第二批审计修复 — P0 生产 Bug、安全加固、性能优化、缓存一致性、代码质量 · 2588fa6a
      yangjianbo authored
      
      
      基于 backend-code-audit 审计报告,修复剩余 P0/P1/P2 共 34 项问题:
      
      P0 生产 Bug:
      - 修复 time.Since(time.Now()) 计时逻辑错误 (P0-03)
      - generateRandomID 改用 crypto/rand 替代固定索引 (P0-04)
      - IncrementQuotaUsed 重写为 Ent 原子操作消除 TOCTOU 竞态 (P0-05)
      
      安全加固:
      - gateway/openai handler 错误响应替换为泛化消息,防止内部信息泄露 (P1-14)
      - usage_log_repo dateFormat 参数改用白名单映射,防止 SQL 注入 (P1-16)
      - 默认配置安全加固:sslmode=prefer、response_headers=true、mode=release (P1-18/19, P2-15)
      
      性能优化:
      - gateway handler 循环内 defer 替换为显式 releaseWait 闭包 (P1-02)
      - group_repo/promo_code_repo Count 前 Clone 查询避免状态污染 (P1-03)
      - usage_log_repo 四个查询添加 LIMIT 10000 防止 OOM (P1-07)
      - GetBatchUsageStats 添加时间范围参数,默认最近 30 天 (P1-10)
      - ip.go CIDR 预编译为包级变量 (P1-11)
      - BatchUpdateCredentials 重构为先验证后更新 (P1-13)
      
      缓存一致性:
      - billing_cache 添加 jitteredTTL 防止缓存雪崩 (P2-10)
      - DeductUserBalance/UpdateSubscriptionUsage 错误传播修复 (P2-12)
      - UserService.UpdateBalance 成功后异步失效 billingCache (P2-13)
      
      代码质量:
      - search 截断改为按 rune 处理,支持多字节字符 (P2-01)
      - TLS Handshake 改为 HandshakeContext 支持 context 取消 (P2-07)
      - CORS 预检添加 Access-Control-Max-Age: 86400 (P2-16)
      
      测试覆盖:
      - 新增 user_service_test.go(UpdateBalance 缓存失效 6 个用例)
      - 新增 batch_update_credentials_test.go(fail-fast + 类型验证 7 个用例)
      - 新增 response_transformer_test.go、ip_test.go、usage_log_repo_unit_test.go、search_truncate_test.go
      - 集成测试:IncrementQuotaUsed 并发测试、billing_cache 错误传播测试
      - config_test.go 补充 server.mode/sslmode 默认值断言
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      2588fa6a
    • erio's avatar
      feat(antigravity): comprehensive enhancements - model mapping, rate limiting, scheduling & ops · 5e98445b
      erio authored
      Key changes:
      - Upgrade model mapping: Opus 4.5 → Opus 4.6-thinking with precise matching
      - Unified rate limiting: scope-level → model-level with Redis snapshot sync
      - Load-balanced scheduling by call count with smart retry mechanism
      - Force cache billing support
      - Model identity injection in prompts with leak prevention
      - Thinking mode auto-handling (max_tokens/budget_tokens fix)
      - Frontend: whitelist mode toggle, model mapping validation, status indicators
      - Gemini session fallback with Redis Trie O(L) matching
      - Ops: enhanced concurrency monitoring, account availability, retry logic
      - Migration scripts: 049-051 for model mapping unification
      5e98445b
  11. 05 Feb, 2026 1 commit
  12. 02 Feb, 2026 2 commits
  13. 24 Jan, 2026 1 commit
    • Ubuntu's avatar
      fix(oauth): 彻底修复 project_id 丢失问题 · 716272a1
      Ubuntu authored
      
      
      根本原因:
      - BuildAccountCredentials 只在 project_id 非空时才添加该字段
      - LoadCodeAssist 失败时返回空字符串 → 新 credentials 不包含 project_id 键
      - 普通合并逻辑只保留新 credentials 中不存在的键,无法覆盖空值
      
      解决方案:
      1. 在合并后特殊处理 project_id:如果新值为空但旧值非空,保留旧值
      2. LoadCodeAssist 失败不再返回错误,只记录警告
      3. Token 刷新成功(access_token 已更新)就不应标记账户为 error
      
      改进效果:
      - 即使 LoadCodeAssist 连续失败,已有的 project_id 也不会丢失
      - 避免因临时网络问题将账户误标记为不可用
      - 允许在下次刷新时自动重试获取 project_id
      Co-Authored-By: default avatarClaude Sonnet 4.5 <noreply@anthropic.com>
      716272a1
  14. 22 Jan, 2026 1 commit
  15. 20 Jan, 2026 1 commit
  16. 19 Jan, 2026 4 commits
  17. 16 Jan, 2026 4 commits
  18. 15 Jan, 2026 1 commit
  19. 14 Jan, 2026 1 commit
    • 墨颜's avatar
      feat(计费): 支持账号计费倍率快照与统计展示 · fb99ceac
      墨颜 authored
      - 新增 accounts.rate_multiplier(默认 1.0,允许 0)
      - 使用 usage_logs.account_rate_multiplier 记录倍率快照,避免历史回算
      - 统计/导出/管理端展示账号口径费用(total_cost * account_rate_multiplier)
      fb99ceac
  20. 09 Jan, 2026 1 commit
    • IanShaw027's avatar
      feat(admin): 添加账号批量调度开关功能 · 5e936fbf
      IanShaw027 authored
      - 后端:支持批量更新账号的 schedulable 字段
        - 在 BulkUpdateAccountsRequest 中添加 schedulable 参数
        - 在 AccountBulkUpdate 中添加 schedulable 字段支持
        - 更新 repository 层批量更新 SQL 逻辑
      - 前端:在账号管理页面添加批量调度控制
        - 新增"批量启用调度"和"批量停止调度"按钮
        - 添加 handleBulkToggleSchedulable 处理函数
        - 显示具体的成功提示信息(包含操作账号数量)
      - 国际化:添加批量调度相关中英文翻译
      - 优化:添加 search 参数标准化和验证(account_handler)
      5e936fbf
  21. 07 Jan, 2026 1 commit
  22. 05 Jan, 2026 3 commits
    • song's avatar
      fix: Antigravity 账户刷新 token 500 错误 · 6fa704d6
      song authored
      AccountHandler.Refresh 方法缺少对 Antigravity 平台的处理分支,
      导致刷新时错误地走进 Claude 刷新逻辑。
      6fa704d6
    • LLLLLLiulei's avatar
      feat: add account notes field · 94750fb6
      LLLLLLiulei authored
      94750fb6
    • Jiahao Luo's avatar
      feat(crs-sync): improve error messages and add private IP allowlist support · 204190f8
      Jiahao Luo authored
      ## Changes
      
      ### 1. Enhanced Error Messages
      - Modified CRS sync error handling to show detailed error messages
      - Changed from generic "internal error" to "CRS sync failed: <details>"
      - Helps diagnose connection issues with private CRS deployments
      
      ### 2. Security Configuration
      - Added SECURITY_URL_ALLOWLIST_ALLOW_PRIVATE_HOSTS environment variable
      - Allows administrators to enable/disable private IP access for CRS sync
      - Production default: false (secure)
      - Test environment default: true (convenient for internal testing)
      
      ### 3. Flexible Configuration Support
      - Added config.yaml mount support in both production and test environments
      - Supports dual configuration methods:
        * config.yaml for detailed/complex configurations
        * Environment variables for quick overrides
      - Priority: ENV vars > config.yaml > defaults
      
      ## Use Case
      Enables CRS sync from internal deployments where CRS resolves to private IPs
      (e.g., 10.x.x.x, 192.168.x.x) while maintaining security by default.
      
      ## Files Modified
      - backend/internal/handler/admin/account_handler.go
      - deploy/docker-compose.yml
      - deploy/docker-compose-test.yml
      204190f8
  23. 04 Jan, 2026 1 commit
    • IanShaw027's avatar
      fix(lint): 修复所有 Go 命名规范问题 · a4953785
      IanShaw027 authored
      - 全局替换 ApiKey → APIKey(类型、字段、方法、变量)
      - 修复所有 initialism 命名(API, SMTP, HTML, URL 等)
      - 添加所有缺失的包注释
      - 修复导出符号的注释格式
      
      主要修改:
      - ApiKey → APIKey(所有出现的地方)
      - ApiKeyID → APIKeyID
      - ApiKeyIDs → APIKeyIDs
      - TestSmtpConnection → TestSMTPConnection
      - HtmlURL → HTMLURL
      - 添加 20+ 个包注释
      - 修复 10+ 个导出符号注释格式
      
      验证结果:
      - ✓ golangci-lint: 0 issues
      - ✓ 单元测试: 通过
      - ✓ 集成测试: 通过
      a4953785
  24. 03 Jan, 2026 1 commit
    • ianshaw's avatar
      feat(admin): 添加临时不可调度功能 · 09da6904
      ianshaw authored
      当账号触发特定错误码和关键词匹配时,自动临时禁用调度:
      
      后端:
      - 新增 TempUnschedCache Redis 缓存层
      - RateLimitService 支持规则匹配和状态管理
      - 添加 GET/DELETE /accounts/:id/temp-unschedulable API
      - 数据库迁移添加 temp_unschedulable_until/reason 字段
      
      前端:
      - 账号状态指示器显示临时不可调度状态
      - 新增 TempUnschedStatusModal 详情弹窗
      - 创建/编辑账号时支持配置规则和预设模板
      - 完整的中英文国际化支持
      09da6904
  25. 01 Jan, 2026 3 commits
    • IanShaw027's avatar
      fix(test): 修复 CI 测试和 lint 错误 · c63192fc
      IanShaw027 authored
      - 为所有 mock 实现添加 GetByIDs 方法以满足 AccountRepository 接口
      - 重构 account_handler.go 中的类型断言,使用类型安全的变量
      - 修复 gofmt 格式问题
      c63192fc
    • IanShaw027's avatar
      test(gemini): 添加 Drive API 和 OAuth 服务单元测试 · 48764e15
      IanShaw027 authored
      - 新增 drive_client_test.go:Drive API 客户端单元测试
      - 新增 gemini_oauth_service_test.go:OAuth 服务单元测试
      - 重构 account_handler.go:改进 RefreshTier API 实现
      - 优化 drive_client.go:增强错误处理和重试逻辑
      - 完善 repository 和 service 层:支持批量 tier 刷新
      - 更新迁移文件编号:017 -> 024(避免冲突)
      48764e15
    • IanShaw027's avatar
      fix(lint): 修复 golangci-lint 检查错误 · 34bbfb5d
      IanShaw027 authored
      - 修复未检查的错误返回值 (errcheck)
      - 移除未使用的 httpClient 字段 (unused)
      - 修复低效赋值问题 (ineffassign)
      - 使用 switch 替代 if-else 链 (staticcheck QF1003)
      - 修复错误字符串首字母大写问题 (staticcheck ST1005)
      - 运行 gofmt 格式化代码
      34bbfb5d