Repository navigation
refactor(log): 恢复费用气泡并用图标区分订阅来源 - #7451
Merged
Merged
Conversation
Contributor
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Javabcd
pushed a commit
to Javabcd/new-api
that referenced
this pull request
Sep 22, 2026
* refactor(log): restore compact cost bubbles and source icons * Delete .github/pr-previews/usage-log-cost-bubbles.png
GuDong2003
pushed a commit
to GuDong2003/new-api
that referenced
this pull request
Sep 25, 2026
* refactor(log): restore compact cost bubbles and source icons * Delete .github/pr-previews/usage-log-cost-bubbles.png (cherry picked from commit 96b0da2)
TomJKS
pushed a commit
to TomJKS/new-api
that referenced
this pull request
Sep 28, 2026
* refactor(log): restore compact cost bubbles and source icons * Delete .github/pr-previews/usage-log-cost-bubbles.png
meatRoll
pushed a commit
to meatRoll/new-api
that referenced
this pull request
Oct 12, 2026
* refactor(log): restore compact cost bubbles and source icons * Delete .github/pr-previews/usage-log-cost-bubbles.png
xiaolanawaqaq
pushed a commit
to xiaolanawaqaq/new-apiaaa
that referenced
this pull request
Nov 26, 2026
* refactor(log): restore compact cost bubbles and source icons * Delete .github/pr-previews/usage-log-cost-bubbles.png
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
延续 #7450 的费用来源展示调整。
🚀 变更类型 / Type of change
📝 变更描述 / Description
费用栏恢复单行气泡,使用皇冠/钱包图标区分扣费来源,悬停或键盘聚焦显示说明。复用
StatusBadge和Tooltip,金额继续直接显示。管理员视图按系统是否有启用的套餐展示图标;仅自己视图按本人是否有激活订阅展示,过期记录不触发图标。保留订阅实际扣减量、零值及工具附加费标记。
📸 运行证明 / Proof of Work
基于
ea336ed66,以下命令在独立工作树的web/下执行:bun run typecheck:退出码 0。bun run build:退出码 0,生产构建完成。bun run test src/features/usage-logs/components/__tests__/cost-display.test.tsx src/features/usage-logs/components/__tests__/billing-source-visibility.test.tsx src/features/usage-logs/lib/__tests__/billing-source.test.ts src/features/usage-logs/components/__tests__/mobile-card.test.tsxgit diff --check通过。内置浏览器验证真实费用组件的模拟数据预览:图标与金额同排,第五行在来源标识关闭时只显示金额,零扣减显示
$0。✅ 提交前检查项 / Checklist