Skip to content

fix(home): label the usage recap control - #432

Merged
chattymin merged 8 commits into
chattymin:mainfrom
Stephan1226:feat/recap-button-label
Oct 24, 2026
Merged

chattymin merged 8 commits into
chattymin:mainfrom
Stephan1226:feat/recap-button-label

Conversation

@Stephan1226

@Stephan1226 Stephan1226 commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Documentation
  • Other:

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.

Before After
Before — sample-data render After — sample-data render

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: main at 07a96fa; after: the responsive layout at 5c9caf1.

State Before After
English, known costs English before — sample-data render crop English after — sample-data render crop
German, known costs German before — sample-data render crop German after — sample-data render crop
German, unavailable costs German unavailable before — sample-data render crop German unavailable after — sample-data render crop

Checklist

  • swift build and swift test pass locally
  • PR title follows Conventional Commits and title/description are written in English
  • UI changes include embedded images (before/after for existing screens; image of a new screen), or there is no visible UI change
  • No copyrighted assets, secrets, or private tooling references are committed (see CONTRIBUTING)
  • Tests were added or updated for this change

Validation:

  • swift build and bash scripts/test-gate.sh passed at e0e92c7 after 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%.
  • CI exposed three English OCR caption failures. The harness now uses en-US for 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.
  • Focused production rendering/localization checks: 7 tests passed. New regressions require complete English/German currency values in individual OCR observations and both German unavailable costs within the popover.
  • Independent production checks: 16 render/click cases passed, including opening the recap.
  • Mutation checks: restoring the old inline row failed 7 assertions; removing the stacked-period fallback failed 3 assertions. Both changes were restored before the final passing run.

notcadenwhitt-stack and others added 2 commits September 21, 2026 14:55
…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.
@chattymin

Copy link
Copy Markdown
Owner

[P3] Keep German unavailable-cost text readable at the default width

A native production PopoverView render at the normal 360 × 604 pt size reproduces a word-wrapping regression with German, reportsCost=true, unavailable costs, and week/month inputs of 1.24M / 9.99M (displayed as 1.2M / 10M):

  • Main control: each cost wraps as Nicht / verfügbar (2 lines).
  • PR head: each cost wraps as Nicht / verfüg / bar (3 lines).

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.

@chattymin
chattymin merged commit c1c92c1 into chattymin:main Oct 24, 2026
2 checks passed
@chattymin

Copy link
Copy Markdown
Owner

Thank you for your contribution!

KillianHzr added a commit to KillianHzr/PokeTokenLBI that referenced this pull request Oct 27, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants