Skip to content

fix(pricing): 修正动态按次计费分类 (#151) - #159

Merged
woncc merged 1 commit into
mainfrom
cursor/upstream-issue-151-f1569d1ea-20261105
Nov 5, 2026
Merged

woncc merged 1 commit into
mainfrom
cursor/upstream-issue-151-f1569d1ea-20261105

Conversation

@woncc

@woncc woncc commented Nov 5, 2026

Copy link
Copy Markdown

🔗 关联任务 / Related Issue

Closes #151

上游提交: QuantumNous@f1569d1

🚀 变更类型 / Type of change

  • 🐛 Bug 修复 (Bug fix)
  • ✨ 新功能 (New feature)
  • ⚡ 性能优化 / 重构 (Refactor)
  • 📝 文档更新 (Documentation)

📝 变更描述 / 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

@woncc
woncc merged commit 63f77e6 into main Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[上游/现在能解] f1569d1ea fix(pricing): classify dynamic per-request billing correctly

1 participant