Wesley Liddick
a929e285ce
Merge pull request #2271 from StarryKira/fix/redact-account-credentials
...
fix(security): 屏蔽 admin 账号接口返回的敏感凭证字段
2026-05-19 16:15:36 +08:00
Wesley Liddick
4fa4e372ca
Merge pull request #2568 from wucm667/fix/setup-page-guard-after-init
...
fix(setup): 初始化完成后阻止访问 setup 页面
2026-05-19 16:02:58 +08:00
shaw
90a389342c
fix(openai): 新建账号弹窗补全 Responses API 路由选项
2026-05-19 16:00:15 +08:00
Wesley Liddick
089582d0c7
Merge pull request #2501 from Agoniedi/fix-ops-deeplink-tdz
...
fix: avoid ops deep link initialization error
2026-05-19 15:37:26 +08:00
Wesley Liddick
1b6ed24c33
Merge pull request #2492 from DaydreamCoding/feat/dingtalk-login
...
feat(dingtalk): 钉钉 OAuth 登录接入 + internal_only 用户属性同步
2026-05-19 15:36:13 +08:00
wucm667
a9a357e9ab
fix(setup): 初始化完成后阻止访问 setup 页面
2026-05-19 15:33:02 +08:00
DaydreamCoding
b19da9c7fe
feat(dingtalk): 钉钉 OAuth 登录接入与 internal_only 用户属性同步
...
⚠️ 应用类型约束:当前实现仅支持「钉钉登录-企业内部应用」(DingTalk 开放平台
internal_app 类型)。第三方个人应用、第三方企业应用类型暂不支持——OAuth 流程
相同但 corp 校验、跨企业行为不同。backend 通过 DingTalkAppKind 校验对非
internal_app 类型 fail-closed(硬约束)。
钉钉 OAuth 登录主链
- 4 步 OAuth 链:ExchangeCodeForUserToken / GetUnionIdByUserToken /
GetUserIdByUnionId / GetStaffInfoByUserId;app token 缓存
- pending session 机制持久化 OAuth 中间态;cookie-only token 持久化
- 三种分流:bind_login_required / email_completion / choose_account_action
- corp_restriction_policy 支持 none + internal_only;stale "whitelist" 在
加载层与写入层均静默 coerce 为 none + slog.Warn
- bypass_registration 开关:企业内部模式豁免全局 REGISTRATION_DISABLED
- isReservedEmail / signup_source / canUnbindProvider / OAuth pending flow
等横切点支持 dingtalk provider
- migration 136:4 表 CHECK 约束加入 'dingtalk' provider 值
internal_only 模式同步企业邮箱/姓名/部门到用户属性
- SyncCorpEmail / SyncDisplayName / SyncDept 三个独立开关 + 对应
SyncXxxAttrKey 目标属性 key(默认 dingtalk_email / dingtalk_name /
dingtalk_department);非 internal_only policy 在写入层与加载层均
coerce 为 false,admin handler 与 setting_service 双层兜底
- 同步语义:首次注册写 users.username(昵称优先 → 企业姓名 fallback),
之后每次登录刷新 3 个属性;空值也写入以覆盖旧值
- 邮箱三级 fallback:org_email > email > extension["企业邮箱"]
(钉钉自定义字段 JSON)
- 部门路径递归向上拼接,跳过 dept_id=1 选首个真实子部门,剥离根组织名
- GetUnionIdByUserToken 同时返回 OIDC /contact/users/me 的 nick 字段;
新增 GetDeptInfo 调用 OAPI /topapi/v2/department/get
- AuthHandler 注入 UserAttributeService;OAuth pending flow 在
createPendingOAuthAccount / bindPendingOAuthLogin 分别派发到
AfterRegistration(syncUsername=true)/ AfterLogin
- migration 137 seed dingtalk_email/name/department 三个用户属性定义
附带修复(同集成路径暴露的两个 OAuth 注册回归)
- LoginOrRegisterOAuthWithTokenPair 新建用户分支用 inferLegacySignupSource
覆写 caller 显式传入的 signupSource,导致 dingtalk/linuxdo/oidc/wechat
渠道授权按 email 渠道读取;改为只在 caller 未显式传入时回退邮箱推断
- mergeProviderDefaultGrantSettings 把 parse fallback 默认值
(Concurrency=5 / Balance=0) 当作"未配置"哨兵,admin 显式设 5 时被误判
退回全局默认(复现:全局默认 1 + 渠道默认并发 5 + grant_on_signup → 新
用户实际 concurrency=1);去掉哨兵,admin 任何 >=0 值都覆盖 globalDefaults
前端
- DingTalk Login / Callback / EmailCompletion / ChoiceAccount / Error
视图;router + auth API client
- admin SettingsView:corp policy radio(none / internal_only)+ bypass
注册开关 + i18n;internal_only 下展示三同步开关 + 目标 attr key 下拉
(拉取 user attribute definitions),展示 fieldEmail /
qyapi_get_department_list 钉钉权限申请提示
- Profile:S1 主动绑定 / S5 解绑钉钉按钮 + 合成邮箱防自锁
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 15:27:47 +08:00
DaydreamCoding
664e9fdcd4
feat(usage): 用户用量按平台拆分 + UsersView 列设置可配置 + 用量列排序
...
后端
- BatchUserUsageStats / UserDashboardStats 新增 ByPlatform 字段
复用 ops 路径 COALESCE(g.platform, a.platform) 语义,不冗余 DB 字段
- 抽出 usageLogEffectivePlatformExpr 常量供管理员与用户两路径共用
- GetBatchUsersUsage cacheKey 加 v=2 + 当日日期,修复跨午夜旧缓存兼容新字段
前端
- 新建 PlatformUsageBreakdown:管理员用量列 hover tooltip 展示各平台 today/total
- 新建 PlatformCostCell:单平台 today/total 紧凑单元格
- UsersView 列设置新增 Claude/OpenAI/Gemini/Antigravity 四个平台子列,默认隐藏可手动启用
- 普通用户 Dashboard 新增 Row 3 平台拆分卡片,受 isSimple 控制
- 平台之和 < 总值时显式展示"其他"行,避免数字对不齐
- last_active_at 从 FORCED_VISIBLE_COLUMNS 移除,允许用户隐藏并持久化
- 列设置加 schema 版本号 + 迁移机制,老用户升级时新增默认隐藏列自动应用
- UsersView 用量列(汇总 + 4 平台子列)加入前端单页排序:列头单按钮 + 弹出菜单
切换"今日 / 近30天",三态循环 desc → asc → off;菜单底部备注"仅对本页数据排序"
- sortedUsers computed 在 server-side-sort 结果之上叠加本地排序,缺失值按 0 处理;
usageSort 状态独立 localStorage 持久化,互不干扰后端 sort_by
- i18n 新增 admin.users.sortBy / sortCurrentPageOnly
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 15:25:34 +08:00
Wesley Liddick
6a88e560c2
Merge pull request #2393 from hoobnn/fix/totp-autofill
...
fix: add autocomplete for TOTP autofill support
2026-05-19 15:16:28 +08:00
Wesley Liddick
e9a09d8721
Merge pull request #2395 from imlewc/fix-oidc-compat-email-display
...
fix(auth): prefer OIDC compat email in pending flow
2026-05-19 15:13:55 +08:00
Wesley Liddick
548c71c8bb
Merge pull request #2557 from Arron196/fix/issue-2542-daily-card-expiry-mode
...
fix: 修复日卡跨日重复刷新额度
2026-05-19 14:53:22 +08:00
Wesley Liddick
f05670dd0f
Merge pull request #2454 from wucm667/codex/issue-2426-model-mapping
...
fix(account): 保留模型白名单和模型映射组合配置
2026-05-19 14:50:03 +08:00
Wesley Liddick
e365aae450
Merge pull request #2450 from wucm667/codex/issue-2431-responses-api-support
...
feat: 支持后台配置 OpenAI Responses API 路由
2026-05-19 14:47:10 +08:00
Wesley Liddick
9f1a2c234d
Merge pull request #2448 from wucm667/codex/issue-2334-copy-all
...
fix: 修复兑换码生成后复制全部报错
2026-05-19 14:45:38 +08:00
Wesley Liddick
03473d3ee8
Merge pull request #2554 from Arron196/feature/sync-upstream-models-pr
...
feat: 支持从上游同步账号可用模型列表
2026-05-19 14:42:47 +08:00
Wesley Liddick
c65522641d
Merge pull request #2473 from is7Qin/fix/image-tier-validation
...
fix(channels): 按次/图片计费模式下区间校验跳过 token 上下文重叠规则
2026-05-19 14:28:33 +08:00
Wesley Liddick
082216befc
Merge pull request #2508 from honue/main
...
fix: 修复管理后台分组页可用账号数显示错误
2026-05-19 14:08:00 +08:00
Wesley Liddick
a340002c6d
Merge pull request #2401 from 2ue/fix/normalize-image-billing-size
...
修复图片计费尺寸归一化与使用记录展示
2026-05-19 14:00:24 +08:00
name
ddab7de916
Merge branch 'main' into fix/image-tier-validation
2026-05-19 11:06:17 +08:00
Wesley Liddick
8584b8f7cf
Merge pull request #2504 from yetone/fix-admin-settings-darkmode
...
fix(admin/settings): make tab shell readable in dark mode
2026-05-19 09:55:01 +08:00
Wesley Liddick
e318376e88
Merge pull request #2548 from Arron196/fix/sla-exclude-capacity-errors
...
fix: 统一 Ops SLA 与请求错误统计口径
2026-05-19 09:29:22 +08:00
benjamin
f1cc83e0ee
fix(admin): 修正管理端日卡额度提示
...
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 21:09:11 +08:00
benjamin
a66f771cb1
fix(frontend): 修正用户端日卡额度提示
...
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 21:09:11 +08:00
benjamin
0b40470597
i18n: 增加日卡额度结束文案
...
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 21:09:11 +08:00
benjamin
af6cdfabcc
feat(frontend): 增加订阅配额时间判断工具
...
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 21:09:11 +08:00
benjamin
5713820813
feat: add upstream model sync controls
...
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 19:01:55 +08:00
benjamin
3b4eccdd5d
feat: add upstream model sync frontend API
...
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 19:01:44 +08:00
benjamin
5dae745e86
test: 避免 Ops 图表测试使用保留组件名
...
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 17:12:41 +08:00
benjamin
924e10831a
fix: 更新 Ops 错误分布口径文案
...
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 16:53:16 +08:00
benjamin
09cec311e8
fix: 统一 Ops 请求错误图表 SLA 口径
...
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 16:52:44 +08:00
Yuhao Jiang
1b03240515
fix(payment): 修复支付宝官方扫码二维码生成错误
...
支付宝官方服务商在 precreate(当面付)不可用回退到 page.pay 时,
错误地把网页跳转 URL 当作可扫码二维码内容返回。前端用 QRCode 库
把这段 URL 渲染成二维码后,支付宝 APP 无法识别(扫到的只是个 HTTP
URL,不是支付二维码),用户必须点"重新打开支付页面"跳转到支付宝
收银台才能扫到真正可用的二维码。
- 后端 alipay.go:createPagePayTrade 不再把 PayURL 塞给 QRCode;
createDesktopTrade 在 paymentMode == "redirect" 时跳过 precreate
直接走 page.pay,避免没开通"当面付"的商户走一次无用的 API 调用
- 前端管理端 PaymentProviderDialog:让支付宝官方实例可在"支付模式"
中选择"跳转",开启后始终在新标签页打开支付宝收银台
- ProviderCard 的 modeLabel 增加 redirect 分支
- 补充 TestCreateTradeRedirectModeSkipsPrecreate 单元测试
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 15:01:17 -05:00
haruka
3ca232ad06
fix(frontend): 编辑弹窗回退旧 credentials 结构以兼容旧后端
...
新代码仅依赖 credentials_status 会导致两种灰度场景被误判为未配置:
- 新前端 + 旧后端:旧后端未返回 credentials_status,前端读不到已脱敏的
api_key / service_account_json,阻止保存。
- 旧前端 + 新后端:旧前端也读不到已脱敏字段(旧前端不在本 PR 范围)。
修复:
- API key 判断改为 credentials_status?.has_api_key ?? Boolean(currentCredentials.api_key)
- Vertex SA 判断:有 credentials_status 用 status,否则回退读
credentials.service_account_json / service_account
补充测试覆盖:
- apikey/Vertex SA 各自的新后端脱敏响应、旧后端未脱敏响应、
两者皆缺时阻止保存。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 03:02:08 +08:00
honue
360f8dec1a
fix: 修复管理后台分组页可用账号数显示错误
2026-05-16 11:16:56 +08:00
yetone
b0c7723393
fix(admin/settings): make tab shell readable in dark mode
...
Vue's scoped-CSS compiler was dropping the `:global(.dark) .settings-tabs-shell`
rules in the production build, so the tab strip kept its light-mode white
background and the inactive tab labels (text-gray-300) showed at ~1.6:1
contrast — effectively unreadable.
Hoist the three dark-mode overrides into an unscoped `<style>` block so they
survive the scoped-CSS transform.
2026-05-16 01:00:03 +08:00
Agoniedi
e46d2c2112
fix: avoid ops deep link initialization error
2026-05-15 23:59:51 +08:00
name
b936925c8a
fix(channels): 按次/图片计费模式跳过 token 区间重叠校验
...
image 与 per_request 模式的层级按 tier_label (1K/2K/4K) 匹配,
不依赖 min/max token 范围, 多个层级共用 min=0/max=null 是预期形态。
原校验器一律按 token 上下文分段处理, 新增第二条图片层级时会被
"无上限区间只能是最后一个" 误拦, 导致 OpenAI gpt-image 等模型
无法保存按次定价。
validateIntervals 新增 mode 参数, image / per_request 模式跳过
区间重叠与 last-unlimited 检查, 保留单条 min/max 自洽与价格非负
校验。token 模式行为不变。
2026-05-14 23:48:47 +08:00
wucm667
827764d7bd
fix(account): preserve combined model restrictions
2026-05-14 15:00:28 +08:00
wucm667
862819042c
feat(openai): 支持后台配置 Responses API 路由
2026-05-14 11:46:24 +08:00
wucm667
4d51e53d20
fix(redeem): 修复批量复制兑换码兼容性
2026-05-14 11:35:00 +08:00
2ue
bb4c1abe28
Fix image billing size normalization
2026-05-12 15:21:31 +08:00
imlewc
224e9fc6c2
fix(auth): prefer OIDC compat email in pending flow
2026-05-12 14:35:20 +08:00
hoobnn
4467922199
fix: add autocomplete="one-time-code" for TOTP autofill support
...
Add a hidden input with autocomplete="one-time-code" so password managers
(1Password, Bitwarden, Chrome, Apple Keychain) can detect and auto-fill
TOTP verification codes during 2FA login.
2026-05-12 13:54:41 +08:00
shaw
a07a0dac63
feat: add configurable Antigravity user agent version
2026-05-11 22:25:20 +08:00
shaw
9377c96746
fix: 让消息 cache_control 改写默认关闭
2026-05-11 21:26:41 +08:00
Wesley Liddick
1e2f55078c
Merge pull request #2289 from wucm667/fix/ccswitch-import-model
...
fix(ccswitch): 修复 Codex 导入缺少模型参数
2026-05-11 16:12:47 +08:00
shaw
18cc4691e6
优化系统设置页标签导航
2026-05-11 16:10:40 +08:00
Wesley Liddick
8b0b507a95
Merge pull request #2314 from dexcoder6/fix/payment-result-nan
...
Fix/payment result nan
2026-05-11 11:24:46 +08:00
shaw
b23055af5b
feat: add Airwallex payments and multi-currency support
2026-05-11 11:17:26 +08:00
dexcoder6
ba1c6fa5fd
fix: 修复管理端订单详情充值金额显示 NaN
...
与支付成功页同源问题:fee_rate=0 时后端 omitempty 剔除字段,前端
`fee_rate <= 0` 判断对 undefined 失效,进入除法分支得到 NaN。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 13:47:57 +08:00
dexcoder6
6884b03e59
fix: 修复支付成功页充值金额显示 NaN
...
后端 ent 模型 PaymentOrder.FeeRate 带 omitempty,fee_rate=0 的订单
在 JSON 序列化时该字段会被剔除。前端 baseAmount 计算用 `fee_rate <= 0`
判断走分支,但 `undefined <= 0` 为 false,因此进入除法分支得到 NaN。
将 fee_rate 通过 Number(...) || 0 归一化,使缺失字段等价于 0。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 13:45:49 +08:00