Repository navigation
feat(quota): show per-window cache hit rate on account cards for 0.12.2 - #50
Merged
Merged
Conversation
Each quota window now carries the cache hit rate for its current period, using the same rule as the report summary: cache reads over the three input buckets, counted only for requests whose buckets are all known. Phone cards append it to the window heading; desktop rows show it under the used percentage. Unknown rates stay hidden instead of reading 0%. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
问题
结果
periodCacheRate,按本周期计算,口径与统计页一致,即缓存读取占普通输入、缓存读取、缓存写入之和的比例,只计三项都已知的请求。没有这类请求时为null,页面整项不显示,不会显示 0%。src/storage/report-index.ts)和明细路径(src/domain/quota.ts)用同一规则,演示数据同步补上。docs/reporting.md补充账户区说明,CHANGELOG.md记入 0.12.2。验证
bun run typecheck通过,bun test tests548 个测试全部通过,bun run build成功。新增测试覆盖缺项请求不计入命中率、新周期没有请求时为null。截图(演示数据,1440px 深色)见维护者本地
test-results/cache-rate-v5-1440.png,视觉已由维护者确认。🤖 Generated with Claude Code