Skip to content

fix(nodes): mark nodes absent from connected radio - #6693

Closed
simulationstation wants to merge 1 commit into
meshtastic:mainfrom
simulationstation:bugfix/app-only-node-telemetry
Closed

fix(nodes): mark nodes absent from connected radio#6693
simulationstation wants to merge 1 commit into
meshtastic:mainfrom
simulationstation:bugfix/app-only-node-telemetry

Conversation

@simulationstation

@simulationstation simulationstation commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • keep the phone NodeDB cumulative; this change never removes Room rows or node-local state
  • retain the successfully installed Stage 2 membership as connection-scoped state, then add senders observed live in the same connection
  • label retained-only rows as Saved on phone and suppress cached online, last-heard, hop, SNR, and RSSI claims in the node list and accessibility description
  • preserve genuine zero-valued signal readings and direct-hop values for nodes present in the current snapshot
  • make online counts, online/direct filters, and the hop histogram use current-radio membership when it is authoritative

The label means that a node was absent from the last completed radio NodeDB download and has not been observed in this connection. It is not a claim about the radio's real-time storage contents.

Related to #6263

Testing

  • PASS: ./gradlew.bat spotlessCheck :core:data:detekt :core:ui:detekt :feature:node:detekt :core:data:allTests :core:ui:jvmTest :feature:node:allTests assembleDebug kmpSmokeCompile --max-workers=4 --console=plain
  • The canonical aggregate gate also ran. Spotless, Detekt, both debug APK assemblies, and the branch's affected tests passed; it stopped only in the unchanged Windows-host FileStorage/DataStore baseline failures in core:database, core:datastore, and core:prefs.
  • No emulator or physical-device acceptance was performed.

Summary by CodeRabbit

  • New Features
    • Node lists now reflect nodes detected during the current radio connection.
    • Nodes retained on the phone but not detected nearby are clearly labeled “Saved on phone.”
    • Online and direct-node filters, counts, and hop charts now use current connection data.
  • Bug Fixes
    • Prevented stale signal, status, accessibility, and glow information from appearing for nodes absent from the current connection.
    • Preserved valid zero-valued signal metrics and improved handling when connection data is unavailable.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: ef046a26-87cf-45e0-ba21-06fadf3dc618

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1ad11e57-8a34-4ef3-8b1c-0ae170636b25

📥 Commits

Reviewing files that changed from the base of the PR and between 42b07b2 and a771ef5.

📒 Files selected for processing (22)
  • .skills/compose-ui/strings-index.txt
  • core/data/src/commonMain/kotlin/org/meshtastic/core/data/manager/MeshConfigFlowManagerImpl.kt
  • core/data/src/commonMain/kotlin/org/meshtastic/core/data/manager/MeshMessageProcessorImpl.kt
  • core/data/src/commonMain/kotlin/org/meshtastic/core/data/manager/NodeManagerImpl.kt
  • core/data/src/commonTest/kotlin/org/meshtastic/core/data/manager/MeshConfigFlowManagerImplTest.kt
  • core/data/src/commonTest/kotlin/org/meshtastic/core/data/manager/MeshMessageProcessorImplTest.kt
  • core/data/src/commonTest/kotlin/org/meshtastic/core/data/manager/NodeManagerConnectionIdentityTest.kt
  • core/data/src/commonTest/kotlin/org/meshtastic/core/data/manager/NodeManagerImplTest.kt
  • core/repository/src/commonMain/kotlin/org/meshtastic/core/repository/NodeManager.kt
  • core/resources/src/commonMain/composeResources/values/strings.xml
  • core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/BuildNodeDescription.kt
  • core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/CurrentRadioNodePresentation.kt
  • core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/NodeCardGlow.kt
  • core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/NodeItem.kt
  • core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/NodeItemCompact.kt
  • core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/SavedOnPhoneInfo.kt
  • core/ui/src/commonTest/kotlin/org/meshtastic/core/ui/component/BuildNodeDescriptionTest.kt
  • core/ui/src/commonTest/kotlin/org/meshtastic/core/ui/component/CurrentRadioNodePresentationTest.kt
  • core/ui/src/commonTest/kotlin/org/meshtastic/core/ui/component/NodeItemZeroMetricsTest.kt
  • feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/list/NodeListScreen.kt
  • feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/list/NodeListViewModel.kt
  • feature/node/src/commonTest/kotlin/org/meshtastic/feature/node/list/NodeListViewModelTest.kt

📝 Walkthrough

Walkthrough

The change adds session-scoped radio node snapshots, records valid packet senders, and applies snapshot membership to node lists and UI presentation. Nodes absent from a completed snapshot display as saved on the phone.

Changes

Radio membership lifecycle

Layer / File(s) Summary
Snapshot contract and lifecycle
core/repository/NodeManager.kt, core/data/.../NodeManagerImpl.kt, core/data/.../*Test.kt
NodeManager now exposes session-scoped snapshots. The implementation stages, publishes, bounds, filters, and clears membership by session generation.
Handshake snapshot publication
core/data/.../MeshConfigFlowManagerImpl.kt, core/data/.../MeshConfigFlowManagerImplTest.kt
Handshake admission starts radio sessions. Successful Stage 2 installation publishes deduplicated membership before NodeDB readiness.
Live packet observation
core/data/.../MeshMessageProcessorImpl.kt, core/data/.../MeshMessageProcessorImplTest.kt
Valid packet senders update the active session. Zero, broadcast, and stale-session senders are ignored.
Current-radio node presentation
core/resources/.../strings.xml, core/ui/.../component/*, core/ui/.../component/*Test.kt
Node presentation and accessibility data now use snapshot membership. Absent nodes show “Saved on phone” and have radio observations cleared.
Connection-aware node list
feature/node/.../NodeListViewModel.kt, feature/node/.../NodeListScreen.kt, feature/node/.../NodeListViewModelTest.kt
Connected node counts, filters, histograms, and row rendering now use the current radio snapshot.

Estimated code review effort: 4 (Complex) | ~45 minutes

Mergeability Score: ⚪ Minimal · up to a771e

This change keeps cumulative node data while marking nodes absent from the current radio snapshot as saved on the phone and suppressing stale telemetry; no actionable merge-blocking risk remains after normal checks and review.

Possibly related PRs

Suggested reviewers: jamesarich, jeremiah-k

🚥 Pre-merge checks | ✅ 5 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Tests Prove The Path, Not The End State ⚠️ Warning The added staged observations are bounded before snapshot completion test asserts only nodeNums.size == MAX_IN_MEMORY_NODES; it never checks which node numbers survived. Assert the retained node set, including expected members and excluded overflow members, instead of asserting only the collection size.
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: marking nodes absent from the connected radio.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Sibling Call Sites And Presence Semantics ✅ Passed Both NodeItem and NodeItemCompact use nullable temperature presence checks; all new radio fields are consumed safely in both; no new RSSI, temperature, current, voltage, or particulate field defaul...

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 bugfix PR tag label Aug 13, 2026
@simulationstation
simulationstation force-pushed the bugfix/app-only-node-telemetry branch from a771ef5 to f3e9d4c Compare August 13, 2026 23:06
@jamesarich

Copy link
Copy Markdown
Collaborator

not interested in this right now either - I suggest you take a look at how to contribute, and engage in some human discussion via discord or issues prior to any further pull requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants