Repository navigation
feat: return to the current period from usage recaps - #367
Merged
chattymin merged 35 commits intoOct 5, 2026
Merged
Conversation
The previous/next chevrons were plain-style buttons whose only hittable area was the ~7x12pt glyph, so clicks often missed. Give each a 28pt square hit target via contentShape while keeping the glyph position unchanged, add a synthesized-click regression test, and record the icon-only plain button class in the defect log. Fixes chattymin#379 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GqeQ2gWkEa5Rdvki72naJF
Add a native tooltip ("X / Y · Z%") to the evolution/graduation and egg
hatch progress bars in CompanionHeader, backed by a pure
CompanionStore.progressDetail(used:total:) helper so both bars share
the same clamping/formatting logic.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It is pure display formatting with no store state, so it belongs with the view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replaces the tooltip. The bars rest at the original 6pt; hovering 300 ms springs them to 12pt with a small overshoot and fades in "X / Y · Z%" centered inside. Leaving shrinks them back. The 12pt height is always reserved, so hovering never shifts the layout or resizes the popover. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sets Official limits are an account property, but the popover reaches them only through a provider snapshot. Week and month totals reset at their calendar boundaries, so a provider used last Friday has week = month = 0 on Monday (or after the 1st) and lost its tab and its limits section while the limits were being fetched fine (chattymin#336). Track the newest positive-token entry (lastUsage) in the shared ProviderEnrichment.local and keep the snapshot while it is within the 7-day weekly quota window. Zero-token synthetic records do not count. Extend enrichmentScanStart to cover the window and keep snapshots in provider registration order, since carriers arrive in task-completion order.
# Conflicts: # Sources/PokeTokenBar/Core/UsageStore.swift # docs/reference/defect-log.md
# Conflicts: # docs/reference/defect-log.md
# Conflicts: # docs/reference/defect-log.md
# Conflicts: # docs/reference/defect-log.md
# Conflicts: # docs/reference/defect-log.md
# Conflicts: # Sources/PokeTokenBar/UI/CompanionView.swift
# Conflicts: # Sources/PokeTokenBar/UI/CompanionView.swift
# Conflicts: # Tests/PokeTokenBarTests/UsageRecapTests.swift
# Conflicts: # Tests/PokeTokenBarTests/UsageStoreTests.swift # docs/reference/defect-log.md
# Conflicts: # docs/reference/defect-log.md
# Conflicts: # docs/reference/defect-log.md
8 of 10 tasks
donky-ey
pushed a commit
to donky-ey/PokeDexBar
that referenced
this pull request
Oct 15, 2026
…min#367) Browsing back through recap history took the same number of clicks to get home. A center button jumps to the current week/month/year and is disabled while already there.
Strongorange
added a commit
to Strongorange/PokeTokenBar-windows
that referenced
this pull request
Oct 19, 2026
Port macOS chattymin#332 core: UsageLedger keeps day-by-day totals across months with monotonic-max merges (a rotated log cannot erase a day that really happened) and covered-since semantics that separate a real zero from an unrecorded day. RecapPeriod models whole calendar weeks/months/years — weeks start on Sunday, the same rule as the week totals and the year heatmap grid, exposed as one named culture so all three switch together. UsageRecap.Make computes buckets (days, or months in the year view), totals, the same-days comparison for running periods, best day, streaks, active/counted days, in-period graduations and the canGoBack bound. Recap strings ported for the seven app languages (chattymin#367/chattymin#368 included).
Strongorange
added a commit
to Strongorange/PokeTokenBar-windows
that referenced
this pull request
Oct 19, 2026
The refresh background path merges the 365-day series into the ledger (single-flight serialized, mutated under the service gate; the recap reads a copy), prunes to this year plus last year for the year-over-year comparison, and writes usage-ledger.json atomically only when the merge changed anything. A corrupt ledger is moved to .corrupt and recording starts fresh. RecapQuery turns a ledger snapshot into the window's view model: period titles and bucket labels per scope and language, the chattymin#368 tooltips (exact tokens / a real zero / no data), the same-days compare note, current-period label (chattymin#367), stats lines and in-period graduates.
Strongorange
added a commit
to Strongorange/PokeTokenBar-windows
that referenced
this pull request
Oct 19, 2026
Opens from the usage tab's week/month row, which now stays visible on quiet days too (a fresh install can open its recap before the first token). Single-instance window with Fluent chrome: scope segments (week/month/year), previous / current (chattymin#367) / next navigation where offset never goes positive, Esc and arrow keys, live re-render on every refresh, and a clipboard summary (PNG export deferred). The card itself is the deliberate Pokédex readout from the original app — fixed explicit palette (red shell, dark LCD, 8-block meters with exact-token tooltips distinguishing used/zero/no-data), so the recap stays a device rather than a third analytics chart; the graduate strip reuses the form-aware sprites.
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.
Summary
Add a current-period shortcut between Previous and Next in Usage recap. Its label follows the selected scope: This week, This month, or This year. Clicking it resets the period offset without changing scope; it stays in place but is disabled when already showing the current period.
Week/month labels reuse the existing translations. The year label is localized in all seven supported languages through
L.recapCurrentPeriod.Type of change
UI changes
Clicking This month returns to September, keeps Month selected, and disables the current-period shortcut and Next:
Native SwiftUI/AppKit captures use isolated fixtures.
Validation
GitHub reports the workflow run as completed successfully and all build/test steps passed; the PR build-test check still displays pending as of this update.
GitHub CI passed: build, test + coverage gate, and secret scan. The suite ran 1,381 tests with 14 skipped and zero failures, including the new regression test.
swift buildpassed locally.In a native SwiftUI/AppKit host with an isolated save and UserDefaults suite, navigated two periods back in Week, Month, and Year, pressed the actual shortcut, and verified the shortcut and Next were disabled again. The selected scope remains unchanged.
Native accessibility checks passed for all 21 language/scope combinations, including translated button labels, non-overlapping navigation controls, and the disabled current-period shortcut.
Added localization coverage for all three scopes in all seven supported languages.
./scripts/test-gate.shwas attempted, but this Mac's Command Line Tools cannot importXCTest. The full test suite passed in GitHub CI.git diff --checkpassed.Checklist
swift buildandswift testpass locally