Skip to content

Develop - Major efficiency improvements, qr and other fixes, and more - #287

Merged
sameerasw merged 9 commits into
mainfrom
develop
Aug 13, 2026
Merged

Develop - Major efficiency improvements, qr and other fixes, and more#287
sameerasw merged 9 commits into
mainfrom
develop

Conversation

@sameerasw

Copy link
Copy Markdown
Owner

This pull request introduces several improvements and fixes across BLE communication, menu bar visibility, license validation, and media info streaming. The most significant changes include a robust streaming implementation for now-playing media info, enhanced error handling and user feedback for license validation, and new state management for menu bar visibility. These updates collectively improve the app's reliability, user experience, and maintainability.

Now Playing Media Streaming:

  • Rewrote the NowPlayingCLI class to support real-time streaming of media info using the media-control stream --no-diff command, with automatic retry logic and robust JSON parsing for each line of output. This replaces the previous one-shot fetch approach and provides more responsive updates.
  • Added methods for starting, stopping, and resetting the streaming process, with a maximum retry limit and improved error handling to avoid infinite retry loops.

License Validation and Error Handling:

  • Enhanced the LicenseCheckError enum to include more granular error cases (e.g., invalid key, plan mismatch, subscription inactive, uses exceeded, refunded) and user-friendly error descriptions.
  • Improved the checkLicenseKeyValidity method in Gumroad.swift to provide detailed logging, handle various error scenarios with clear messages, and update AppState with the last license check failure reason for UI feedback.

Menu Bar Visibility and State Management:

  • Added a new showInMenubar property to AppState with persistence to UserDefaults, ensuring the menu bar item can be shown or hidden based on user preference or app state. [1] [2]
  • Updated MenuBarManager to observe showInMenubar and toggle the menu bar item’s visibility accordingly. Also ensured the menu bar is always shown when the dock icon is hidden. [1] [2] [3]

BLE Communication Improvements:

  • Updated BLE write operations to select .withResponse or .withoutResponse based on characteristic properties, improving compatibility and reliability.
  • Increased the BLE watchdog timeout from 25s to 120s to reduce unnecessary disconnects and improved connection logic to avoid redundant auto-connect attempts. [1] [2]
  • Changed the BLE status update trigger to use forceRefresh() instead of fetch() for more accurate media info.

Other State and Error Management:

  • Added lastLicenseCheckFailureReason to AppState to store the reason for the most recent license validation failure, enabling better user feedback in the UI.

These changes collectively enhance the user experience, reliability, and maintainability of the application.

@sameerasw sameerasw self-assigned this Aug 13, 2026
@sameerasw sameerasw added bug Something isn't working enhancement New feature or request labels Aug 13, 2026
@sameerasw
sameerasw merged commit 8d82be1 into main Aug 13, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in AirSync Features and Bugs Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant