Skip to content

fix: fix animation stalls and update dependencies for stability#4784

Merged
jamesarich merged 7 commits intomainfrom
fix/animations
Mar 13, 2026
Merged

fix: fix animation stalls and update dependencies for stability#4784
jamesarich merged 7 commits intomainfrom
fix/animations

Conversation

@jamesarich
Copy link
Copy Markdown
Collaborator

This pull request updates documentation and code to improve support for JetBrains Compose Multiplatform and its related libraries, clarify dependency usage, and clean up UI code. The main focus is on ensuring correct usage of JetBrains-forked dependencies, updating architecture documentation for multiplatform support, and simplifying some Compose UI components.

Multiplatform and Dependency Updates:

  • Updated documentation (README.md, AGENTS.md, GEMINI.md, .github/copilot-instructions.md) to clarify that the project targets both Android and Compose Desktop, and to specify the use of JetBrains Compose Multiplatform and JetBrains-forked AndroidX artifacts. Added instructions to never mix JetBrains and Google AndroidX dependencies in commonMain, and to use the correct version catalog aliases (e.g., jetbrains-*, compose-multiplatform-*). [1] [2] [3] [4] [5]

  • Updated Gradle dependencies in app/build.gradle.kts to use JetBrains Compose Multiplatform and JetBrains-forked AndroidX libraries instead of the Google AndroidX versions, ensuring consistency with multiplatform requirements. [1] [2]

Testing and Build Instructions:

  • Changed test command instructions in documentation to explicitly run flavor-specific unit tests for CI alignment, improving clarity and reliability of test execution. [1] [2]

Compose UI Cleanup:

  • Removed usage of deprecated or unnecessary APIs (ExperimentalMaterial3ExpressiveApi, HorizontalFloatingToolbar) and replaced with standard Compose components, simplifying the code in MapView.kt and MapControlsOverlay.kt. Also standardized typography usage for consistency. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Documentation and Project Tracking:

  • Added new conductor documentation and metadata for tracking and fixing Android animation issues, including a specification, implementation plan, and metadata file. [1] [2] [3]

These changes ensure the project is ready for multiplatform development, clarify dependency management, and improve code maintainability and documentation.

This commit addresses several issues where animations were stalling or failing to fire on Android, primarily by reverting to stable Compose Material3 components and optimizing state collection to prevent excessive recompositions.

Specific changes include:

- **UI Components & Stability**:
  - Replaced `CircularWavyProgressIndicator` and `LinearWavyProgressIndicator` with standard `CircularProgressIndicator` and `LinearProgressIndicator` in `FirmwareUpdateScreen.kt` and `MapControlsOverlay.kt`.
  - Removed several usages of `@OptIn(ExperimentalMaterial3ExpressiveApi::class)` and related experimental components like `HorizontalFloatingToolbar` to improve stability.
  - Reverted `androidx-compose-bom` from `2026.03.00-alpha` to `2025.12.00` and downgraded Compose Multiplatform to `1.10.2`.

- **Performance & Recomposition Logic**:
  - Refactored `ConnectionsScreen.kt` to use `distinctUntilChanged` on `ourNodeInfo` to prevent continuous recompositions triggered by high-frequency updates (e.g., SNR/lastHeard).
  - Updated `ScannerViewModel.kt` to use `flowOn(Dispatchers.IO)` for BLE scanning and `distinctUntilChanged()` on UI StateFlows to minimize redundant updates.
  - Improved `AnimatedConnectionsNavIcon.kt` by using `conflate()` and suspending the collection during the 1-second animation to prevent event backlog.

- **Feature Fixes & Maintenance**:
  - Fixed an issue in `NodeListScreen.kt` where the `MeshtasticImportFAB` was not correctly checking visibility conditions.
  - Updated the desktop application's default version to `1.1.0`.
  - Added project track documentation and metadata for the animation stall regression.

Signed-off-by: James Rich <[email protected]>
This commit updates several core dependencies to their latest alpha/beta versions to maintain compatibility with the evolving Kotlin Multiplatform (KMP) ecosystem. It also consolidates Material 3 Adaptive dependencies under the JetBrains coordinates to ensure consistency across Android and Desktop platforms.

Specific changes include:
- **Dependency Updates**:
    - Compose Multiplatform: `1.11.0-alpha03` → `1.11.0-alpha04`.
    - JetBrains Navigation 3: `1.1.0-alpha03` → `1.1.0-alpha04`.
    - JetBrains Lifecycle: `2.10.0-alpha08` → `2.10.0-beta01`.
    - Koin: `4.2.0-RC1` → `4.2.0-RC2`.
- **Library Consolidation**: Switched `androidx.compose.material3.adaptive` dependencies to `org.jetbrains.compose.material3.adaptive` in the `app` module for better cross-platform alignment.
- **Resource Management**:
    - Added new string templates (`device_metrics_percent_value`, etc.) to `strings.xml` for localized device metric formatting.
    - Refactored `DeviceMetrics.kt` to use `stringResource` and formatted templates instead of hardcoded strings, improving internationalization support in `commonMain`.
- **Documentation**:
    - Updated `kmp-status.md`, `navigation3-parity-2026-03.md`, and `agent-playbooks/README.md` to reflect the new dependency baseline and provide guidance on the `navigation3-ui` artifact mapping.
- **Project Config**: Added `androidx.lifecycle.runtime.compose` to the `node` feature module.

Signed-off-by: James Rich <[email protected]>
…talog

This commit refactors the project's build configuration to use explicitly defined Compose Multiplatform dependencies from the Version Catalog (`libs.versions.toml`) instead of the implicit `compose` plugin accessors. This improves consistency across multiplatform modules and prepares the project for better dependency management.

Specific changes include:
- **Version Catalog Updates**:
    - Added explicit definitions for `foundation`, `ui`, `ui-tooling`, `material3`, and `material-icons-extended` under the `compose-multiplatform` namespace in `libs.versions.toml`.
    - Removed unused dependencies: `androidx-emoji2-emojipicker`, `androidx-compose-runtime-livedata`, `guava`, `kotlinx-coroutines-android`, `coil-network-core`, and `nordic-common-logger`.
- **Module Configuration**:
    - Updated `desktop`, `core:ui`, `core:nfc`, and various feature modules (`node`, `messaging`, `settings`, `connections`) to use the new `libs.compose.multiplatform.*` references.
    - Standardized dependency declarations across `commonMain` and `androidMain` source sets to use the Version Catalog.

Signed-off-by: James Rich <[email protected]>
This commit updates `README.md`, `AGENTS.md`, and `GEMINI.md` to reflect the project's expanded scope, including support for Compose Desktop and stricter guidelines for Kotlin Multiplatform (KMP) development.

Specific changes include:
- Updated project descriptions to include Compose Desktop as a supported platform alongside Android.
- Refined architecture documentation to specify target platforms (Android and JVM/Desktop) and the use of JetBrains Navigation 3.
- Added explicit guidelines for dependency management in `commonMain`, emphasizing the use of `jetbrains-*` and `compose-multiplatform-*` version catalog aliases to avoid platform-specific AndroidX conflicts.
- Clarified DI setup, noting that root graph assembly is now centralized in both `app` (Android) and `desktop` modules.
- Updated technical specifications to mention the K2 compiler plugin for Koin Annotations and the use of Room KMP for the database layer.

Signed-off-by: James Rich <[email protected]>
@github-actions github-actions bot added the bugfix PR tag label Mar 13, 2026
@jamesarich jamesarich enabled auto-merge March 13, 2026 22:45
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 13, 2026

Codecov Report

❌ Patch coverage is 72.72727% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 12.23%. Comparing base (347edb7) to head (1f7cf5d).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...meshtastic/feature/connections/ScannerViewModel.kt 72.72% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##            main    #4784      +/-   ##
=========================================
+ Coverage   9.51%   12.23%   +2.71%     
=========================================
  Files        481      530      +49     
  Lines      16404    17753    +1349     
  Branches    2405     2651     +246     
=========================================
+ Hits        1561     2172     +611     
- Misses     14584    15267     +683     
- Partials     259      314      +55     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jamesarich jamesarich added this pull request to the merge queue Mar 13, 2026
Merged via the queue into main with commit 427c0f3 Mar 13, 2026
7 checks passed
@jamesarich jamesarich deleted the fix/animations branch March 13, 2026 23:10
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.

1 participant