Logging and AntPlus Updates - #137
Conversation
Removed ANT response logging from MessageHandler to reduce log noise. Updated Microsoft.Extensions.Hosting to 10.0.9 and Microsoft.Maui.Core to 10.0.71. Bumped version to 2.0.7 and updated release notes.
Breaking: AntDeviceCollection now implements IDisposable for proper resource cleanup. Logging methods and event signatures updated to include DeviceNumber and page indices for better multi-device support. Refactored LoggerExtensions and updated all usages. Removed obsolete logging code. Updated Microsoft.Extensions.* dependencies to 10.0.9. Incremented version to 7.0.0 and updated release notes.
Updated NuGet packages across projects, including Microsoft.Extensions.Hosting, Google.Protobuf, Grpc.Tools, CommunityToolkit.Maui, and Serilog.Settings.Configuration. Adjusted CrankTorqueFrequencySensorTests to match new log message formats. Bumped AntUsbStick version to 4.1.4. Removed redundant early Serilog initialization in MainWindowViewModel.cs.
Added documentation for AntPlus 7.0.0.0, including a new version history entry and release notes for breaking changes (IDisposable on AntDeviceCollection, LoggerExtensions signature updates, NuGet updates). Updated project and content layout to reference the new version.
Added a new example in the "Examples" section describing the MauiTailscaleGrpc project, which demonstrates using Docker and Tailscale to securely connect an ANT+ server on Windows with a .NET MAUI app on Windows and Android. Included a GitHub link and instructions to refer to the README for setup details.
There was a problem hiding this comment.
Code Review
This pull request introduces breaking changes for version 7.0.0, notably making AntDeviceCollection implement IDisposable for proper resource cleanup and updating several logging methods in LoggerExtensions to include the DeviceNumber parameter. It also removes noisy ANT response logging and updates various NuGet dependencies across the solution. The code review identified several key issues: a logic error in CommonDataPages.cs where an enum value is incorrectly passed as a page index, a potential issue in LoggerExtensions.cs where Enum.GetName may return null when passed a byte directly, a recommendation to mark AntDeviceCollection as sealed to comply with CA1063, and a resource leak concern where active AntDevice instances are not disposed of when the collection is disposed.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
PR Classification
API change and dependency update to improve resource management, logging clarity, and documentation.
PR Summary
This pull request introduces breaking API changes, enhances logging with device context, updates dependencies, and improves documentation.