Repository navigation
fix(collector): keep statusline quota flowing past a corrupted line - #16
Merged
Merged
Conversation
A status-line script writing rate-limits.tsv concurrently left a stray "fseven_day" line that its own per-window replacement never removes. The collector rejected the whole file on any unknown line, so 5h and 7d quota stopped updating while usage kept flowing, and the home card showed a three-hour-old 7d 0% and a waiting 5h window. - Ignore unreadable or unknown lines individually and keep valid windows; count them in the collect report. - Log quota source problems in the background sync once when they start and once when they clear, instead of only in the manual collect output. - Keep an expired Fable weekly window as a waiting placeholder while the shared week is active, for up to a week after it ended. Fable only refreshes with Claude Code's usage cache, so it used to vanish. - Add the missing gap between the mobile account list and the trend card. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uota 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.
Problem
A status-line script that caches Claude Code's
rate_limitsinto a TSV can leave a corrupted line such asfseven_day 0 1791100800when several sessions write at once. The collector rejected the whole file on any unknown line, so 5h and 7d quota stopped updating while usage kept flowing. The home card then showed a 7d window at 0% sampled right after the weekly reset, and a waiting 5h window. The background sync log only printed额度 0, so nothing explained why.Two display issues showed up at the same time. On mobile the account list touched the trend card with no gap. The Fable weekly window disappeared once its snapshot expired, because Claude Code only refreshes that value when its usage panel is opened.
Behavior
Verification
bun test tests: 341 pass,bun run typecheckpasses. New tests cover a file with a corrupted line next to valid windows, and the Fable placeholder rules.synclogged状态栏额度: 忽略 1 行无法识别的内容, a repeat logged nothing new, and after removing the line it logged额度来源已恢复正常..mobile-homeand.app-periodwent from 0 to 16px, and an expired Fable window renders asFable · 等待更新 · 12:00 已重置.🤖 Generated with Claude Code