Files
Meshtastic-Android/feature/node
James RichandClaude Sonnet 5 0f1ad6d13b feat(node): enable wasmJs target
feature:node depends on core:common/data/database/datastore/domain/
model/navigation/repository/resources/service/ui/di (all already
wasmJs-enabled), coil, jetbrains.compose.material3.adaptive*, and two
libraries not yet checked by this session: com.mikepenz:multiplatform-
markdown-renderer(-m3) and com.patrykandpatrick.vico:compose(-m3) --
both confirmed to publish real wasmJs Gradle variants at their exact
pinned versions (0.45.0, 3.3.1) via Maven Central's own module
metadata.

feature:map (a real, 92-file module with its own unported expect/
actual gaps -- map rendering is deferred, this effort's own v0 scope)
was a commonMain dependency here too, but a grep found zero direct
references to it anywhere in feature:node's own source: the
dependency exists purely for Koin's classpath-based
ComponentScan("org.meshtastic.feature.map") to reach feature:map's own
@Single-annotated MapLayersManager. Since feature:map has no wasmJs
target, the dependency moves to per-platform main source sets
(android/jvm/iOS) instead of commonMain -- feature:map itself is
untouched.

This module also surfaces a real limit in this session's own
screening method: a loose `grep "expect \|actual "` pass missed a
genuine expect/actual pair in ChartDrawGuard.kt
(platformSaveCount/platformRestoreToCount), because an unrelated
`compareAndSet(expect = ...)` call elsewhere in the same file produced
a false-positive-shaped match that made the earlier pass stop looking
closely enough. The wasmJs actual is byte-identical to the existing
jvmMain one (both render via Skia/Skiko's skiaCanvas, unlike Android's
native Canvas) -- confirmed by a real compile, not assumed from the
jvm actual's shape.

Wiring the relocated feature:map dependency to iosMain needed a bare
applyHierarchyTemplate(KotlinHierarchyTemplate.default) call: unlike
core:ble/feature:connections (which both needed a custom "nonWeb"
group), this module's iosMain source set had unreliable
creation/wiring timing with wasmJs() + android registered but no
template call of its own -- the default template alone resolves it,
with iosMain correctly wired to appleMain by the template itself (no
extra manual dependsOn edge needed, unlike those two modules' iOS gap).

2 of 24 commonTest files (importing core:testing, which has no wasmJs
target) move to a new nonWebTest source set.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-31 01:51:49 -05:00
..
2026-08-31 01:51:49 -05:00

:feature:node

Overview

Targets: Android · JVM (Desktop) · iOS

The :feature:node module handles node-centric features, including the node list, detailed node information, telemetry charts, and the compass.

Key Components

1. NodeListScreen

Displays all nodes currently known to the application.

2. NodeDetailScreen

Shows exhaustive details for a specific node, including hardware info, position history, and last heard status.

3. MetricsViewModel

Manages the retrieval and display of telemetry data (e.g., battery, SNR, environment metrics) using charts.

4. CompassViewModel

Provides a compass interface to show the relative direction and distance to other nodes.

Dependency Graph

graph TB
  :feature:node[node]:::kmp-feature
  :feature:node -.-> :core:common
  :feature:node -.-> :core:data
  :feature:node -.-> :core:database
  :feature:node -.-> :core:datastore
  :feature:node -.-> :core:domain
  :feature:node -.-> :core:model
  :feature:node -.-> :core:navigation
  :feature:node -.-> :core:repository
  :feature:node -.-> :core:resources
  :feature:node -.-> :core:service
  :feature:node -.-> :core:ui
  :feature:node -.-> :core:di
  :feature:node -.-> :feature:map
  :feature:node -.-> :core:testing

classDef android-application fill:#CAFFBF,stroke:#000,stroke-width:2px,color:#000;
classDef android-application-compose fill:#CAFFBF,stroke:#000,stroke-width:2px,color:#000;
classDef compose-desktop-application fill:#CAFFBF,stroke:#000,stroke-width:2px,color:#000;
classDef android-feature fill:#FFD6A5,stroke:#000,stroke-width:2px,color:#000;
classDef android-library fill:#9BF6FF,stroke:#000,stroke-width:2px,color:#000;
classDef android-library-compose fill:#9BF6FF,stroke:#000,stroke-width:2px,color:#000;
classDef android-test fill:#A0C4FF,stroke:#000,stroke-width:2px,color:#000;
classDef jvm-library fill:#BDB2FF,stroke:#000,stroke-width:2px,color:#000;
classDef kmp-feature fill:#FFD6A5,stroke:#000,stroke-width:2px,color:#000;
classDef kmp-library-compose fill:#FFC1CC,stroke:#000,stroke-width:2px,color:#000;
classDef kmp-library fill:#FFC1CC,stroke:#000,stroke-width:2px,color:#000;
classDef unknown fill:#FFADAD,stroke:#000,stroke-width:2px,color:#000;