Repository navigation
feat: 统一渠道配置并分离钱包成本模式 - #949
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
解决的问题与行为变化
渠道管理、利润运维和账号运维合并到「渠道配置」,用可独立展开的面板保留现有表格、时间筛选、下钻、供应商连接及告警配置。选择渠道或下钻账号后,账号规则按该归属筛选;打开配置不运行利润聚合,也不自动探测外站钱包。
新增供应商默认倍率估算;已有记录保持钱包口径。成本模式独立保存,名称、URL 归属编辑不会自动切换成本来源。钱包读数缺失仍显示不可用及时间/原因。
同一窗口和筛选的聚合短时复用,分页和排序在已聚合数据上执行。首次全窗口计算仍有原成本;本 PR 不声称已改善生产百万行首次查询耗时。
最终核对:head
f5f3cd3e426da92a6c98f1a147ce353db564363f,baseproduction/5a51997112d0f93c8ec06747748680a9d7e8e4a7;无阻止合并的 review,全部检查完成。关联记录与来源
production的5a5199711开发,无其他仓库提交引入。管理员新功能提示
channel-configuration-20261119,登记为NEW_FEATURE_NOTICES.channelConfig。f5f3cd3e426da92a6c98f1a147ce353db564363f的前端 CI 已通过。复现与验收
/admin/channel-config,仅渠道面板加载;展开利润、账号面板,前者保留现有汇总表格及下钻,后者保留阈值、分组、通知配置。回归:
ChannelConfigView.spec.ts、profit_operations_cache_test.go、10,000 条合成记录的 PostgreSQL 耗时对照TestProfitOperationsCachedWindowTiming、TestProviderProfitNamingPreservesEstimateUntilWalletOptIn。既有利润、供应商、账号规则测试由 CI 执行。截图使用实际 Vue 页面、合成 Axios 数据及简化 AppLayout。已通过本机 Windows Chrome CDP 核对桌面三个面板、390px 深色布局和独立加载;不代表真实后台认证/生产数据验收。源码及截图固定在528a54964b49d0f188cf72ffeb7559d5ed6798da:利润面板 · 账号面板 · 390px 深色 · 截图范围和浏览器证据
协议、调度或传输改动补充
仅管理员查询/配置 API;不修改模型请求、流式、重试、幂等、调度或冷却。成本模式写入要求 confirm 和 revision;未传 cost_mode 保留原值。相同窗口并发读取合并,失败不缓存,发起者取消会终止查询。
实际验证
git diff --checkfrontend:pnpm exec vitest run src/views/admin/__tests__/ChannelConfigView.spec.ts src/views/admin/__tests__/ProfitOperationsView.spec.ts src/views/admin/__tests__/ProviderProfit.spec.ts src/components/admin/operations/__tests__/SmartOpsNav.spec.ts --maxWorkers=1 --minWorkers=1 --no-file-parallelismpnpm --dir frontend exec vitest run src/views/admin/__tests__/ChannelConfigView.spec.ts src/views/admin/__tests__/AccountOpsView.spec.ts --maxWorkers=1 --minWorkers=1 --no-file-parallelismfrontend:pnpm exec vue-tsc --noEmitTestProfitOperationsCachedWindowTiming,10,000 条合成记录f5f3cd3e4)[2026-11-19T09:45:58Z,2026-11-19T10:45:58Z);原翻页/排序 107.47 / 107.74 ms;复用后 0.168 / 0.160 ms,汇总相同;单次合成环境观测f5f3cd3e4)f5f3cd3e4,2,929 通过 / 10 跳过)f5f3cd3e426da92a6c98f1a147ce353db564363f全部检查兼容性与运行影响
文档与用户可见变化
docs/channel-config/README.md说明入口、成本来源、缓存与回滚边界;中文和英文文案。仅源码 PR,不包含发版或部署。Agent 使用声明
提交前自查