Commit Graph

665 Commits

Author SHA1 Message Date
James Rich
07ff900ef5 test: add verification for MultiBackstack navigation logic 2026-03-27 08:10:26 -05:00
James Rich
2d759d8e81 docs: update playbook with multiple backstack architecture 2026-03-27 07:53:57 -05:00
James Rich
763a8f8b07 style: apply spotless formatting 2026-03-26 22:17:16 -05:00
James Rich
48ac9a9019 feat(ui): align multiple backstacks with Navigation 3 official recipes
Refactored the application's multi-tab navigation to strictly align with the official AndroidX `nav3-recipes` for multiple backstacks.

Previously, swapping a single `NavBackStack` list instance caused Navigation 3 to perceive old entries as "popped," leading to the destruction of their associated `ViewModelStore` and UI state.

This commit resolves the issue by:
- Redesigning `MultiBackstack` as a state holder managing independent `NavBackStack` instances per tab.
- Modifying `MeshtasticNavDisplay` to bind a fresh set of decorators (specifically `SaveableStateHolderNavEntryDecorator` and `ViewModelStoreNavEntryDecorator`) to the active backstack dynamically via `remember(backStack)`. This ensures decorators are swapped alongside the stack, preserving state for inactive tabs.
- Implementing the standard "exit through home" back-handling pattern across all platforms.
- Removing legacy manual string keys from `koinViewModel()` injections, as `ViewModelStoreNavEntryDecorator` now correctly isolates ViewModel scope per entry.
- Added `androidx.lifecycle.viewmodel.navigation3` dependencies to the `app` and `desktop` root modules to support the decorator injections at the root composition level.
2026-03-26 22:16:44 -05:00
James Rich
39333b3bea feat(ui): implement draggable pane expansion in adaptive navigation
This commit enhances the adaptive navigation system by adding draggable dividers to the list-detail and supporting pane layouts. This allows users to manually resize panes in multi-pane "Power User" scenes on larger displays.

Specific changes include:
- **Navigation Enhancements**: Updated `MeshtasticNavDisplay` to include `rememberPaneExpansionState` and `VerticalDragHandle` within `ListDetailSceneStrategy` and `SupportingPaneSceneStrategy`.
- **UI Components**: Configured `paneExpansionDraggable` modifiers with a minimum touch target of 48.dp for improved accessibility.
- **Documentation**: Updated `AGENTS.md` to reflect the availability of draggable dividers (`VerticalDragHandle` + `paneExpansionState`) for widths ≥ 1200dp.
- **Code Style**: Applied consistent formatting and line-wrapping across `NavBackStackExt.kt`, `MeshtasticAppShell.kt`, `ContactsNavigation.kt`, and `MeshtasticNavigationSuite.kt`.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-26 19:40:14 -05:00
James Rich
bffbe9ffbc feat(ui): implement adaptive extra pane strategy for navigation
This commit enhances the navigation system to support adaptive layouts by integrating `SupportingPaneSceneStrategy` and marking specific routes to utilize the "extra pane" in list-detail scenarios.

Specific changes include:
- **Navigation Infrastructure**: Added `supportingPaneSceneStrategy` to `MeshtasticNavDisplay` and updated documentation to reflect support for `extraPane()` and supporting pane layouts.
- **Node Feature**: Updated `NodeMap`, `TracerouteLog`, `TracerouteMap`, and generic node detail screens in `NodesNavigation.kt` to use `ListDetailSceneStrategy.extraPane()`.
- **Messaging Feature**: Updated `Share` and `QuickChat` routes in `ContactsNavigation.kt` to use `ListDetailSceneStrategy.extraPane()`.
- **API Integration**: Applied `ExperimentalMaterial3AdaptiveApi` where necessary to support the new adaptive navigation strategies.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-26 18:57:18 -05:00
James Rich
0bcd35e616 refactor(ui): toggle navigation labels based on layout type
This commit updates the `MeshtasticNavigationSuite` to conditionally show text labels based on the active navigation layout. Labels are now explicitly shown when using a `NavigationRail` and hidden otherwise to improve the visual density and consistency of the navigation UI across different adaptive breakpoints.

Specific changes include:
- Introduced a `showLabels` boolean determined by the current `layoutType`.
- Updated `NavigationSuiteScaffold` to only render the destination `label` if `showLabels` is true.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-26 18:11:54 -05:00
James Rich
02ea30d665 refactor: improve navigation backstack handling and screen decoupling
This commit refactors the navigation logic across `feature:node` and `feature:messaging` to use more robust backstack manipulation helpers and decouple screen implementations from navigation parameters.

Specific changes include:
- **Navigation Helpers**: Added `replaceLast` and `replaceAll` extensions to `MutableList<NavKey>` in `core:navigation` to allow more granular control over backstack mutations while minimizing structural changes.
- **Node Feature**:
    - Updated `NodesRoutes.NodeDetail` entry to directly instantiate `NodeDetailViewModel` and `CompassViewModel` using Koin, removing the reliance on `AdaptiveNodeListScreen` for detail rendering.
    - Simplified `AdaptiveNodeListScreen` by removing unused navigation and initialization parameters.
- **Messaging Feature**:
    - Refactored `ContactsRoutes.Messages` entry to handle ViewModel lifecycle and contact key initialization directly within the navigation graph.
    - Updated `ShareScreen` to use the new `replaceLast` helper for smoother transitions to message screens.
    - Simplified `AdaptiveContactsScreen` and `ContactsEntryContent` by removing unused `detailPaneCustom` and initialization logic.
- **Deep Linking**: Updated `MeshtasticAppShell` to use `backStack.replaceAll(navKeys)` when handling deep links, ensuring a cleaner backstack state transition.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-26 17:28:51 -05:00
James Rich
4b4b68c443 refactor: migrate list-detail layouts to Material 3 Adaptive Navigation3
- Replace the custom `AdaptiveListDetailScaffold` with the official `ListDetailSceneStrategy` to manage adaptive layout orchestration.
- Integrate `ListDetailSceneStrategy` into `MeshtasticNavDisplay` to enable native pane switching based on the navigation backstack.
- Update `ContactsNavigation` and `NodesNavigation` graphs to include `listPane()` and `detailPane()` metadata for relevant route entries.
- Simplify `AdaptiveContactsScreen` and `AdaptiveNodeListScreen` by removing manual scaffold navigation logic and delegating to the navigation framework.
- Add the `jetbrains.compose.material3.adaptive.navigation3` library dependency to `core:ui` and relevant feature modules.
- Refactor `DesktopMainScreen` and `Main.kt` with minor formatting and indentation updates for better readability.
2026-03-26 16:52:08 -05:00
James Rich
4e027ca28e refactor: streamline main screen navigation and ViewModel injection
- Update `MainScreen` (Android) and `DesktopMainScreen` to manage their own `NavBackStack` initialization internally.
- Refactor `MainScreen` to obtain `UIViewModel` via Koin injection instead of receiving it as a parameter from `MainActivity`.
- Remove default bottom padding from `MeshtasticAppShell` and associated screen-level modifiers to allow for more flexible layout orchestration.
- Simplify `DesktopMainScreen` by moving backstack management inside the composable and cleaning up the navigation provider logic.
- Remove redundant lint suppressions in `Main.kt` following the simplification of the main screen composable structure.
- Clean up imports and normalize the usage of `MeshtasticNavDisplay` and `MeshtasticNavigationSuite` across platforms.
2026-03-26 15:53:15 -05:00
James Rich
cb31de73ad feat: implement MeshtasticNavDisplay and centralize Navigation 3 configuration
- Introduce `MeshtasticNavDisplay` in `core:ui` to encapsulate shared Navigation 3 configuration, including entry decorators, scene strategies, and transitions.
- Integrate `rememberViewModelStoreNavEntryDecorator` to provide entry-scoped `ViewModelStoreOwner` support, ensuring ViewModels are automatically cleared when their backstack entry is popped.
- Configure `DialogSceneStrategy` to enable navigation-driven dialogs that respect backstack lifecycle and predictive back gestures.
- Implement a standardized 350 ms crossfade transition for both forward and pop navigation across all platforms.
- Refactor `app` and `desktop` host modules to utilize `MeshtasticNavDisplay`, removing redundant manual configuration of `NavDisplay` and decorators.
- Update `core:ui` dependencies to include `lifecycle-viewmodel-navigation3` and move it away from platform-specific host modules.
- Update architectural documentation (`AGENTS.md`, `GEMINI.md`, and decision logs) to reflect the adoption of centralized navigation and ViewModel scoping patterns.
2026-03-26 13:54:27 -05:00
James Rich
9cdc78ac47 feat: refactor adaptive navigation using NavigationSuiteScaffold
- Integrate the `material3-adaptive-navigation-suite` library to streamline cross-platform navigation layouts.
- Replace manual branching logic for `NavigationBar` and `NavigationRail` with `NavigationSuiteScaffold` in `MeshtasticNavigationSuite`.
- Implement a `coerceNavigationType` helper to ensure `NavigationRail` is used for expanded widths instead of promoting to a `NavigationDrawer`.
- Utilize `currentWindowAdaptiveInfo` with large-width breakpoint support to improve responsiveness on Desktop and external displays.
- Remove redundant `MeshtasticNavigationBar` and `MeshtasticNavigationRail` private composables in favor of the standard navigation suite item API.
2026-03-26 12:23:26 -05:00
James Rich
141b54ff9c feat: migrate to Material 3 Expressive APIs (#4934)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-26 16:42:46 +00:00
James Rich
518096ddc8 build: update Compose Multiplatform and migrate lifecycle dependencies (#4932)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-26 15:18:45 +00:00
James Rich
7484cc69b4 refactor(ui): remove labels from navigation suite items (#4924) 2026-03-25 21:14:17 -05:00
James Rich
a005231d94 Refactor map layer management and navigation infrastructure (#4921)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-26 00:29:24 +00:00
James Rich
8ce17defb7 refactor: remove demoscenario and enhance BLE connection stability (#4914)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-25 14:24:42 +00:00
James Rich
6516287c62 refactor: BLE transport and UI for Kotlin Multiplatform unification (#4911)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-25 02:15:51 +00:00
James Rich
b0e91a390c feat: implement unified deep link routing for Kotlin Multiplatform (#4910)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-25 00:21:24 +00:00
James Rich
553ca2f8ed feat: implement global SnackbarManager and consolidate common UI setup (#4909)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-24 22:31:40 +00:00
James Rich
b45bc9be90 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4905) 2026-03-24 15:49:49 +00:00
James Rich
96060a0a4d refactor: coroutine dispatchers and modernize testing infrastructure (#4901)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-24 01:31:48 +00:00
James Rich
664ebf218e refactor: null safety, update date/time libraries, and migrate tests (#4900)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-23 23:17:50 +00:00
James Rich
a0b4c56505 feat: optimistically persist local configs and channels (#4898)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-23 19:57:45 +00:00
James Rich
57242d905c refactor: Consolidate UI preference handling (#4895) 2026-03-23 19:36:02 +00:00
James Rich
82466be072 feat: Integrate AlertHost into desktop application and add UI tests (#4893) 2026-03-23 18:19:41 +00:00
James Rich
7b327215f3 refactor: adaptive UI components for Navigation 3 (#4891) 2026-03-23 12:35:02 -05:00
James Rich
b3b38acc0b feat: Migrate networking to Ktor and enhance multiplatform support (#4890)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-23 16:48:10 +00:00
James Rich
d5d4aa4577 refactor(service): update string formatting for local stats notif (#4885)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-22 15:55:30 +00:00
renovate[bot]
883ab5f7da chore(deps): update core/proto/src/main/proto digest to cb1f893 (#4882)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-22 12:56:23 +00:00
James Rich
55729c9e2d chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4880) 2026-03-22 12:52:15 +00:00
James Rich
c38bfc64de Refactor command handling, enhance tests, and improve discovery logic (#4878)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-22 05:42:27 +00:00
James Rich
d136b162a4 feat: Implement iOS support and unify Compose Multiplatform infrastructure (#4876) 2026-03-21 23:19:13 +00:00
James Rich
88d11aafec fix: Update messaging feature with contact item keys and MQTT limits (#4871) 2026-03-21 14:25:23 +00:00
renovate[bot]
d61c0c9a67 chore(deps): update core/proto/src/main/proto digest to ee7df89 (#4868)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-21 13:07:44 +00:00
James Rich
3bd8669cbe fix: Implement reconnection logic and stabilize BLE connection flow (#4870) 2026-03-21 12:49:03 +00:00
James Rich
6e50db0b91 docs: Unify notification channel management and migrate unit tests (#4867) 2026-03-20 22:58:47 +00:00
James Rich
c4087c2ab7 feat: Migrate to Room 3.0 and update related documentation and tracks (#4865) 2026-03-20 21:40:08 +00:00
James Rich
1e55e554be feat: Add KMP URI handling, import, and QR code generation support (#4856) 2026-03-19 13:36:19 -05:00
James Rich
b982b145e6 feat: Implement KMP ServiceDiscovery for TCP devices (#4854) 2026-03-19 17:19:58 +00:00
James Rich
cdba140eeb chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4846) 2026-03-19 12:30:01 +00:00
James Rich
06b9f8c77a feat: Enhance test coverage (#4847)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-19 03:09:19 +00:00
James Rich
1b0dc75dfe feat: Complete app module thinning and feature module extraction (#4844) 2026-03-19 00:21:18 +00:00
James Rich
dcbbc0823b feat: Integrate Mokkery and Turbine into KMP testing framework (#4845) 2026-03-18 18:33:37 -05:00
James Rich
df3a094430 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4843) 2026-03-18 21:25:06 +00:00
James Rich
54b07d41de chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4840) 2026-03-18 18:54:03 +00:00
James Rich
d314ee2d8a feat: mqtt (#4841) 2026-03-18 18:39:20 +00:00
Victorio Berra
eae5a6bdac Add "Exclude MQTT" filter to Nodes view. (#4825)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: James Rich <2199651+jamesarich@users.noreply.github.com>
Co-authored-by: James Rich <james.a.rich@gmail.com>
2026-03-18 15:39:59 +00:00
James Rich
59408ef46e feat: Desktop USB serial transport (#4836)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-18 12:42:24 +00:00
James Rich
cb95cace25 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4832) 2026-03-17 16:51:09 -05:00