Skip to content

feat: Integrate notification management and preferences across platforms#4819

Merged
jamesarich merged 34 commits intomainfrom
feat/desktop-notifs
Mar 17, 2026
Merged

feat: Integrate notification management and preferences across platforms#4819
jamesarich merged 34 commits intomainfrom
feat/desktop-notifs

Conversation

@jamesarich
Copy link
Copy Markdown
Collaborator

This pull request migrates the notification system in the shared Kotlin Multiplatform (KMP) core from the old MeshServiceNotifications to a new, unified NotificationManager abstraction. This enables consistent, cross-platform notification handling for both Android and Desktop, and updates all relevant usages in the core data layer.

The most important changes are:

New Feature Tracks and Documentation:

  • Added a new track for Desktop UX Enhancements, including a specification, phased implementation plan, and metadata describing goals such as tray integration, notifications, window state persistence, and menu bar/shortcut support. [1] [2] [3] [4]
  • Added a new track for Wire Up Notifications, with a detailed specification, phased plan, and metadata for implementing a unified, cross-platform notification system in KMP. [1] [2] [3] [4]

Notification System Refactor (Core Data Layer):

  • Replaced all usages of MeshServiceNotifications with the new NotificationManager abstraction throughout the core data managers (MeshDataHandlerImpl, FromRadioPacketHandlerImpl, MeshActionHandlerImpl, etc.), ensuring all notification dispatches now use the unified interface. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]
  • Refactored notification logic for client notifications, low battery, alerts, and waypoint events to use the new NotificationManager.dispatch() method with structured notification data, including title, message, category, and other relevant fields. [1] [2] [3] [4]

Product Documentation Update:

  • Updated the product documentation to highlight unified, cross-platform notifications as a core feature.

…tings on Android, in-app toggles on Desktop)
- Delete platform-specific `NotificationSection` implementations for Android and JVM in `feature:settings`, moving toward a shared implementation.
- Update `MessageViewModelTest` to include a mocked `NotificationManager` dependency.
- Update `DesktopPlatformModule` to synchronize `versionName`, `absoluteMinFwVersion`, and `minFwVersion` with current release standards.

- NotificationSection.android.kt: removed Android-specific notification permission launcher.
- NotificationSection.jvm.kt: removed JVM-specific notification toggle switches.
- MessageViewModelTest.kt: added `notificationManager` mock to `MessageViewModel` instantiation.
- DesktopPlatformModule.kt: updated version strings (e.g., `versionName` to "2.7.14").
@github-actions github-actions bot added the enhancement New feature or request label Mar 16, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 16, 2026

Codecov Report

❌ Patch coverage is 27.69231% with 94 lines in your changes missing coverage. Please review.
✅ Project coverage is 13.20%. Comparing base (0e5f945) to head (8dc370e).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...htastic/core/service/AndroidNotificationManager.kt 0.00% 44 Missing ⚠️
...eshtastic/core/data/manager/MeshDataHandlerImpl.kt 4.34% 22 Missing ⚠️
...c/core/prefs/notification/NotificationPrefsImpl.kt 0.00% 15 Missing ⚠️
...usecase/settings/SetNotificationSettingsUseCase.kt 0.00% 5 Missing ⚠️
...g/meshtastic/feature/settings/SettingsViewModel.kt 62.50% 3 Missing ⚠️
...htastic/core/data/manager/MeshActionHandlerImpl.kt 0.00% 2 Missing ⚠️
...in/org/meshtastic/core/ui/viewmodel/UIViewModel.kt 0.00% 2 Missing ⚠️
...g/meshtastic/feature/messaging/MessageViewModel.kt 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4819      +/-   ##
==========================================
+ Coverage   12.18%   13.20%   +1.01%     
==========================================
  Files         531      539       +8     
  Lines       17578    17761     +183     
  Branches     2630     2651      +21     
==========================================
+ Hits         2142     2345     +203     
+ Misses      15131    15100      -31     
- Partials      305      316      +11     

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

Signed-off-by: James Rich <[email protected]>
Removed unused meshServiceNotifications parameter that was removed from the MessageViewModel constructor.
@jamesarich jamesarich added this pull request to the merge queue Mar 17, 2026
Merged via the queue into main with commit 8c964a1 Mar 17, 2026
6 checks passed
@jamesarich jamesarich deleted the feat/desktop-notifs branch March 17, 2026 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant