1. 08 Mar, 2026 1 commit
    • bayma888's avatar
      feat(ui): 使用记录页面点击用户邮箱可查看充值记录 · 60c5949a
      bayma888 authored
      - UsageTable 用户邮箱改为可点击链接,点击弹出余额变动记录
      - 复用 UserBalanceHistoryModal 组件,通过 getById API 获取完整用户信息
      - 新增 hideActions prop 隐藏充值/退款按钮(Usage 页面仅查看)
      - i18n: 新增 clickToViewBalance、failedToLoadUser 词条 (en/zh)
      60c5949a
  2. 07 Mar, 2026 4 commits
  3. 06 Mar, 2026 7 commits
  4. 05 Mar, 2026 13 commits
    • erio's avatar
      fix: use HTML-safe expressions for @input handlers in Vue templates · 18f2e214
      erio authored
      Replace `<` comparisons with Math.max/ternary+>= to avoid Vue template
      parser treating `<` as HTML tag start in attribute values.
      18f2e214
    • erio's avatar
    • erio's avatar
      fix: address load_factor code review findings · 12b33f4e
      erio authored
      - Fix bulk edit: send 0 instead of null/NaN to clear load_factor
      - Fix edit modal: explicit NaN check instead of implicit falsy
      - Fix create modal: use ?? instead of || for load_factor
      - Add load_factor upper limit validation (max 10000)
      - Add //go:build unit tag and self-contained intPtrHelper in test
      - Add design intent comments on WaitPlan.MaxConcurrency
      12b33f4e
    • erio's avatar
      fix: validate account status before update and update load factor hint · 01b3a09d
      erio authored
      - Normalize non-standard status (e.g. "error") to "active" on edit load
      - Add pre-submit validation for status field to prevent 400 errors
      - Update load factor hint: "提高负载因子可以提高对账号的调度频率"
      01b3a09d
    • erio's avatar
    • erio's avatar
      refactor: extract QuotaLimitCard component for reuse in create and edit modals · c826ac28
      erio authored
      - Extract quota limit card/toggle UI into QuotaLimitCard.vue component
      - Use v-model pattern for clean parent-child data flow
      - Integrate into both EditAccountModal and CreateAccountModal
      - All apikey accounts (all platforms) now support quota limit on creation
      - Bump version to 0.1.90.6
      c826ac28
    • erio's avatar
      feat: restyle API Key quota limit UI to card/toggle format · 1893b0eb
      erio authored
      - Redesign quota limit section with card layout and toggle switch
      - Add watch to clear quota value when toggle is disabled
      - Add i18n keys for toggle labels and hints (zh/en)
      - Bump version to 0.1.90.5
      1893b0eb
    • erio's avatar
      feat: add quota limit for API key accounts · 05527b13
      erio authored
      - Add configurable spending limit (quota_limit) for apikey-type accounts
      - Atomic quota accumulation via PostgreSQL JSONB operations on TotalCost
      - Scheduler filters out over-quota accounts with outbox-triggered snapshot refresh
      - Display quota usage ($used / $limit) in account capacity column
      - Add "Reset Quota" action in account menu to reset usage to zero
      - Editing account settings preserves quota_used (no accidental reset)
      - Covers all 3 billing paths: Anthropic, Gemini, OpenAI RecordUsage
      
      chore: bump version to 0.1.90.4
      05527b13
    • shaw's avatar
      bab4bb99
    • shaw's avatar
      33bae6f4
    • guoyongchang's avatar
      refactor: 移除冗余中间类型和不必要代码 · 831abf79
      guoyongchang authored
      
      
      - 移除 ScheduledTestOutcome 中间类型,RunTestBackground 直接返回 *ScheduledTestResult
      - 简化 SaveResult 直接接受 *ScheduledTestResult
      - 移除 handler 中不必要的 nil 检查
      - 移除前端 ScheduledTestsPanel 中多余的 String() 转换
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      831abf79
    • guoyongchang's avatar
      feat: 支持基于 crontab 的定时账号测试 · 3a089242
      guoyongchang authored
      
      
      每个测试计划绑定一个账号和一个模型,按 cron 表达式定期执行测试,
      保存历史结果并在前端账号管理页面中提供完整的增删改查和结果查看功能。
      
      主要变更:
      - 新增 scheduled_test_plans / scheduled_test_results 两张表及迁移
      - 后端 service 层:CRUD 服务 + 后台 cron runner(每分钟扫描到期计划并发执行)
      - RunTestBackground 方法通过 httptest 在内存中执行账号测试并解析 SSE 输出
      - Redis leader lock + pg_try_advisory_lock 双重保障多实例部署只执行一次
      - REST API:5 个管理端点(计划 CRUD + 结果查询)
      - 前端 ScheduledTestsPanel 组件:计划管理、启用开关、内联编辑、结果展开查看
      - 中英文 i18n 支持
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      3a089242
    • yangjianbo's avatar
      feat(openai-ws): 合并 WS v2 透传模式与前端 ws mode · 1d0872e7
      yangjianbo authored
      
      
      新增 OpenAI WebSocket v2 passthrough relay 数据面与服务适配层,
      支持按账号 ws mode 在 ctx_pool 与 passthrough 间路由。
      
      同步调整前端 OpenAI ws mode 选项为 off/ctx_pool/passthrough,
      并补充 i18n 文案与对应单测。
      
      新增 Caddyfile.dmit 与 docker-compose-aicodex.yml 部署配置,
      用于宿主机场景下的反向代理与服务编排。
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      1d0872e7
  5. 04 Mar, 2026 3 commits
  6. 03 Mar, 2026 1 commit
    • erio's avatar
      fix(frontend): admin custom menu items not showing in sidebar · 5ba71cd2
      erio authored
      The public settings API filters out menu items with visibility='admin',
      so customMenuItemsForAdmin was always empty when reading from
      cachedPublicSettings. Fix by loading custom menu items from the admin
      settings API (via adminSettingsStore) which returns all items unfiltered.
      
      Changes:
      - adminSettings store: store custom_menu_items from admin settings API
      - AppSidebar: read admin menu items from adminSettingsStore instead of
        cachedPublicSettings
      - CustomPageView: merge public and admin menu items so admin users can
        access admin-only custom pages
      5ba71cd2
  7. 02 Mar, 2026 4 commits
    • erio's avatar
      fix: custom menu security hardening and code quality improvements · bf6fe5e9
      erio authored
      
      
      - Add admin menu permission check in CustomPageView (visibility + role)
      - Sanitize SVG content with DOMPurify before v-html rendering (XSS prevention)
      - Decouple router.go from dto package using anonymous struct
      - Consolidate duplicate parseCustomMenuItems into dto.ParseCustomMenuItems
      - Enhance menu item validation (count, length, ID uniqueness limits)
      - Add audit logging for purchase_subscription and custom_menu_items changes
      - Update API contract test to include custom_menu_items field
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      bf6fe5e9
    • erio's avatar
    • erio's avatar
      feat: custom menu pages with iframe embedding and CSP injection · 067810fa
      erio authored
      
      
      Add configurable custom menu items that appear in sidebar, each rendering
      an iframe-embedded external page. Includes shared URL builder with
      src_host/src_url tracking, CSP frame-src multi-origin deduplication,
      admin settings UI, and i18n support.
      
      chore: bump version to 0.1.87.19
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      067810fa
    • QTom's avatar
      feat(gateway): 双模式用户消息队列 — 串行队列 + 软性限速 · a9285b8a
      QTom authored
      新增 UMQ (User Message Queue) 双模式支持:
      - serialize: 账号级分布式串行锁 + RPM 自适应延迟(严格限流)
      - throttle: 仅 RPM 自适应前置延迟,不阻塞并发(软性限速)
      
      后端:
      - config: 新增 Mode 字段,保留 Enabled 向后兼容
      - service: 新增 UserMessageQueueService(Lua 锁/延迟算法/清理 worker)
      - repository: 新增 UserMsgQueueCache(Redis Lua acquire/release/force-release)
      - handler: 新增 UserMsgQueueHelper(SSE ping + 等待循环 + throttle)
      - gateway: 按 mode 分支集成 serialize/throttle 逻辑
      - lint: 修复 gofmt rewrite rules、errcheck 类型断言、staticcheck QF1012
      
      前端:
      - 三态选择器 UI(关闭/软性限速/串行队列)替代 toggle 开关
      - BulkEdit 支持 null 语义(不修改)
      - i18n 中英文文案
      
      通过 6 轮专家评审(42 次 review)、golangci-lint、单元测试、集成测试。
      a9285b8a
  8. 01 Mar, 2026 6 commits
    • erio's avatar
      feat(dashboard): add group usage distribution chart to usage page · 65459a99
      erio authored
      Add a doughnut chart showing usage statistics broken down by group on
      the admin usage records page. The chart appears alongside the existing
      model distribution chart (2-column grid), with the token usage trend
      chart moved to a separate full-width row below.
      
      Changes:
      - backend/pkg/usagestats: add GroupStat type
      - backend/service: add GetGroupStatsWithFilters interface method and implementation
      - backend/repository: implement GetGroupStatsWithFilters with LEFT JOIN groups
      - backend/handler: add GetGroupStats handler with full filter support
      - backend/routes: register GET /admin/dashboard/groups route
      - backend/tests: add GetGroupStatsWithFilters stubs to contract/sora tests
      - frontend/types: add GroupStat interface
      - frontend/api: add getGroupStats API function and types
      - frontend/components: add GroupDistributionChart.vue doughnut chart
      - frontend/views: update UsageView layout and load group stats in parallel
      - frontend/i18n: add groupDistribution, group, noGroup keys (zh + en)
      65459a99
    • erio's avatar
    • erio's avatar
      fix: use i18n for mixed-channel warning messages and improve bulk pre-check · 3a04552f
      erio authored
      - BulkUpdate handler: add structured details to 409 response
      - BulkUpdateAccounts: simplify to global pre-check before any DB write;
        remove per-account snapshot tracking which is no longer needed
      - MixedChannelError.Error(): restore English message for API compatibility
      - BulkEditAccountModal: use t() with details for both pre-check and 409
        fallback paths instead of displaying raw backend strings
      - Update test to verify pre-check blocks on existing group conflicts
      3a04552f
    • erio's avatar
      fix: handle mixed channel warning for multi-platform bulk edit · dde3b59e
      erio authored
      Previously, preCheckMixedChannelRisk() skipped when selectedPlatforms
      had more than one entry, and the catch block in submitBulkUpdate had no
      409 handling — so multi-platform conflicts just showed a generic error.
      
      - Rename canPreCheck(): only call pre-check API for single-platform
        antigravity/anthropic selections (API requires a single platform param)
      - Pass `built` into preCheckMixedChannelRisk() so pendingUpdatesForConfirm
        is set before returning false
      - submitBulkUpdate: add 409 mixed_channel_warning catch as fallback for
        multi-platform case, saving baseUpdates for retry
      - Remove needsMixedChannelCheck() gate on confirm_mixed_channel_risk flag;
        use mixedChannelConfirmed alone so multi-platform retry also works
      dde3b59e
    • erio's avatar
      fix: bulk edit mixed channel warning not showing confirmation dialog · 947800b9
      erio authored
      The response interceptor in client.ts transforms errors into plain
      objects {status, code, message}, but catch blocks were checking
      error.response?.status (AxiosError format) which never matched.
      
      - Add error field passthrough in client.ts interceptor
      - Refactor BulkEditAccountModal to use pre-check API (checkMixedChannelRisk)
        before submit, matching the single edit flow
      - Fix EditAccountModal catch blocks to use interceptor error format
      - Add bulk-update mixed channel unit tests
      947800b9
    • erio's avatar
      feat: bulk update accounts pre-check mixed channel risk with confirm dialog · 7aa4c083
      erio authored
      - Move mixed channel check before any DB writes in BulkUpdateAccounts
      - Return 409 from BulkUpdate handler for MixedChannelError
      - Add ConfirmDialog to BulkEditAccountModal for mixed channel warning
      - Update mixed channel warning message to Chinese
      7aa4c083
  9. 28 Feb, 2026 1 commit