fix: correct TuiStats size comment, revert cost_cents to u32#132
fix: correct TuiStats size comment, revert cost_cents to u32#132mike1858 merged 1 commit intoPiebald-AI:mainfrom
Conversation
TuiStats is now 40 bytes instead of 48 bytes. The cost_cents does not need widening - it wastes 8 bytes once padding is accounted for. TuiStats only aggregates for Session/Message/Day. u32 for cost_cents supports up to $43M per day, which is more than sufficient (current usage: $177K over 3 months).
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: aac344ca-504a-424a-9dff-92179a7bd20b
📒 Files selected for processing (3)
src/contribution_cache/single_message.rssrc/tui.rssrc/types.rs
Summary
cost_centsfromu64back tou32, saving 8 bytesFixes comment oversight from #130.
Details
TuiStatsis now 40 bytes instead of 48 bytes. WhileTuiStatsdoes aggregate totals per session/day, au32forcost_centssupports up to $43M per day - far beyond realistic usage. For comparison: the user from #129 spent $177K over 3 months.Ref: #129 (comment)
Summary by CodeRabbit
Release Notes