Skip to content

Add hourly pace section to usage card and menu#355

Open
johnlarkin1 wants to merge 1 commit intosteipete:mainfrom
johnlarkin1:upstream-pr/hourly-pace-section
Open

Add hourly pace section to usage card and menu#355
johnlarkin1 wants to merge 1 commit intosteipete:mainfrom
johnlarkin1:upstream-pr/hourly-pace-section

Conversation

@johnlarkin1
Copy link

Summary

  • Adds session-level hourly pace indicators to both the usage card (MenuCardView) and the text-based menu (MenuDescriptor)
  • Shows current consumption rate vs. sustainable pace (e.g., "2.1/hr vs 1.5/hr pace") with a colored progress marker
  • Extends UsagePaceText with sessionSummary and sessionDetail methods for session-scoped pace computation

Changes

File Change
MenuCardView.swift Compute + display session pace detail (left/right labels, pace bar)
MenuDescriptor.swift Add pace summary line to text menu
UsagePaceText.swift New sessionSummary/sessionDetail methods
UsagePaceTests.swift Tests for session pace computation
UsagePaceTextTests.swift New test file for text formatting

How it works

The pace calculation divides current session usage by elapsed hours, then compares to the sustainable rate (limit ÷ window hours). The card view renders this as a secondary progress bar overlay, while the text menu shows a one-line summary.

Test plan

  • Builds cleanly on upstream/main (swift build)
  • swift test --filter UsagePaceTests passes
  • swift test --filter UsagePaceTextTests passes
  • Verify pace indicators render correctly in menu card for providers with session windows

🤖 Generated with Claude Code

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.

1 participant