detekt's source set list never included src/wasmJsMain or src/nonWebMain,
so every prior "detekt clean" claim in this effort never actually scanned
wasmJs code. Found while adding :webApp (whose entire source lives in
wasmJsMain and reported NO-SOURCE forever) and fixed at the root: both
source sets are now scanned repo-wide. Real findings it surfaced are
suppressed with honest, specific justification (embedded js("...") string
interop that static analysis can't see into) or fixed outright — nothing
silenced to dodge a genuine issue.
core:ble's own compileTestKotlinWasmJs had never actually been exercised:
7 of its 9 commonTest files reference Kable directly, which has no wasmJs
target, so they silently never compiled for wasmJs until this pass tried.
Moved them to a new nonWebTest source set, matching this effort's existing
android/jvm/ios-only test pattern elsewhere.
core:repository had a latent iOS-hierarchy trap: a manual nonWebTest
dependsOn edge (needed once core:testing was pulled out of commonTest)
silently disabled Kotlin's default hierarchy template, which is what wires
iosMain to the leaf iOS compilations. Restored the explicit
applyHierarchyTemplate(default) call alongside the manual edge.
Also tried retrofitting every wasmJs-enabled module to wasmJs { browser() }
to satisfy KGP's root npm resolver ahead of the webApp module (see next
commit) — reverted repo-wide: browser() arms each module's
wasmJsBrowserTest task, which allTests then picks up with no
karma/headless-Chrome runner configured anywhere in this repo, a CI-gate
regression that outweighs the benefit. Every wasmJs-enabled module's
comment now explains this explicitly instead of the stale "that's for the
eventual webApp executable" text, which turned out to be wrong.
core:ui's MeshtasticNavigationSuite gained an optional visibleDestinations
parameter (default: today's full tab set) so a host can hide a tab it has
no entry provider for without a per-platform expect/actual — needed by
webApp, which omits Map.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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>