Commit Graph

50 Commits

Author SHA1 Message Date
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
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
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
3748f74d67 feat: upgrade to Navigation 3 Beta 01 and implement entry-scoped ViewModels
- Update Navigation 3 to `1.1.0-beta01`, JetBrains Lifecycle to `2.11.0-alpha02`, and Compose Multiplatform to `1.11.0-beta01`.
- Integrate `ViewModelStoreNavEntryDecorator` and `SaveableStateHolderNavEntryDecorator` into `NavDisplay` for both Android and Desktop shells.
- Enable automatic ViewModel scoping where ViewModels obtained via `koinViewModel()` inside `entry<T>` blocks are now tied to the backstack entry's lifetime and cleared on pop.
- Add `jetbrains.lifecycle.viewmodel.navigation3` dependency to support entry-level `ViewModelStore` management.
- Update `AGENTS.md`, `GEMINI.md`, and `copilot-instructions.md` to reflect the transition from Activity/Window-scoped ViewModels to entry-scoped lifecycles.
- Introduce `navigation3-api-alignment-2026-03.md` to document the audit of Navigation 3 Scene architecture and Material 3 Adaptive integration.
- Update `kmp-status.md` and existing decision docs to reflect the new dependency baseline and predictive back handling via `NavigationBackHandler`.
2026-03-26 13:33:10 -05:00
James Rich
3b485a0109 build: enable -Xjvm-default=all compiler flag (#4929)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-26 13:16:04 +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
9b8ac6a460 build(desktop): enable ProGuard minification and tree-shaking (#4904)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-24 22:22:37 +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
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
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
acb328dae3 refactor(desktop): remove native MenuBar from main window (#4888)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-23 12:20:07 +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
f04924ded5 chore: Enhance CI coverage reporting and add main branch workflow (#4873) 2026-03-21 16:54:17 +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
c4087c2ab7 feat: Migrate to Room 3.0 and update related documentation and tracks (#4865) 2026-03-20 21:40:08 +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
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
807db83f53 feat: service extraction (#4828) 2026-03-17 14:06:01 -05:00
James Rich
9ad28e924f build: fix license generation and analytics build tasks (#4820)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-17 01:21:29 +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
513dcc2f78 Revert "ci: Integrate Conveyor for cross-platform desktop packaging and simplify build" (#4804) 2026-03-14 13:25:28 -05:00
James Rich
e29fd596b6 ci: Integrate Conveyor for cross-platform desktop packaging and simplify build (#4802) 2026-03-14 12:44:55 -05:00
James Rich
609d24a9e4 build(desktop): dynamically configure target formats based on host OS (#4796) 2026-03-14 09:38:34 -05:00
James Rich
a8044a2402 build(desktop): refactor native distribution target formats (#4794) 2026-03-14 09:11:18 -05:00
James Rich
acf7aea098 feat(desktop): add enter-to-send functionality in messaging (#4793) 2026-03-14 08:43:25 -05: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
2bfd225b68 build: Update desktop app icons, versioning, and packaging configuration (#4789) 2026-03-13 20:05:22 -05:00
James Rich
305466514a build: remove PKG from desktop distribution targets (#4788) 2026-03-13 19:07:35 -05:00
James Rich
48740fe280 build(desktop): include java.net.http module in native distribution (#4787) 2026-03-13 19:02:29 -05: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
90844301e8 feat(desktop): expand supported native distribution formats (#4783) 2026-03-13 13:23:34 -05:00
James Rich
f45993ede2 feat(desktop): implement DI auto-wiring and validation (#4782)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-13 18:08:55 +00:00
James Rich
afe1356430 build: streamline icon file configuration for desktop platforms
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-03-12 23:11:20 -05:00
James Rich
aacf5c69e9 Disable ProGuard for desktop release and add application icon (#4776) 2026-03-12 23:09:18 -05:00
James Rich
0ed9b6633b build(ci): optimize release workflow and update Room configuration (#4775) 2026-03-12 22:46:01 -05:00
James Rich
87e291f58d build(desktop): enable ProGuard for release builds (#4772) 2026-03-12 21:57:29 -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