Skip to content

Add model-specific weekly usage tracking with three view modes - #6

Merged
tylergraydev merged 2 commits into
mainfrom
feature/model-specific-usage
Dec 17, 2025
Merged

Add model-specific weekly usage tracking with three view modes#6
tylergraydev merged 2 commits into
mainfrom
feature/model-specific-usage

Conversation

@tylergraydev

Copy link
Copy Markdown
Owner

Summary

  • Add support for model-specific weekly usage limits (Opus, Sonnet) from the API
  • Implement three view modes for the weekly segment:
    • simple: Shows overall weekly usage only (default, existing behavior)
    • detailed: Shows overall, Opus, and Sonnet usage side by side (○47% ◈15% ◇7%)
    • smart: Shows the most restrictive (bottleneck) limit with indicator (○47%▲)
  • Add new symbols: ◈ (Opus), ◇ (Sonnet), ▲ (bottleneck indicator)
  • Add Opus/Sonnet colors to all 6 themes
  • Add 11 new tests (166 total)

Configuration

{
  "weekly": {
    "enabled": true,
    "viewMode": "smart"
  }
}

Display Examples

Mode Example Output
simple ○ 47% (wk 85%)
detailed ○47% ◈15% ◇7%
smart ○47%▲ (wk 85%)

Note: Model-specific limits are only available on certain subscription tiers. When unavailable, they are hidden from the display.

Test plan

  • Run npm run build - compiles without errors
  • Run npm test - all 166 tests pass
  • Test simple mode displays only overall percentage
  • Test detailed mode displays all available limits
  • Test smart mode displays the highest percentage as bottleneck

🤖 Generated with Claude Code

Tyler Gray and others added 2 commits December 17, 2025 17:14
- Parse seven_day_opus and seven_day_sonnet from API response
- Add WeeklyViewMode type: "simple" | "detailed" | "smart"
- Update WeeklyInfo interface with model-specific fields
- Add symbols (◈ Opus, ◇ Sonnet, ▲ bottleneck) to constants
- Add Opus/Sonnet colors to all 6 themes
- Implement three view modes in renderer:
  - simple: Shows overall weekly usage only (default)
  - detailed: Shows all model limits side by side
  - smart: Shows the bottleneck (highest %) with indicator
- Add 11 new tests for model-specific functionality (166 total)
- Update README with viewMode configuration and documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add sevenDayOpus and sevenDaySonnet fields to all mock OAuthUsageResponse
objects in block.test.ts to match the updated interface.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@tylergraydev
tylergraydev merged commit e567e46 into main Dec 17, 2025
3 checks passed
@tylergraydev
tylergraydev deleted the feature/model-specific-usage branch December 17, 2025 22:27
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