fix(release): fixes to prep for release#4546
Merged
jamesarich merged 5 commits intomainfrom Feb 12, 2026
Merged
Conversation
This commit introduces the display of a user-set status message for nodes within the app. The status message is now visible in both the detailed node view and the node list item. Specific changes: - Adds a `StatusMessageRow` to `NodeDetailsSection.kt` to show the full status message. - Integrates the status message display into `NodeItem.kt`, showing it with an icon and allowing for text ellipsis if it's too long. - Includes new `Preview` composables for components displaying the status message. - Adds the `status_message` string resource and the `Notes` icon. Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit refactors the `NodeDetailScreen` by decomposing the monolithic `NodeDetailList` composable into smaller, more manageable components. The logic previously contained within `NodeDetailList.kt` has been moved directly into `NodeDetailScreen.kt`. The main `NodeDetailList` function, previously a `Column` with `verticalScroll`, has been replaced with a `LazyColumn`. This improves performance by composing and laying out only the visible items on the screen. Specific changes include: - Deleted `NodeDetailList.kt`. - Replaced the `Column` with a `LazyColumn` in `NodeDetailScreen.kt` for improved performance. - Moved composable sections (Position, Device Details, Notes, etc.) into `LazyColumn` items. - Updated the `MainAppBar` to show a generic "Details" title with the node's long name as the subtitle. Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit introduces the ability to receive, store, and display node status messages. The primary goal is to provide users with real-time feedback from their nodes, especially during configuration. A new `nodeStatus` field has been added to the `NodeInfo` model and the `NodeEntity` in the database. The database version is bumped to 36 to accommodate this schema change. The application now handles `node_status` updates from a `StatusModule` config, updating the local node database accordingly. This ensures that status messages sent from remote nodes or the local node itself are captured and persisted. Additionally, the `statusMessage` flow in the `ServiceRepository` has been renamed to `connectionProgress` to more accurately reflect its purpose of showing progress during the initial connection and configuration sequence. UI and service components have been updated to use this new flow. Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit introduces the tracking and display of the transport mechanism (e.g., LoRa, UDP, API) for both nodes and messages. This provides clearer insight into how data is being received.
### Key Changes:
- **Database:**
- A `lastTransport` field has been added to the `NodeEntity` to store the last known transport mechanism for each node.
- The database version is bumped to 37 to accommodate this schema change.
- **Data Models:**
- The `DataPacket`, `Message`, and `Node` models are updated to include the `transportMechanism` information.
- **UI Enhancements:**
- A new composable `TransportIcon` is introduced to visually represent the transport type (LoRa, MQTT, UDP, etc.).
- The `NodeItem` (in the node list) and `MessageItem` now display this icon, replacing the previous simple cloud icon for MQTT.
- The hop count display logic is refined to correctly show `?` for unknown hops (e.g., via MQTT) and to hide signal quality indicators (SNR/RSSI) for non-direct LoRa packets.
- **Backend Logic:**
- The `MeshMessageProcessor` now correctly populates the `lastTransport` for nodes and sets `hopsAway` to `-1` for MQTT messages.
- Signal metrics (SNR/RSSI) are now only updated for direct LoRa packets to avoid showing misleading information.
- Signal metric charting in the node detail view is now filtered to only include direct LoRa packets.
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
4bd70cd to
26ed5f6
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request introduces comprehensive tracking of transport mechanisms and node status messages across the Meshtastic Android application. The changes enable the app to record and display how packets arrived (LoRa, MQTT, UDP, API, or Internal) and to show custom status messages set by node operators. Additionally, the service repository interface has been refactored from setStatusMessage to setConnectionProgress for improved clarity.
Changes:
- Added
transportMechanismfield to DataPacket, Message models andlastTransportfield to Node models to track how packets/nodes communicate - Added
nodeStatusfield to Node models to store and display user-configured status messages - Introduced
TransportIconUI component to visually indicate transport method with appropriate icons - Refactored service progress reporting from
setStatusMessagetosetConnectionProgressthroughout the codebase - Updated signal metrics filtering to only include direct LoRa packets (excluding MQTT and relayed packets)
- Added database migrations (35→36→37) to support new node fields
- Reorganized NodeDetailList from separate file into NodeDetailScreen.kt
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| core/model/src/main/kotlin/org/meshtastic/core/model/util/Extensions.kt | Added isLora() extension to check if packet uses LoRa transport |
| core/model/src/main/kotlin/org/meshtastic/core/model/DataPacket.kt | Added transportMechanism field and Parcel serialization |
| core/model/src/main/kotlin/org/meshtastic/core/model/NodeInfo.kt | Added nodeStatus field to NodeInfo |
| core/database/src/main/kotlin/org/meshtastic/core/database/entity/NodeEntity.kt | Added lastTransport and nodeStatus fields with proper conversion methods |
| core/database/src/main/kotlin/org/meshtastic/core/database/model/Node.kt | Added lastTransport and nodeStatus fields, plus toEntity() helper |
| core/database/src/main/kotlin/org/meshtastic/core/database/model/Message.kt | Added transportMechanism field |
| core/database/src/main/kotlin/org/meshtastic/core/database/entity/Packet.kt | Updated to pass transportMechanism from DataPacket to Message |
| core/database/src/main/kotlin/org/meshtastic/core/database/MeshtasticDatabase.kt | Incremented version to 37 and added auto-migrations |
| core/database/schemas/*.json | Database schema files for versions 36 and 37 |
| core/ui/src/main/kotlin/org/meshtastic/core/ui/component/TransportIcon.kt | New component to display transport mechanism icons |
| core/ui/src/main/kotlin/org/meshtastic/core/ui/icon/Status.kt | Added icons for UDP, API, and Ethernet transport types |
| core/strings/src/commonMain/composeResources/values/strings.xml | Added strings for via_udp, via_api, and internal transport labels |
| core/service/src/main/kotlin/org/meshtastic/core/service/ServiceRepository.kt | Renamed setStatusMessage to setConnectionProgress |
| feature/node/src/main/kotlin/org/meshtastic/feature/node/detail/NodeDetailViewModel.kt | Updated signal metrics filtering to check isLora() and exclude MQTT |
| feature/node/src/main/kotlin/org/meshtastic/feature/node/detail/NodeDetailScreen.kt | Changed app bar to show "Details" as title with node name as subtitle, added preview, moved NodeDetailList from separate file |
| feature/node/src/main/kotlin/org/meshtastic/feature/node/detail/NodeDetailList.kt | Deleted file (content moved to NodeDetailScreen.kt) |
| feature/node/src/main/kotlin/org/meshtastic/feature/node/component/NodeItem.kt | Added transport icon display and node status display in node cards |
| feature/node/src/main/kotlin/org/meshtastic/feature/node/component/NodeDetailsSection.kt | Added status message row display |
| feature/node/src/main/kotlin/org/meshtastic/feature/node/component/DeviceDetailsSection.kt | Minor formatting change |
| feature/messaging/src/main/kotlin/org/meshtastic/feature/messaging/component/MessageItem.kt | Replaced MQTT icon with TransportIcon component, added handling for unknown hops |
| app/src/main/java/com/geeksville/mesh/service/MeshMessageProcessor.kt | Updated to set lastTransport and only update SNR/RSSI for direct LoRa packets |
| app/src/main/java/com/geeksville/mesh/service/MeshDataMapper.kt | Added transportMechanism mapping |
| app/src/main/java/com/geeksville/mesh/service/MeshDataHandler.kt | Added logic to update node status from module config responses |
| app/src/main/java/com/geeksville/mesh/service/MeshConfigHandler.kt | Updated to use setConnectionProgress, added status message handling for own node |
| app/src/main/java/com/geeksville/mesh/service/MeshActionHandler.kt | Added status message update when setting module config remotely |
| app/src/main/java/com/geeksville/mesh/service/MeshNodeManager.kt | Added updateNodeStatus() helper method |
| app/src/main/java/com/geeksville/mesh/service/FromRadioPacketHandler.kt | Updated to use setConnectionProgress |
| app/src/main/java/com/geeksville/mesh/model/BTScanModel.kt | Updated to use connectionProgress flow |
| app/src/test/java/com/geeksville/mesh/service/FromRadioPacketHandlerTest.kt | Updated test to verify setConnectionProgress call |
core/model/src/main/kotlin/org/meshtastic/core/model/util/Extensions.kt
Outdated
Show resolved
Hide resolved
This commit refines the `isLora()` extension function for `MeshPacket` by removing `TRANSPORT_INTERNAL` from the set of conditions that identify a LoRa transport mechanism. This ensures the function more accurately reflects packets transmitted over LoRa. Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
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.
This pull request introduces enhancements to how transport mechanisms and node statuses are tracked and stored in the codebase, along with refactoring status message handling to improve clarity. The main changes span across the data models, database entities, and service logic, ensuring that information about how packets and nodes are communicated (e.g., via LoRa or MQTT) is accurately captured and propagated. Additionally, status messages are now handled through a more descriptive
connectionProgressinterface, and node status updates are streamlined.Transport mechanism and node status tracking:
transportMechanismfield toDataPacket,PacketEntity, andMessagemodels, enabling tracking of the transport method for each packet. (Fb5cd4d5L71R71, core/database/src/main/kotlin/org/meshtastic/core/database/entity/Packet.ktR61, F459e0f8L93R93)NodeEntity,NodeWithRelations, andNodemodels to includelastTransportandnodeStatusfields, enabling storage of the last transport mechanism and node status for each node. [1] [2] [3] [4] [5]MeshMessageProcessorandMeshDataHandlerto setviaMqtt,lastTransport, andnodeStatusbased on incoming packets, including handling LoRa transport detection. [1] [2] [3]Refactoring and improved status message handling:
setStatusMessagecalls withsetConnectionProgressthroughout service handlers and tests for clearer progress reporting. [1] [2] [3] [4] [5]updateNodeStatustoMeshNodeManagerand ensuring status changes are propagated consistently. [1] [2] [3]Database migrations:
These changes collectively improve the visibility and traceability of node and packet states, enhance progress reporting, and ensure data consistency across the application.