Commit Graph

136 Commits

Author SHA1 Message Date
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
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
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
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
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
1e55e554be feat: Add KMP URI handling, import, and QR code generation support (#4856) 2026-03-19 13:36:19 -05: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
dcbbc0823b feat: Integrate Mokkery and Turbine into KMP testing framework (#4845) 2026-03-18 18:33:37 -05: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
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
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
eb3349fa11 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4773) 2026-03-12 22:15:20 -05: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
a902da4ca0 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4749) 2026-03-11 14:56:55 +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
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
James Rich
0ce322a0f5 feat: Migrate project to Kotlin Multiplatform (KMP) architecture (#4738)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-07 02:43:45 +00:00
James Rich
b9b68d2779 refactor: migrate preferences to DataStore and decouple core:domain for KMP (#4731) 2026-03-05 20:37:35 -06:00
James Rich
b0258d0cf1 feat: Add "Mark all as read" and unread message count indicators (#4720) 2026-03-05 18:18:34 +00:00
James Rich
2c49db8041 feat/decoupling (#4685)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-03 13:15:28 +00:00
James Rich
b2b21e10e2 feat: upcoming support for tak and trafficmanagement configs, device hw (#4671)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-27 17:44:19 +00:00
James Rich
145cde9393 chore(deps): bump deps to take advantage of new functionality (#4658)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-26 13:26:50 +00:00
James Rich
d408964f07 refactor: KMP Migration, Messaging Modularization, and Handshake Robustness (#4631)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-24 12:37:33 +00:00
James Rich
2676a51647 refactor(ui): compose resources, domain layer (#4628)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-23 03:39:50 +00:00
nreisbeck
7d7292a54a fix(qr): add channels as key to remember block to fix add-channel rac… (#4607)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
Co-authored-by: James Rich <2199651+jamesarich@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-20 21:01:45 -06:00
James Rich
6bfa5b5f70 refactor(ble): Centralize BLE logic into a core module (#4550)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-20 12:41:52 +00:00