Skip to content

feat(notifications): Live Update for mesh status or a tracked node - #7664

Draft
jamesarich wants to merge 2 commits into
mainfrom
feat/live-update
Draft

jamesarich wants to merge 2 commits into
mainfrom
feat/live-update

Conversation

@jamesarich

@jamesarich jamesarich commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

iOS now shows a Live Activity the user picks (Meshtastic-Apple#2670); Android had only the fixed service notification. This is the Android 16 counterpart: a Live Update the user starts, switches or stops, showing either the mesh at a glance or one node. It's off by default, and Off leaves the service notification as it was.

🌟 New Features

  • Live Update on the service notification, promoted only while a mode is on:
    • Mesh status: connection, nodes online, unread messages, radio battery; chip online/total while connected.
    • Track a node: battery, signal, last heard, hops, distance; chip is battery, or time since heard once that's a minute or more. Tap opens the node.
  • Connections: a Live Update row and chooser (Mesh status, or Track a node from a searchable list, favorites first then most recently heard) with Start, Switch and Stop, plus a settings link when Live Updates are turned off for the app.
  • Node detail: a Track in Live Update switch.
  • A user disconnect, a radio switch, or deleting or ignoring the tracked node ends it. A dropped link keeps it and shows the state. Firmware progress still takes over the notification.
  • Android 16+ only; desktop and iOS don't show it.

🛠️ Refactoring & Architecture

  • Mode lives in DataStore through LiveUpdatePrefs (commonMain), LiveUpdateGuard in core:service commonMain, and a rememberLiveUpdateSupport() expect in core:ui.
  • The stats branch of renderServiceNotification moved unchanged into renderServiceStateNotification.
  • feature/node/detekt-baseline.xml: the ID of the existing ViewModelForwarding entry changed with the call's arguments.

📝 Documentation

  • Connections: a Live Update section. Notifications: a pointer to it.

Testing Performed

  • MeshNotificationManagerImplTest: not promoted while Off; Mesh status promoted with chip and text, and reverts on Off; firmware progress outranks it; a tracked node renders, then turns Off when deleted.
  • LiveUpdateGuardTest, LiveUpdatePrefsTest, LiveUpdateCandidatesTest.
  • Full baseline with kmpSmokeCompile and -PwarningsAsErrors=true green locally.
  • Emulator against a simulated TCP radio:
    • API 37 (CE2A.260420): Mesh status and Track a node both post with PROMOTED_ONGOING; the status bar chip shows 41/41. Stopping from node detail restores the stock notification. Dropping the link keeps the Live Update, with "Disconnected" as subtext.
    • API 36.0 (BE2A.250530): the request is set but never granted; that image predates the promoted chip UI.
    • The notification tap targets nodes/<num> for a tracked node.
  • Not seen: the lock screen (the emulator has no keyguard), battery and signal lines (the sim sends neither). After a dropped link, "Heard just now" doesn't age until the next packet, since nothing re-renders on a timer.
Before (Off) Mesh status Status bar chip Track a node
before mesh-shade mesh-chip track-shade
Chooser Track a node Node detail
chooser track-picker node-detail

Constitution Check

  • I: prefs, guard, view models and UI in commonMain; Android APIs only in androidMain.
  • II: spotless and detekt (incl. type-resolved) clean.
  • III: shared Compose, stringResource, MeshtasticIcons, MetricFormatter; platform gate through an expect.
  • IV: no new logging of node data or location.
  • V: cross-platform feature that Apple already shipped. meshtastic/design has no features/ directory and no Live Activity spec, so there is none to reference.
  • VI: connections.md and notifications.md updated, last_updated bumped.
  • VII: baseline green before push.

A user-started Android 16 Live Update on the service notification, the
counterpart of the Apple Live Activity. Off by default; Off leaves the
service notification as it was.

- Mesh status: connection, nodes online, unread messages and the radio's
  battery, with nodes online in the status bar chip.
- Track a node: its battery, signal, last heard, hops and distance, with
  its battery (or time since heard) in the chip.
- The mode is stored in DataStore (`LiveUpdatePrefs`). A user disconnect,
  a radio switch, or the tracked node being deleted or ignored turns it
  off; a dropped link keeps it and shows the connection state.
- Connections gets a Live Update row and chooser (favorites first, then
  most recently heard, searchable); node detail gets a Track in Live
  Update switch. Both are Android 16+ only.
@coderabbitai

coderabbitai Bot commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the enhancement New feature or request label Oct 18, 2026

This branch has not been deployed

No deployments
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