From 23c96e7a8198d3588edb03516561191747d7dbd2 Mon Sep 17 00:00:00 2001 From: Rocket U <295286384+rocket-a12@users.noreply.github.com> Date: Fri, 7 Aug 2026 12:24:57 -0700 Subject: [PATCH] fix(desktop): Allow new project creation during session move - Introduces a mechanism to trigger the new project creation flow when moving a session. - Resolves the issue where project creation was blocked within session drop-down menus. --- desktop/src/main/kotlin/io/askimo/desktop/Main.kt | 5 +++-- .../main/kotlin/io/askimo/desktop/shell/NavigationSidebar.kt | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/desktop/src/main/kotlin/io/askimo/desktop/Main.kt b/desktop/src/main/kotlin/io/askimo/desktop/Main.kt index f53c87a8..2f89200b 100644 --- a/desktop/src/main/kotlin/io/askimo/desktop/Main.kt +++ b/desktop/src/main/kotlin/io/askimo/desktop/Main.kt @@ -27,7 +27,6 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.LaunchedEffect -import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateListOf import androidx.compose.runtime.mutableStateMapOf @@ -1022,6 +1021,9 @@ fun app(frameWindowScope: FrameWindowScope? = null, windowState: WindowState? = sessionMemorySessionId = sessionId showSessionMemoryDialog = true }, + onMoveSessionToNewProject = { + showNewProjectDialog = true + }, onEditProject = { projectId -> editingProjectId = projectId showEditProjectDialog = true @@ -2017,7 +2019,6 @@ fun mainContent( onOpenSystemDiagnostics: () -> Unit = {}, bookmarksViewModel: BookmarksViewModel? = null, ) { - val discoverRefresh by appContext.telemetry.refreshSignal.collectAsState() Box( modifier = Modifier .fillMaxSize() diff --git a/desktop/src/main/kotlin/io/askimo/desktop/shell/NavigationSidebar.kt b/desktop/src/main/kotlin/io/askimo/desktop/shell/NavigationSidebar.kt index 53a3ccb9..41066d35 100644 --- a/desktop/src/main/kotlin/io/askimo/desktop/shell/NavigationSidebar.kt +++ b/desktop/src/main/kotlin/io/askimo/desktop/shell/NavigationSidebar.kt @@ -78,6 +78,7 @@ fun navigationSidebar( onRenameSession: (String, String) -> Unit, onExportSession: (String) -> Unit, onShowSessionSummary: (String) -> Unit = {}, + onMoveSessionToNewProject: (sessionId: String) -> Unit = {}, onEditProject: (String) -> Unit = {}, onDeleteProject: (String) -> Unit = {}, onEditUserProfile: () -> Unit, @@ -118,6 +119,7 @@ fun navigationSidebar( onRenameSession = onRenameSession, onExportSession = onExportSession, onShowSessionSummary = onShowSessionSummary, + onMoveSessionToNewProject = onMoveSessionToNewProject, onEditProject = onEditProject, onDeleteProject = onDeleteProject, userProfileContent = {