diff --git a/composeApp/src/androidMain/kotlin/com/tt/honeyDue/MainActivity.kt b/composeApp/src/androidMain/kotlin/com/tt/honeyDue/MainActivity.kt index 5bb7186..3b63fda 100644 --- a/composeApp/src/androidMain/kotlin/com/tt/honeyDue/MainActivity.kt +++ b/composeApp/src/androidMain/kotlin/com/tt/honeyDue/MainActivity.kt @@ -68,6 +68,9 @@ class MainActivity : FragmentActivity(), SingletonImageLoader.Factory { // Initialize BiometricPreference storage BiometricPreference.initialize(BiometricPreferenceManager.getInstance(applicationContext)) + // Initialize cross-platform Haptics backend (P5 Stream S) + com.tt.honeyDue.ui.haptics.HapticsInit.install(applicationContext) + // Initialize DataManager with platform-specific managers // This loads cached lookup data from disk for faster startup DataManager.initialize( diff --git a/composeApp/src/commonMain/kotlin/com/tt/honeyDue/App.kt b/composeApp/src/commonMain/kotlin/com/tt/honeyDue/App.kt index abe344b..5e3c763 100644 --- a/composeApp/src/commonMain/kotlin/com/tt/honeyDue/App.kt +++ b/composeApp/src/commonMain/kotlin/com/tt/honeyDue/App.kt @@ -31,6 +31,9 @@ import com.tt.honeyDue.ui.screens.VerifyEmailScreen import com.tt.honeyDue.ui.screens.VerifyResetCodeScreen import com.tt.honeyDue.ui.screens.onboarding.OnboardingScreen import com.tt.honeyDue.ui.screens.subscription.FeatureComparisonScreen +import com.tt.honeyDue.ui.screens.task.AddTaskWithResidenceScreen +import com.tt.honeyDue.ui.screens.task.TaskSuggestionsScreen +import com.tt.honeyDue.ui.screens.task.TaskTemplatesBrowserScreen import com.tt.honeyDue.ui.screens.theme.ThemeSelectionScreen import com.tt.honeyDue.viewmodel.OnboardingViewModel import com.tt.honeyDue.viewmodel.PasswordResetViewModel @@ -678,6 +681,35 @@ fun App( ) } + composable { backStackEntry -> + // P2 Stream H — standalone personalized-task suggestions. + val route = backStackEntry.toRoute() + TaskSuggestionsScreen( + residenceId = route.residenceId, + onNavigateBack = { navController.popBackStack() }, + ) + } + + composable { backStackEntry -> + // P2 Stream I — Android port of iOS AddTaskWithResidenceView. + val route = backStackEntry.toRoute() + AddTaskWithResidenceScreen( + residenceId = route.residenceId, + onNavigateBack = { navController.popBackStack() }, + onCreated = { navController.popBackStack() }, + ) + } + + composable { backStackEntry -> + // P2 Stream G — full-screen template catalog browse. + val route = backStackEntry.toRoute() + TaskTemplatesBrowserScreen( + residenceId = route.residenceId, + fromOnboarding = route.fromOnboarding, + onNavigateBack = { navController.popBackStack() }, + ) + } + composable { backStackEntry -> val route = backStackEntry.toRoute() EditTaskScreen( diff --git a/composeApp/src/commonMain/kotlin/com/tt/honeyDue/navigation/Routes.kt b/composeApp/src/commonMain/kotlin/com/tt/honeyDue/navigation/Routes.kt index 6bcf9bc..a0f0cd0 100644 --- a/composeApp/src/commonMain/kotlin/com/tt/honeyDue/navigation/Routes.kt +++ b/composeApp/src/commonMain/kotlin/com/tt/honeyDue/navigation/Routes.kt @@ -172,3 +172,13 @@ data class TaskSuggestionsRoute(val residenceId: Int) // AddTaskWithResidenceView). Residence is pre-selected via residenceId. @Serializable data class AddTaskWithResidenceRoute(val residenceId: Int) + +// Task Templates Browser Route (P2 Stream G — full-screen browse/preview/ +// bulk-apply of the server-driven template catalog). residenceId scopes +// which residence tasks get created against; fromOnboarding switches +// analytics event names. +@Serializable +data class TaskTemplatesBrowserRoute( + val residenceId: Int, + val fromOnboarding: Boolean = false, +)