Skip to content

V3.0.2#87

Merged
Maciek-roboblog merged 33 commits intomainfrom
v3.0.2
Jul 14, 2025
Merged

V3.0.2#87
Maciek-roboblog merged 33 commits intomainfrom
v3.0.2

Conversation

@Maciek-roboblog
Copy link
Owner

🚨 Breaking Changes

  • Package Name Change: Renamed from claude-usage-monitor to claude-monitor
    • New installation: pip install claude-monitor or uv tool install claude-monitor
    • New command aliases: claude-monitor and cmonitor
  • Python Requirement: Minimum Python version raised from 3.8 to 3.9
  • Architecture Overhaul: Complete rewrite from single-file to modular package structure
  • Entry Point Changes: Module execution now via claude_monitor.__main__:main

🏗️ Complete Architectural Restructuring

  • 📁 Professional Package Layout: Migrated to src/claude_monitor/ structure with proper namespace isolation
    • Replaced single claude_monitor.py file with comprehensive modular architecture
    • Implemented clean separation of concerns across 8 specialized modules
  • 🔧 Modular Design: New package organization:
    • cli/ - Command-line interface and bootstrap logic
    • core/ - Business logic, models, settings, calculations, and pricing
    • data/ - Data management, analysis, and reading utilities
    • monitoring/ - Real-time session monitoring and orchestration
    • ui/ - User interface components, layouts, and display controllers
    • terminal/ - Terminal management and theme handling
    • utils/ - Formatting, notifications, timezone, and model utilities
  • ⚡ Enhanced Performance: Optimized data processing with caching, threading, and efficient session management

🎨 Rich Terminal UI System

  • 💫 Rich Integration: Complete UI overhaul using Rich library for professional terminal interface
    • Advanced progress bars with semantic color coding (🟢🟡🔴)
    • Responsive layouts with proper terminal width handling (80+ characters required)
    • Enhanced typography and visual hierarchy
  • 🌈 Improved Theme System: Enhanced automatic theme detection with better contrast ratios
  • 📊 Advanced Display Components: New progress visualization with burn rate indicators and time-based metrics

🔒 Type Safety and Validation

  • 🛡️ Pydantic Integration: Complete type safety implementation
    • Comprehensive settings validation with user-friendly error messages
    • Type-safe data models (UsageEntry, SessionBlock, TokenCounts)
    • CLI parameter validation with detailed feedback
  • ⚙️ Smart Configuration: Pydantic-based settings with last-used parameter persistence
  • 🔍 Enhanced Error Handling: Centralized error management with optional Sentry integration

📈 Advanced Analytics Features

  • 🧮 P90 Percentile Calculations: Machine learning-inspired usage prediction and limit detection
  • 📊 Smart Plan Detection: Auto-detection of Claude plan limits with custom plan support
  • ⏱️ Real-time Monitoring: Enhanced session tracking with threading and callback systems
  • 💡 Intelligent Insights: Advanced burn rate calculations and velocity indicators

🔧 Developer Experience Improvements

  • 🚀 Modern Build System: Migrated from Hatchling to Setuptools with src layout
  • 🧪 Comprehensive Testing: Professional test infrastructure with pytest and coverage reporting
  • 📝 Enhanced Documentation: Updated troubleshooting guide with v3.0.0-specific solutions
  • 🔄 CI/CD Reactivation: Restored and enhanced GitHub Actions workflows:
    • Multi-Python version testing (3.9-3.12)
    • Automated linting with Ruff
    • Trusted PyPI publishing with OIDC
    • Automated version bumping and changelog management

📦 Dependency and Packaging Updates

  • 🆕 Core Dependencies Added:
    • pydantic>=2.0.0 & pydantic-settings>=2.0.0 - Type validation and settings
    • numpy>=1.21.0 - Advanced calculations
    • sentry-sdk>=1.40.0 - Optional error tracking
    • pyyaml>=6.0 - Configuration file support
  • ⬆️ Dependency Upgrades:
    • rich: >=13.0.0>=13.7.0 - Enhanced UI features
    • pytz: No constraint → >=2023.3 - Improved timezone handling
  • 🛠️ Development Tools: Expanded with MyPy, Bandit, testing frameworks, and documentation tools

🎯 Enhanced User Features

  • 🎛️ Flexible Configuration: Support for auto-detection, manual overrides, and persistent settings
  • 🌍 Improved Timezone Handling: Enhanced timezone detection and validation
  • ⚡ Performance Optimizations: Faster startup times and reduced memory usage
  • 🔔 Smart Notifications: Enhanced feedback system with contextual messaging

🔧 Installation and Compatibility

  • 📋 Installation Method Updates: Full support for uv, pipx, and traditional pip installation
  • 🐧 Platform Compatibility: Enhanced support for modern Linux distributions with externally-managed environments
  • 🛣️ Migration Path: Automatic handling of legacy configurations and smooth upgrade experience

📚 Technical Implementation Details

  • 🏢 Professional Architecture: Implementation of SOLID principles with single responsibility modules
  • 🔄 Async-Ready Design: Threading infrastructure for real-time monitoring capabilities
  • 💾 Efficient Data Handling: Optimized JSONL parsing with error resilience
  • 🔐 Security Enhancements: Secure configuration handling and optional telemetry integration

Repository owner deleted a comment from coderabbitai bot Jul 13, 2025
@coderabbitai
Copy link

coderabbitai bot commented Jul 13, 2025

Warning

Rate limit exceeded

@Maciek-roboblog has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 8 minutes and 11 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 39a3b2f and 1c8b2ab.

⛔ Files ignored due to path filters (1)
  • doc/scnew.png is excluded by !**/*.png
📒 Files selected for processing (70)
  • .coderabbit.yaml (0 hunks)
  • .github/workflows/lint.yml (1 hunks)
  • .github/workflows/release.yml (1 hunks)
  • .github/workflows/test.yml (1 hunks)
  • .github/workflows/version-bump.yml (1 hunks)
  • .gitignore (1 hunks)
  • .pre-commit-config.yaml (1 hunks)
  • .ruff.toml (0 hunks)
  • .vscode/settings.json (0 hunks)
  • CHANGELOG.md (3 hunks)
  • DEVELOPMENT.md (1 hunks)
  • README.md (22 hunks)
  • RELEASE.md (1 hunks)
  • TODO.md (0 hunks)
  • TROUBLESHOOTING.md (1 hunks)
  • VERSION_MANAGEMENT.md (1 hunks)
  • claude_monitor.py (0 hunks)
  • pyproject.toml (1 hunks)
  • src/claude_monitor/__init__.py (1 hunks)
  • src/claude_monitor/__main__.py (1 hunks)
  • src/claude_monitor/_version.py (1 hunks)
  • src/claude_monitor/cli/__init__.py (1 hunks)
  • src/claude_monitor/cli/bootstrap.py (1 hunks)
  • src/claude_monitor/cli/main.py (1 hunks)
  • src/claude_monitor/core/__init__.py (1 hunks)
  • src/claude_monitor/core/calculations.py (1 hunks)
  • src/claude_monitor/core/data_processors.py (1 hunks)
  • src/claude_monitor/core/models.py (1 hunks)
  • src/claude_monitor/core/p90_calculator.py (1 hunks)
  • src/claude_monitor/core/plans.py (1 hunks)
  • src/claude_monitor/core/pricing.py (1 hunks)
  • src/claude_monitor/core/settings.py (1 hunks)
  • src/claude_monitor/data/__init__.py (1 hunks)
  • src/claude_monitor/data/analysis.py (1 hunks)
  • src/claude_monitor/data/analyzer.py (1 hunks)
  • src/claude_monitor/data/reader.py (1 hunks)
  • src/claude_monitor/error_handling.py (1 hunks)
  • src/claude_monitor/monitoring/__init__.py (1 hunks)
  • src/claude_monitor/monitoring/data_manager.py (1 hunks)
  • src/claude_monitor/monitoring/orchestrator.py (1 hunks)
  • src/claude_monitor/monitoring/session_monitor.py (1 hunks)
  • src/claude_monitor/terminal/__init__.py (1 hunks)
  • src/claude_monitor/terminal/manager.py (1 hunks)
  • src/claude_monitor/terminal/themes.py (1 hunks)
  • src/claude_monitor/ui/__init__.py (1 hunks)
  • src/claude_monitor/ui/components.py (1 hunks)
  • src/claude_monitor/ui/display_controller.py (1 hunks)
  • src/claude_monitor/ui/layouts.py (1 hunks)
  • src/claude_monitor/ui/progress_bars.py (1 hunks)
  • src/claude_monitor/ui/session_display.py (1 hunks)
  • src/claude_monitor/utils/__init__.py (1 hunks)
  • src/claude_monitor/utils/formatting.py (1 hunks)
  • src/claude_monitor/utils/model_utils.py (1 hunks)
  • src/claude_monitor/utils/notifications.py (1 hunks)
  • src/claude_monitor/utils/time_utils.py (1 hunks)
  • src/claude_monitor/utils/timezone.py (1 hunks)
  • src/tests/__init__.py (1 hunks)
  • src/tests/conftest.py (1 hunks)
  • src/tests/examples/api_examples.py (1 hunks)
  • src/tests/run_tests.py (1 hunks)
  • src/tests/test_analysis.py (1 hunks)
  • src/tests/test_calculations.py (1 hunks)
  • src/tests/test_cli_main.py (1 hunks)
  • src/tests/test_data_reader.py (1 hunks)
  • src/tests/test_display_controller.py (1 hunks)
  • src/tests/test_error_handling.py (1 hunks)
  • src/tests/test_formatting.py (1 hunks)
  • src/tests/test_monitoring_orchestrator.py (1 hunks)
  • src/tests/test_pricing.py (1 hunks)
  • src/tests/test_session_analyzer.py (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@codecov-commenter
Copy link

codecov-commenter commented Jul 14, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 71.63047% with 823 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@39a3b2f). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/claude_monitor/ui/session_display.py 36.07% 100 Missing and 1 partial ⚠️
src/claude_monitor/terminal/themes.py 54.64% 68 Missing and 15 partials ⚠️
src/claude_monitor/data/analyzer.py 56.90% 66 Missing and 12 partials ⚠️
src/claude_monitor/cli/main.py 59.65% 61 Missing and 10 partials ⚠️
src/claude_monitor/ui/progress_bars.py 47.79% 64 Missing and 7 partials ⚠️
src/claude_monitor/utils/notifications.py 24.24% 49 Missing and 1 partial ⚠️
src/claude_monitor/ui/components.py 52.42% 48 Missing and 1 partial ⚠️
src/claude_monitor/utils/time_utils.py 81.63% 38 Missing and 7 partials ⚠️
src/claude_monitor/monitoring/data_manager.py 45.00% 40 Missing and 4 partials ⚠️
src/claude_monitor/core/calculations.py 64.13% 31 Missing and 2 partials ⚠️
... and 17 more

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #87   +/-   ##
=======================================
  Coverage        ?   71.63%           
=======================================
  Files           ?       37           
  Lines           ?     2901           
  Branches        ?      426           
=======================================
  Hits            ?     2078           
  Misses          ?      717           
  Partials        ?      106           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Maciek-roboblog Maciek-roboblog merged commit 9a62941 into main Jul 14, 2025
21 checks passed
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.

2 participants