mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
feat: Integrate notification management and preferences across platforms (#4819)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
parent
0b2e89c46f
commit
8c964a15ca
45 changed files with 1304 additions and 61 deletions
|
|
@ -0,0 +1,8 @@
|
|||
# Desktop UX Enhancements
|
||||
|
||||
This track focuses on integrating desktop-specific Compose Multiplatform APIs to improve the native feel and functionality of the desktop client.
|
||||
|
||||
## Track Files
|
||||
- [Specification](./spec.md)
|
||||
- [Plan](./plan.md)
|
||||
- [Metadata](./metadata.json)
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"id": "desktop_ux_enhancements_20260316",
|
||||
"name": "Desktop UX Enhancements",
|
||||
"status": "in-progress",
|
||||
"priority": "medium",
|
||||
"tags": ["desktop", "ux", "compose"]
|
||||
}
|
||||
19
conductor/archive/desktop_ux_enhancements_20260316/plan.md
Normal file
19
conductor/archive/desktop_ux_enhancements_20260316/plan.md
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# Implementation Plan: Desktop UX Enhancements
|
||||
|
||||
## Phase 1: Tray & Notifications (Current Focus)
|
||||
- [x] Add `isAppVisible` state to `Main.kt`.
|
||||
- [x] Introduce `rememberTrayState()` and the `Tray` composable.
|
||||
- [x] Update `Window` `onCloseRequest` to toggle visibility instead of exiting the app.
|
||||
- [x] Add a `DesktopNotificationService` interface and implementation using `TrayState`.
|
||||
|
||||
## Phase 2: Window State Persistence
|
||||
- [x] Create `DesktopPreferencesDataSource` via DataStore.
|
||||
- [x] Intercept window bounds changes and write to preferences.
|
||||
- [x] Read preferences on startup to initialize `rememberWindowState(...)`.
|
||||
|
||||
## Phase 3: Menu Bar & Shortcuts
|
||||
- [x] Integrate the `MenuBar` composable into the `Window`.
|
||||
- [x] Implement global application shortcuts.
|
||||
|
||||
## Phase: Review Fixes
|
||||
- [x] Task: Apply review suggestions 3bda1c007
|
||||
10
conductor/archive/desktop_ux_enhancements_20260316/spec.md
Normal file
10
conductor/archive/desktop_ux_enhancements_20260316/spec.md
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# Specification: Desktop UX Enhancements
|
||||
|
||||
## Goal
|
||||
To implement native desktop behaviors like a system tray, notifications, a menu bar, and persistent window state for the Compose Multiplatform Desktop app.
|
||||
|
||||
## Requirements
|
||||
1. **System Tray & Notifications**: The app should show a tray icon with a basic context menu ("Open", "Settings", "Quit"). It should support a "Minimize to Tray" flow rather than exiting immediately when closed. Notifications should be dispatchable via `TrayState` for key mesh events.
|
||||
2. **Window State Persistence**: The app should remember its last window size, position, and maximized state across launches.
|
||||
3. **Menu Bar**: A native MenuBar (File, Edit, View, Window, Help) should provide standard navigation and controls.
|
||||
4. **Keyboard Shortcuts**: Common actions should be bound to standard native keyboard shortcuts (e.g. `Cmd/Ctrl+,` for Settings).
|
||||
5
conductor/archive/wire_up_notifs_20260316/index.md
Normal file
5
conductor/archive/wire_up_notifs_20260316/index.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# Track wire_up_notifs_20260316 Context
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Implementation Plan](./plan.md)
|
||||
- [Metadata](./metadata.json)
|
||||
8
conductor/archive/wire_up_notifs_20260316/metadata.json
Normal file
8
conductor/archive/wire_up_notifs_20260316/metadata.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"track_id": "wire_up_notifs_20260316",
|
||||
"type": "feature",
|
||||
"status": "new",
|
||||
"created_at": "2026-03-16T00:00:00Z",
|
||||
"updated_at": "2026-03-16T00:00:00Z",
|
||||
"description": "wire up notifs"
|
||||
}
|
||||
34
conductor/archive/wire_up_notifs_20260316/plan.md
Normal file
34
conductor/archive/wire_up_notifs_20260316/plan.md
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
# Implementation Plan: Wire Up Notifications
|
||||
|
||||
## Phase 1: Shared Abstraction (commonMain) [checkpoint: 930ce02]
|
||||
- [x] Task: Define `NotificationManager` interface in `core:service/src/commonMain` 4f2107d
|
||||
- [x] Create `Notification` data model (title, message, type)
|
||||
- [x] Define `dispatch(notification: Notification)` method
|
||||
- [x] Task: Create `NotificationPreferencesDataSource` using DataStore in `core:prefs` 346c2a4
|
||||
- [x] Define boolean preferences for categories (e.g., Messages, Node Events)
|
||||
- [x] Task: Conductor - User Manual Verification 'Phase 1: Shared Abstraction (commonMain)' (Protocol in workflow.md)
|
||||
|
||||
## Phase 2: Migrate Android Implementation (androidMain) [checkpoint: 1eb3cb0]
|
||||
- [x] Task: Audit existing Android notifications 930ce02
|
||||
- [x] Locate current implementation for local push notifications
|
||||
- [x] Analyze triggers and UX (channels, icons, sounds)
|
||||
- [x] Task: Implement `AndroidNotificationManager` 31c2a1e
|
||||
- [x] Adapt existing Android notification code to the new `NotificationManager` interface
|
||||
- [x] Inject `Context` and `NotificationPreferencesDataSource`
|
||||
- [x] Respect user notification preferences
|
||||
- [x] Task: Wire `AndroidNotificationManager` into Koin DI 31c2a1e
|
||||
- [x] Task: Replace old Android notification calls with the new unified interface 81fd10b
|
||||
- [x] Task: Conductor - User Manual Verification 'Phase 2: Migrate Android Implementation (androidMain)' (Protocol in workflow.md)
|
||||
|
||||
## Phase 3: Desktop Implementation (desktop) [checkpoint: 759914f]
|
||||
- [x] Task: Implement `DesktopNotificationManager` 1eb3cb0
|
||||
- [x] Inject `TrayState` and `NotificationPreferencesDataSource`
|
||||
- [x] Delegate `dispatch()` to `TrayState.sendNotification()` respecting user preferences
|
||||
- [x] Task: Wire `DesktopNotificationManager` into Koin DI 1eb3cb0
|
||||
- [x] Task: Conductor - User Manual Verification 'Phase 3: Desktop Implementation (desktop)' (Protocol in workflow.md)
|
||||
|
||||
|
||||
## Phase 4: UI Preferences Integration [checkpoint: 3af1e4c]
|
||||
- [x] Task: Create UI for notification preferences 7ed59c6
|
||||
- [x] Add toggles for categories in the Settings screen
|
||||
- [x] Task: Conductor - User Manual Verification 'Phase 4: UI Preferences Integration' (Protocol in workflow.md)
|
||||
17
conductor/archive/wire_up_notifs_20260316/spec.md
Normal file
17
conductor/archive/wire_up_notifs_20260316/spec.md
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# Specification: Wire Up Notifications
|
||||
|
||||
## Goal
|
||||
To implement a unified, cross-platform notification system that abstracts platform-specific implementations (Android local push, Desktop TrayState) into a common API for the Kotlin Multiplatform (KMP) core. This will enable consistent notification dispatching for key mesh events.
|
||||
|
||||
## Requirements
|
||||
1. **Abstraction Layer:** Create a shared `NotificationManager` interface in `commonMain` to handle notification dispatching across all targets.
|
||||
2. **Platform Implementations:**
|
||||
- **Android:** Implement native local notifications following the existing Android app behavior and Material Design guidance.
|
||||
- **Desktop:** Implement system notifications using the `TrayState` API.
|
||||
3. **Trigger Events:** Replicate the existing Android notification triggers (e.g., new messages, connections) and adapt them to use the new shared abstraction.
|
||||
4. **User Preferences:** Provide a unified UI for users to opt in or out of specific notification categories, respecting their choices globally.
|
||||
5. **Foreground Handling & Behavior:** Defer to platform-specific UX guidelines and the established Android implementation for aspects like sound, vibration, and in-app display (e.g., suppressing system notifications if the conversation is active).
|
||||
|
||||
## Out of Scope
|
||||
- Changes to the underlying networking or Bluetooth layers.
|
||||
- Remote Push Notifications (FCM/APNs) – this is strictly for local, mesh-driven events.
|
||||
|
|
@ -14,6 +14,7 @@ Meshtastic-Android is a Kotlin Multiplatform (KMP) application designed to facil
|
|||
## Core Features
|
||||
- Direct communication with Meshtastic hardware (via BLE, USB, TCP)
|
||||
- Decentralized text messaging across the mesh network
|
||||
- Unified cross-platform notifications for messages and node events
|
||||
- Adaptive node and contact management
|
||||
- Offline map rendering and device positioning
|
||||
- Device configuration and firmware updates
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue