Commit Graph

271 Commits

Author SHA1 Message Date
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
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
63faf20fc5 refactor: unify navigation display and enhance desktop adaptive layout
- Replace the standard `NavDisplay` with the custom `MeshtasticNavDisplay` in `AppIntroductionScreen` to centralize navigation and backstack handling.
- Update `DesktopMainScreen` to transition from a persistent `NavigationRail` to an adaptive navigation shell.
- Clean up unused imports related to `NavigationRail`, `NavKey`, and `NavDisplay` across desktop and intro features.
2026-03-26 15:03:54 -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
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
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
57242d905c refactor: Consolidate UI preference handling (#4895) 2026-03-23 19:36:02 +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
cb89b111de refactor(messaging): fix contact key derivation in ContactsViewModel (#4887)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-23 12:14:01 +00:00
James Rich
27bcbcb7be fix(settings): remove redundant regex option in DebugViewModel (#4881) 2026-03-22 07:41:52 -05: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
James Rich
00697cc3c1 feat: KMP Debug Panel Migration and Update Documentation (#4859)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-19 19:07:03 +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
bc08093f6c fix(map, settings): allow null IDs and implement request timeout (#4851) 2026-03-19 12:36:14 -05:00
James Rich
b982b145e6 feat: Implement KMP ServiceDiscovery for TCP devices (#4854) 2026-03-19 17:19:58 +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
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
James Rich
7d63f8b824 feat: build logic (#4829)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-17 20:35:39 +00:00
James Rich
807db83f53 feat: service extraction (#4828) 2026-03-17 14:06:01 -05:00
James Rich
a10fe61d0f fix: resolve crashes and debug filter issues in Metrics and MapView (#4824)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-17 14:04:41 +00:00
James Rich
8c964a15ca feat: Integrate notification management and preferences across platforms (#4819)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-17 01:17:34 +00:00
James Rich
0b2e89c46f refactor: Replace Nordic, use Kable backend for Desktop and Android with BLE support (#4818)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-16 23:06:43 +00:00
James Rich
6e81ceec91 feat: Complete ViewModel extraction and update documentation (#4817) 2026-03-16 20:05:50 +00:00
James Rich
5edb8abd05 feat: enhance map navigation and waypoint handling (#4814)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-16 13:48:00 +00:00
James Rich
06f002a198 refactor(settings): improve destination node handling in RadioConfigViewModel (#4790)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-14 02:55:46 +00:00
James Rich
427c0f3bbb fix: fix animation stalls and update dependencies for stability (#4784)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-13 23:01:17 +00:00
James Rich
5cc1e94a13 fix(ble): implement scanning for unbonded devices in common connections ui (#4779)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-13 16:33:30 +00:00
James Rich
eb3349fa11 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4773) 2026-03-12 22:15:20 -05:00
James Rich
3321c47200 ci: Update Dokka configuration and unify AboutLibraries JSON generation (#4767)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-13 01:49:11 +00:00
James Rich
ac6bb5479b feat: introduce Desktop target and expand Kotlin Multiplatform (KMP) architecture (#4761)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-12 21:14:49 +00:00
James Rich
d076361c55 refactor: migrate core UI and features to KMP, adopt Navigation 3 (#4750)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-10 17:29:47 +00:00
James Rich
b1070321fe chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4748) 2026-03-09 20:45:41 -05:00
James Rich
875cf1cff2 refactor: migrate from Hilt to Koin and expand KMP common modules (#4746)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-10 01:19:46 +00:00
James Rich
a5390a80e7 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4739) 2026-03-06 20:59:08 -06:00