Skip to content

feat: add linear graph view with ideal usage pace indicator#39

Open
quangyendn wants to merge 5 commits intof-is-h:mainfrom
quangyendn:feat/linear-graph
Open

feat: add linear graph view with ideal usage pace indicator#39
quangyendn wants to merge 5 commits intof-is-h:mainfrom
quangyendn:feat/linear-graph

Conversation

@quangyendn
Copy link
Copy Markdown

@quangyendn quangyendn commented Apr 3, 2026

Summary

Add configurable graph display modes (circular/linear) with pace guidance to help users optimize their Claude usage rate and stay within session limits.

image image

Changes

  • Add GraphDisplayType enum with circular and linear options for usage graph display
  • Add graphDisplayType setting to UserSettings with persistence support
  • Implement LinearUsageGraphView component with ideal pace reference line
  • Add graph style picker in GeneralSettingsView
  • Extract reusable helpers to UsageDetailView+Helpers
  • Refactor UsageDetailView to support both circular and linear graphs via usageGraphView(data:) switcher
  • Add localization strings for graph type options in all supported languages (EN, JA, KO, ZH-Hans, ZH-Hant)

Review feedback addressed (from #19)

  • Removed .serena/ directory and contents
  • Reverted .gitignore changes (.claude, CLAUDE.md)
  • Reverted signing config changes (CODE_SIGN_STYLE, CODE_SIGN_IDENTITY) in project.pbxproj
  • Linear view wired into UsageDetailView via usageGraphView(data:) in UsageDetailView+Helpers.swift
  • Rebased onto latest main (v2.6.0) and resolved conflicts

Test plan

  • Project builds successfully with 0 errors, 0 warnings (Release config)
  • Verify the setting persists across app restarts
  • Verify reset to defaults sets graph type to circular
  • Verify localized strings display correctly in all supported languages
  • Verify the graph displays correctly during all sessions

This PR supersedes #19, cleaned up per review feedback.

- Add GraphDisplayType enum with circular/linear cases
- Add graphDisplayType @published property to UserSettings
- Add localization strings for all 5 languages
- Foundation for linear usage graph feature
- Add LinearUsageGraphView component with ideal pace reference line
- Add graph style picker in GeneralSettingsView
- Add localization strings for graph style settings
- Refactor UsageDetailView to support both circular and linear graphs
- Widen graph (262x100pt) to fill container width
- Remove center metrics overlay
- Add percentage labels directly at each data dot
- Add boundary checks to prevent label clipping at edges
- Change empty state to rounded rectangle
Restore original CODE_SIGN_STYLE and CODE_SIGN_IDENTITY settings
to match upstream configuration.
…serSettings

- Add missing closing brace for SettingsGeneralTimeFormat enum
- Add missing closing braces for AppAppearance enum and its switch statement
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