v0.5.3
[0.5.3] - 2026-01-27
Added
Log Rotation: Introduced RotatingMermaidFileHandler and TimedRotatingMermaidFileHandler to handle long-running systems by automatically splitting .mmd files based on size or time.
Overwrite Support: Added overwrite parameter to configure_flow to allow clearing the diagram file on application restart.
Improved
Documentation: Comprehensive update of English and Chinese documentation, including User Guide, API Reference, and detailed source code annotations.
Examples: Added a new example 08-log-rotation.py demonstrating production-ready log rotation configurations.
[0.5.2] - 2026-01-27
Added
List/Tuple Item Grouping: Consecutive identical items in lists and tuples are now automatically grouped (e.g., ['a', 'a', 'a'] -> ['a' x 3]), significantly reducing visual noise in diagrams when dealing with large collections of similar objects.
Improved
Test Coverage: Increased test coverage to 96.22% by adding comprehensive test cases for edge cases in CLI, decorators, and handlers.
Robustness: Improved CLI error handling and live reload stability by fixing mock handling and ensuring proper cleanup.
Documentation: Synchronized all documentation across languages and updated comprehensive Chinese source code annotations for all modules.
[0.5.0] - 2026-01-27
Added
Intelligent Collapsing: Repetitive high-frequency calls are now automatically collapsed into a single arrow with a counter (e.g., func (x10)), preventing diagram bloat.
Auto-Instrumentation: Added @trace_class decorator to automatically trace all public methods in a class.
Third-Party Patching: Added patch_object utility to trace methods in external libraries (e.g., requests.get) without modifying their source.
Global Configuration: Introduced MermaidConfig system allowing global control over parameter capture, string limits, and recursion depth via code or environment variables.
Full Stack Trace Capture: Exceptions now capture the complete Python traceback, displayed as a Note in the Mermaid diagram for easier debugging.
Changed
configure_flow API: Updated to support level, config_overrides, and queue_size for more flexible initialization.
Enhanced FastAPI Integration: The middleware now captures and logs full stack traces for unhandled exceptions.
Improved
Documentation: Added comprehensive Chinese source code annotations for all modules.
Test Coverage: Maintained >93% coverage with new tests for collapsing and configuration logic.
Full Changelog: v0.4.1...v0.5.3