Repository navigation
feat(widget): add a Node Tracker home-screen widget - #7665
Draft
jamesarich wants to merge 2 commits into
Draft
jamesarich wants to merge 2 commits into
jamesarich wants to merge 2 commits into
Conversation
Follows one node the user picks: battery, signal, last heard, hops away and distance from our radio, matching the Node Tracker widget the Apple app ships. A configuration activity picks the node per instance, and a node that drops out of the node DB asks to be re-chosen.
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. Comment |
… order The launcher labels a widget from its receiver, not the provider XML, so both widgets showed the app name. The picker now takes one snapshot of the node DB; a live list re-sorted by last heard under the finger and tracked the wrong node.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There's no way to keep an eye on one node without opening the app. Apple now ships a Node Tracker widget (Meshtastic-Apple#2653); this is the Android equivalent.
🌟 New Features
NodeTrackerConfigActivitypicks the node for each widget instance, favorites first then most recently heard, with search. It's a standaloneAPPWIDGET_CONFIGUREactivity with no navigation graph. Backing out cancels placement, and the widget is reconfigurable. The list is a snapshot taken when it opens, so rows don't move under the finger on a busy mesh.🛠️ Refactoring & Architecture
AndroidAppWidgetUpdater.updateAll()covers both widgets. Trackers re-render from a 1 s sample of the node DB, and only when a tracked node's rendered state changes.updatePeriodMillisis 30 minutes for the tracker (Local Stats stays 0). Nothing else re-renders a node that goes quiet, so this is what dims it.WidgetNodeChipis shared by both widgets. The tracker receiver carries its ownandroid:label, which is what the launcher's picker shows.feature:widgetnow depends oncore:uiandcore:navigationfor the picker theme, node chip and deep link.📝 Documentation
docs/en/user/widget.mdcovers both widgets;feature/widget/README.mdupdated.Testing Performed
NodeTrackerWidgetContentTest: wide and small layouts; an unknown node opens the picker for this widget id; a stale node renders dimmed.NodeTrackerWidgetStateTest: not found, readings, staleness, distance only while connected, signal only for direct RF nodes.NodeTrackerCandidatesTest: ordering, own radio and ignored nodes excluded, search.BundledSqliteGuardTest: the new receiver is an app entry point.Constitution Check
commonMainchanges.core:uicomponents; no navigation graph because it's a launcher entry point.AppTheme,NodeChip,MeshtasticSearchBar, M3 tokens. Cross-platform spec N/A for a platform widget; meshtastic/design has nofeatures/directory.last_updatedbumped, alias registered.