fix: dashboard usage stats flash and disappear (#112) - #115
Conversation
The /focus endpoint now omits `usage` from the response unless ?usage=1
is explicitly requested. Previously, the fast 2s terminal poll returned
usage: { input_tokens: 0, ... } which the client rendered as zeros,
overwriting real values from the slower 30s usage poll.
Server-side: conditionally include usage in focus response
Client-side: guard renderFocusView from writing empty usage (defense-in-depth)
Closes #112
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughVersion 0.8.1 fixes a bug where the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 Tip Rust Clippy can be used to improve the quality of Rust code reviews.Clippy is the official Rust linter. It provides lints to catch common mistakes and improve your Rust code. To configure Clippy, add a See Clippy Documentation for more details. |
Summary
/focusendpoint now omitsusagefrom the JSON response unless?usage=1is explicitly requested. The fast 2s terminal poll no longer returnsusage: { input_tokens: 0, ... }that overwrites real values.renderFocusViewguards against writing empty usage data (defense-in-depth from earlier fix)Closes #112
Test plan
cargo test— 362 tests passcargo clippy— clean🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
/focusendpoint no longer returns usage data by default—add?usage=1to explicitly request it.