1. 25 Apr, 2026 1 commit
    • shaw's avatar
      fix(payment): allow Stripe payment pages to bypass router auth guard · c1b52615
      shaw authored
      Stripe payment routes (/payment/stripe, /payment/stripe-popup) are
      reached via hard navigation (window.location.href), which caused
      the router guard to block access before the page could load.
      Set requiresAuth and requiresPayment to false, consistent with
      /payment/result. Backend API still enforces authentication.
      c1b52615
  2. 24 Apr, 2026 1 commit
  3. 22 Apr, 2026 2 commits
  4. 21 Apr, 2026 3 commits
    • IanShaw027's avatar
      a6b919eb
    • IanShaw027's avatar
      d08757ce
    • erio's avatar
      chore(channels): drop admin-side available channels view · 59290e39
      erio authored
      Remove the admin-side "Available Channels" aggregate view — admins
      already see full channel configuration (groups, pricing, model
      mappings) in the channel edit dialog, making a read-only admin
      aggregate view redundant. The user-side "可用渠道" remains.
      
      Backend:
      - Delete handler/admin/available_channel_handler.go (+ test)
      - Drop AdminHandlers.AvailableChannel field and wire injection
      - Remove /admin/channels/available route
      
      Frontend:
      - Delete views/admin/AvailableChannelsView.vue
      - Drop /admin/available-channels router entry
      - Strip AvailableChannel types + listAvailable from api/admin/channels.ts
      59290e39
  5. 20 Apr, 2026 5 commits
    • erio's avatar
      feat(channels): add "Available Channels" aggregate view · 654cfb64
      erio authored
      Add a read-only aggregate view per channel: its linked groups and a
      deterministic wildcard-free supported-model list with pricing details.
      
      Backend
      - service.Channel.SupportedModels(): combine ModelMapping keys with
        same-platform ModelPricing.Models; trailing "*" keys expand via
        pricing prefix match; platforms without a mapping produce no
        entries (intentional "no mapping = not shown" rule).
      - Extract splitWildcardSuffix() shared with toModelEntry.
      - Build a per-call pricing lookup map (platform+lowerName -> *pricing)
        to avoid O(N*M) scans in SupportedModels.
      - ChannelService.ListAvailable() aggregates channels + active groups;
        filters out group IDs no longer active.
      - Admin route GET /api/v1/admin/channels/available returns the full
        DTO (id, status, billing_model_source, restrict_models, groups,
        supported_models).
      - User route GET /api/v1/channels/available applies three filters:
        Status==active, visible-group intersection, and platform filter
        on supported_models (prevents cross-platform leak when a channel
        links to both a user-accessible group and an inaccessible one on
        another platform). Response is a plain array (matches the
        /groups/available sibling shape). Field whitelist omits
        billing_model_source, restrict_models, ids, status, sort_order.
      
      Frontend
      - New /admin/available-channels and /available-channels views backed
        by a shared AvailableChannelsTable component (admin adds status +
        billing-source columns via slots).
      - PricingRow extracted to its own SFC; SupportedModelChip references
        shared billing-mode constants in constants/channel.ts.
      - Sidebar: new entry above "渠道管理" for admin; matching entry in
        user nav.
      - i18n: zh + en coverage for both namespaces.
      
      Tests
      - SupportedModels: wildcard-only pricing skipped, prefix-matches-
        nothing, cross-platform bleed, case-insensitive dedup, empty
        platform mapping.
      - ListAvailable: nil groupRepo, inactive-group-ID dropped, stable
        case-insensitive name sort.
      - User handler: 401 on unauthenticated, visible-group intersection,
        platform filter on supported_models, JSON whitelist.
      - Admin handler: full DTO including default BillingModelSource
        fallback.
      
      Refs: issue #1729
      654cfb64
    • IanShaw027's avatar
      85fc54b2
    • IanShaw027's avatar
      7ef7fd19
    • erio's avatar
      feat(monitor): admin channel monitor MVP with SSRF protection and batch aggregation · 20a4e418
      erio authored
      新增 admin「渠道监控」模块(参考 BingZi-233/check-cx),独立于现有 Channel 体系。
      admin 配置 + 后台定时调用上游 LLM chat completions 健康检查 + 所有登录用户只读可见。
      
      后端:
      - ent: channel_monitor + channel_monitor_history(AES-256-GCM 加密 api_key)
      - service 按职责拆分:service/aggregator/validate/checker/runner/ssrf
      - provider strategy map 替代 switch(openai/anthropic/gemini)
      - repository batch 聚合(ListLatestForMonitorIDs + ComputeAvailabilityForMonitors)消除 N+1
      - runner: ticker(5s) + pond worker pool(5) + inFlight 防并发 + TrySubmit 防雪崩
        + 凌晨 3 点 cron 清理 30 天历史
      - SSRF 防护:强制 https + 私网/loopback/云元数据 IP 拒绝(127/8、10/8、172.16/12、
        192.168/16、169.254/16、100.64/10、::1、fc00::/7、fe80::/10)+ DialContext
        在 socket 层防 DNS rebinding
      - API key sanitize:擦除 url.Error 与上游响应 body 中的 sk-/sk-ant-/AIza/JWT 模式
      - APIKeyDecryptFailed 标志位 + 单 monitor 路径检测,避免空 key 调用上游
      
      handler:
      - admin: CRUD + 手动触发 + 历史接口(api_key 脱敏)
      - user: 只读列表 + 状态详情(去除 api_key/endpoint)
      - ParseChannelMonitorID 共用 + dto.ChannelMonitorExtraModelStatus 共用
      
      前端:
      - 路由 /admin/channels/{pricing,monitor} + /monitor(用户只读)
      - AppSidebar 父项 expandOnly 支持
      - ChannelMonitorView 拆为 8 个子组件 + ChannelStatusView 拆出 detail dialog
      - composables/useChannelMonitorFormat + constants/channelMonitor 共享
      - i18n monitorCommon namespace 消除 admin/user 两 view 重复
      
      合规:所有文件符合 CLAUDE.md(Go ≤ 500 行 / Vue ≤ 300 行 / 函数 ≤ 30 行)
      CI: go build / gofmt / golangci-lint(0 issues) / make test-unit / pnpm build 全绿
      20a4e418
    • IanShaw027's avatar
      feat: rebuild auth identity foundation flow · e9de839d
      IanShaw027 authored
      e9de839d
  6. 11 Apr, 2026 1 commit
  7. 09 Apr, 2026 1 commit
  8. 05 Apr, 2026 1 commit
    • shaw's avatar
      fix: remove remaining Sora references from frontend · a0729677
      shaw authored
      The previous Sora removal missed several frontend references, causing
      TypeScript build errors for sora_client_enabled and a missing SoraView.vue
      import. Clean up all remaining Sora code from types, router, sidebar,
      settings, store, and accounts API.
      a0729677
  9. 04 Apr, 2026 2 commits
  10. 14 Mar, 2026 1 commit
    • shaw's avatar
      refactor(frontend): 将备份和数据管理页面合并为设置页的标签页 · 616930f9
      shaw authored
      将独立的 /admin/backup 和 /admin/data-management 页面整合到设置页,
      作为「备份」和「Sora 存储」标签页,减少侧边栏条目,集中管理配置。
      
      - 移除 BackupView 和 DataManagementView 的 AppLayout 包装
      - 在 SettingsView 中以子组件形式嵌入,使用 v-show 切换标签
      - 删除独立路由和侧边栏菜单入口
      - 备份/数据标签页下隐藏主保存按钮(各自有独立保存)
      - 优化标签栏样式适配7个标签,PC端支持细滚动条
      - 清理未使用的图标组件和 i18n 键
      616930f9
  11. 13 Mar, 2026 1 commit
    • Rose Ding's avatar
      feat: 数据库定时备份与恢复(S3 兼容存储,支持 Cloudflare R2) · 53ad1645
      Rose Ding authored
      
      
      新增管理员专属的数据库备份与恢复功能:
      - 全量 PostgreSQL 备份(pg_dump),gzip 压缩后上传到 S3 兼容存储
      - 支持手动备份和 cron 定时备份
      - 支持从备份恢复(psql --single-transaction)
      - 备份文件自动过期清理(默认 14 天)
      - 前端完整管理页面(S3 配置、定时配置、备份列表、恢复/下载/删除)
      - 内置 Cloudflare R2 配置教程弹窗
      - Dockerfile 从 postgres 镜像多阶段复制 pg_dump/psql,确保版本一致
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      53ad1645
  12. 11 Mar, 2026 1 commit
    • John Doe's avatar
      feat: add Backend Mode toggle to disable user self-service · 6826149a
      John Doe authored
      
      
      Add a system-wide "Backend Mode" that disables user self-registration
      and self-service while keeping admin panel and API gateway fully
      functional. When enabled, only admin can log in; all user-facing
      routes return 403.
      
      Backend:
      - New setting key `backend_mode_enabled` with atomic cached reads (60s TTL)
      - BackendModeUserGuard middleware blocks non-admin authenticated routes
      - BackendModeAuthGuard middleware blocks registration/password-reset auth routes
      - Login/Login2FA/RefreshToken handlers reject non-admin when enabled
      - TokenPairWithUser struct for role-aware token refresh
      - 20 unit tests (middleware + service layer)
      
      Frontend:
      - Router guards redirect unauthenticated users to /login
      - Admin toggle in Settings page
      - Login page hides register link and footer in backend mode
      - 9 unit tests for router guard logic
      - i18n support (en/zh)
      
      27 files changed, 833 insertions(+), 17 deletions(-)
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      6826149a
  13. 05 Mar, 2026 1 commit
  14. 04 Mar, 2026 1 commit
  15. 02 Mar, 2026 2 commits
  16. 28 Feb, 2026 1 commit
  17. 26 Feb, 2026 1 commit
    • wucm667's avatar
      feat(i18n): 切换语言时同步更新页面标题 · 82fbf452
      wucm667 authored
      - resolveDocumentTitle() 新增 titleKey 参数,优先通过 i18n 翻译
      - router beforeEach 中将路由 meta.titleKey 传入标题解析函数
      - setLocale() 切换语言后同步刷新 document.title
      82fbf452
  18. 14 Feb, 2026 1 commit
  19. 02 Feb, 2026 2 commits
    • song's avatar
      merge upstream main · 0170d19f
      song authored
      0170d19f
    • shaw's avatar
      feat: 重新设计公告系统为Header铃铛通知 · bbdc8663
      shaw authored
      - 新增 AnnouncementBell 组件,支持 Modal 弹窗和 Markdown 渲染
      - 移除 Dashboard 横幅和独立公告页面
      - 铃铛位置在 Header 文档按钮左侧,显示未读红点
      - 支持点击查看详情、标记已读、全部已读等操作
      - 完善国际化,移除所有硬编码中文
      - 修复 AnnouncementTargetingEditor watch 循环问题
      bbdc8663
  20. 30 Jan, 2026 1 commit
    • ducky's avatar
      feat(announcements): add admin/user announcement system · b7f69844
      ducky authored
      Implements announcements end-to-end (admin CRUD + read status, user list + mark read) with OR-of-AND targeting. Also breaks the ent<->service import cycle by moving schema-facing constants/targeting into a new domain package.
      b7f69844
  21. 28 Jan, 2026 1 commit
  22. 24 Jan, 2026 1 commit
    • shaw's avatar
      feat(auth): 密码重置邮件队列化与限流优化 · 9cc83525
      shaw authored
      - 邮件发送改为异步队列处理,避免并发导致发送失败
      - 新增 Email 维度限流(30秒冷却期),防止邮件轰炸
      - Token 验证使用常量时间比较,防止时序攻击
      - 重构代码消除冗余,提取公共验证逻辑
      9cc83525
  23. 16 Jan, 2026 4 commits
    • yangjianbo's avatar
      perf(路由预加载): 修复静态 import 导致入口文件膨胀问题 · b0569d87
      yangjianbo authored
      
      
      问题:
      - 原实现使用静态 import() 映射表
      - Rollup 静态分析时将所有 37 个视图组件引用打包进 index.js
      - 导致首次加载时需要解析大量未使用的 import 语句
      
      修复:
      - 移除静态 import() 映射,改用纯路径字符串邻接表
      - 通过 router.getRoutes() 动态获取组件的 import 函数
      - 延迟初始化 routePrefetch,首次导航时才创建实例
      - 更新测试文件使用 mock router
      
      效果:
      - index.js 中动态 import 引用从 37 个减少到 1 个
      - 首次加载不再包含未使用的视图组件引用
      - 41 个测试全部通过
      Co-Authored-By: default avatarClaude Opus 4.5 <noreply@anthropic.com>
      b0569d87
    • yangjianbo's avatar
      perf(前端): 优化页面加载性能和用户体验 · 92234857
      yangjianbo authored
      
      
      - 添加路由预加载功能,使用 requestIdleCallback 在浏览器空闲时预加载
      - 配置 Vite manualChunks 分离 vendor 库(vue/ui/chart/i18n/misc)
      - 新增 NavigationProgress 导航进度条组件,支持防闪烁和无障碍
      - 集成 Vitest 测试框架,添加 40 个单元测试和集成测试
      - 支持 prefers-reduced-motion 和暗色模式
      Co-Authored-By: default avatarClaude Opus 4.5 <noreply@anthropic.com>
      92234857
    • yangjianbo's avatar
      perf(前端): 优化页面加载性能和用户体验 · 8efa3617
      yangjianbo authored
      
      
      - 添加路由预加载功能,使用 requestIdleCallback 在浏览器空闲时预加载
      - 配置 Vite manualChunks 分离 vendor 库(vue/ui/chart/i18n/misc)
      - 新增 NavigationProgress 导航进度条组件,支持防闪烁和无障碍
      - 集成 Vitest 测试框架,添加 40 个单元测试和集成测试
      - 支持 prefers-reduced-motion 和暗色模式
      Co-Authored-By: default avatarClaude Opus 4.5 <noreply@anthropic.com>
      8efa3617
    • yangjianbo's avatar
      fix(前端路由): 添加 chunk 加载错误自动恢复机制 · c6597880
      yangjianbo authored
      
      
      - 检测动态导入模块加载失败错误
      - 自动刷新页面获取最新资源
      - 使用 sessionStorage 防止无限刷新循环(10秒冷却)
      - 解决前端重新部署后用户缓存导致的加载失败问题
      Co-Authored-By: default avatarClaude Opus 4.5 <noreply@anthropic.com>
      c6597880
  24. 10 Jan, 2026 2 commits
    • Edric Li's avatar
      feat(settings): add home content customization and config injection · 5265b12c
      Edric Li authored
      - Add home_content setting for custom homepage (HTML or iframe URL)
      - Inject public settings into index.html to eliminate page flash
      - Support ETag caching with automatic invalidation on settings update
      - Add Vite plugin for dev mode settings injection
      - Refactor HomeView to use appStore instead of local API calls
      5265b12c
    • long's avatar
      feat: 实现注册优惠码功能 · d2fc14fb
      long authored
        - 支持创建/编辑/删除优惠码,设置赠送金额和使用限制
        - 注册页面实时验证优惠码并显示赠送金额
        - 支持 URL 参数自动填充 (?promo=CODE)
        - 添加优惠码验证接口速率限制
        - 使用数据库行锁防止并发超限
        - 新增后台优惠码管理页面,支持复制注册链接
      d2fc14fb
  25. 09 Jan, 2026 2 commits