Repository navigation
fix(pricing): 修正动态按次计费分类 (#151) - #159
Merged
Merged
Conversation
Port upstream f1569d1 (QuantumNous#8010). Closes #151
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.
🔗 关联任务 / Related Issue
Closes #151
上游提交: QuantumNous@f1569d1
🚀 变更类型 / Type of change
📝 变更描述 / Description
按实际表达式分类动态定价:全部 fixed 叶子归入按次,混合或 token 价格归入 token;任务计费独立分类,解析失败保留旧类别。筛选与侧栏计数复用同一分类函数,沿用现有侧栏组件。
仅移植三个授权文件,patch-id 与上游一致。由 Codex AI 辅助移植和验证;已核对 git 身份 woncc 为历史主要作者。人工审阅由独立 reviewer 完成。
📸 运行证明 / Proof of Work
以下命令在 web/ 中以 GOMAXPROCS=2、RAYON_NUM_THREADS=2 执行:
bun install --frozen-lockfile:成功,锁文件未修改。bun run test src/features/pricing/__tests__/pricing-controls.test.tsx --maxWorkers=1:先仅加入回归测试,5 失败/12 通过;应用修复后 17 全通过。bun run typecheck:退出码 0。bun x oxlint -c .oxlintrc.json src/features/pricing/__tests__/pricing-controls.test.tsx src/features/pricing/components/pricing-sidebar.tsx src/features/pricing/lib/filters.ts:退出码 0。bun run format:check src/features/pricing/__tests__/pricing-controls.test.tsx src/features/pricing/components/pricing-sidebar.tsx src/features/pricing/lib/filters.ts:退出码 1;脚本忽略路径参数并检查全前端,所报文件均未在本补丁修改,三个改动文件无报告。git diff --check:通过。本次为分类与计数行为修复,组件断言覆盖可见计数;未执行浏览器截图、全量测试、生产构建或部署。未改变后端计费、数据库或插件合同。
✅ 提交前检查项 / Checklist