Files
James RichandClaude Sonnet 5 7201241030 fix(wasm): wire webApp into the live build, resolving KGP's root npm resolver conflict
Isolated the exact trigger of the previously-blocking "IllegalStateException:
:core:common is not configured for JS usage" error empirically: it's
webApp's binaries.executable() specifically, not wasmJs { browser() } in
general. Once any module in a multi-project build declares an executable
Kotlin/Wasm binary, KGP's root npm resolver (kotlinWasmNpmInstall)
requires EVERY module reachable from that binary's dependency graph to
also declare browser()/nodejs() -- bare wasmJs() no longer satisfies it.

Retrofitted wasmJs { browser() } onto all 18 wasmJs-enabled modules
(every core:* and feature:* module that previously stayed at bare
wasmJs()). An earlier attempt at this exact retrofit was reverted after
finding it arms wasmJsBrowserTest repo-wide with no karma/headless-Chrome
runner configured -- this time paired with a central disable in
KotlinAndroid.kt's configureKotlinMultiplatform() instead of reverting
the fix that actually solves the resolver conflict.

Two further, adjacent bugs surfaced once wasmJsBrowserTest's runtime
classpath actually existed for the first time (bare wasmJs() never
created one, so neither bug had ever fired before):

- ProjectExtensions.kt's configureTestOptions() was unconditionally
  injecting the JVM-only junit-platform-launcher into every
  "*TestRuntimeClasspath" configuration, including wasmJs's -- excluded
  wasmJs* configurations from that injection.
- Compose Multiplatform's plugin registers
  checkComposeUiTestConfigurationForWasmJs unconditionally on every
  Compose-enabled module with wasmJs { browser() }, regardless of
  whether it has real Compose UI tests (none of ours do) -- disabled
  centrally alongside wasmJsBrowserTest.

:webApp:wasmJsBrowserDistribution -- previously never even attempted in
the live build -- now succeeds and produces a real, loadable browser
bundle (webApp/build/dist/wasmJs/productionExecutable/). Getting there
also required relaxing settings.gradle.kts's repositoriesMode from
FAIL_ON_PROJECT_REPOS to PREFER_SETTINGS (a deliberate supply-chain
policy change, not incidental config) plus three settings-level,
content-filtered ivy repos for Kotlin/Wasm's NodeJs/Yarn/Binaryen setup
tasks (nodejs.org/dist, yarnpkg releases, WebAssembly/binaryen releases)
-- those setup tasks register their own project-level ivy repos, which
PREFER_SETTINGS ignores in favor of a settings-declared equivalent
rather than erroring outright the way FAIL_ON_PROJECT_REPOS does. The
content filters on each repo (includeModule) are what preserve
FAIL_ON_PROJECT_REPOS's original centralization intent: every repository
a build can pull from is still declared in exactly one place.
kotlin-js-store/wasm/yarn.lock is KGP's own generated lockfile for the
resolved npm/yarn dependency versions, committed per upstream convention
for reproducible builds.

Full repo baseline gate (spotlessCheck detekt assembleDebug test
allTests) passes clean with :webApp present in the build graph.

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

:core:data

Overview

The :core:data module holds the concrete implementations of the :core:repository contracts, serving as the primary data source for ViewModels in feature modules. It orchestrates data flow between the local database (core:database), remote services, and network repositories.

Key Components

1. Repository implementations (repository/)

  • NodeRepositoryImpl: High-level access to node information and mesh state (Room KMP backed).
  • MeshLogRepositoryImpl: Access to historical logs and diagnostics.
  • FirmwareReleaseRepositoryImpl: Manages the discovery and retrieval of firmware updates.

2. Manager implementations (manager/)

  • SessionManagerImpl: Per-node remote-admin passkey store.
  • PacketHandlerImpl / MeshMessageProcessorImpl: Inbound mesh packet handling and message processing.

Dependency Graph

graph TB
  :core:data[data]:::kmp-library
  :core:data --> :core:repository
  :core:data -.-> :core:common
  :core:data -.-> :core:database
  :core:data -.-> :core:datastore
  :core:data -.-> :core:di
  :core:data -.-> :core:model
  :core:data -.-> :core:network
  :core:data -.-> :core:prefs
  :core:data -.-> :core:takserver
  :core:data -.-> :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;