Repository navigation
fix(home): label the usage recap control - #432
Conversation
…ole files On an account with a large Claude Code history (~2GB of session logs in the current month, single files up to 274MB) the cold scan pegged a core for over a minute without finishing, and because the blob cache is keyed on whole-file mtime+size, the active session file was re-parsed from byte zero on every refresh. Three changes: - ISO8601Parser reuses one lock-guarded formatter pair instead of allocating an ISO8601DateFormatter per line (the dominant sampled cost). - parseClaudeFile scans lines at the byte level via Data/FileHandle rather than materializing the file as a String and splitting into Substrings. - Blob records a per-file byte offset; when a file has only grown, only the appended tail is parsed and merged. Same-size or shrunk files are re-read from the start. Older cache files without the key still load. Measured on the history above: cold start ~15s then idle (was 60s+ and never completed), steady-state refresh stays at 0% CPU. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The chart icon was the only way into week, month, and year recaps, and it did not look like a button. Show a short localized label inside a light capsule.
|
[P3] Keep German unavailable-cost text readable at the default width A native production
The added Details capsule compresses the period/cost groups enough to split the word. In this ordinary M-sized case, the period-label words remain intact in both renders, and all numeric values remain visible; this is a readability issue, not data loss or clipping. Expected: preserve word-boundary wrapping at the default popover width. Please adjust the capsule's horizontal space/compression so the unavailable-cost text can retain whole words, and cover this German fixture in the native rendering check. Source: PopoverView.swift:224. |
|
Thank you for your contribution! |
Takes upstream's incremental Claude transcript parsing (chattymin#338) in place of the fork's own fix, keeping only its 1 MB chunked read, plus the Cursor credential refresh (chattymin#455) and the OCR fixture fix (chattymin#456). The fork's Home keeps its round recap button, so chattymin#432's labelled capsule is left out; its tests are adapted to the capitalized card titles.
Summary
The home period row opened week, month, and year recaps through a borderless chart icon that was easy to miss. Give the control a short localized label inside a light capsule, while keeping its full-action tooltip and accessibility label.
Keep each period group intact. Move the recap button below the totals when they do not fit together; stack the week/month groups when longer text such as German unavailable costs needs more room. This prevents split currency values and popover clipping.
Type of change
UI changes
Existing home screen. The original before/after images are sample-data renders of the production popover (
ZeroUsageHomeRenderingTests), Korean, dark, with the same fixture. The inactive test window renders controls gray rather than in the accent color.The following are 2× sample-data crops of the production period row, dark theme, with matching week/month totals of 4.8M / 17.9M. Before:
mainat07a96fa; after: the responsive layout at5c9caf1.Checklist
swift buildandswift testpass locallyValidation:
swift buildandbash scripts/test-gate.shpassed ate0e92c7after integrating fix: parse Claude session logs incrementally instead of re-reading whole files #338: 1,585 tests, 17 skipped, 0 failures; core line coverage 93.77%.en-USfor English renders and keeps chart checks in the original Korean quiet-day fixtures; cost cases still require period labels, complete currency values, and both German unavailable costs.