diff --git a/packages/app/src/app/_layout.tsx b/packages/app/src/app/_layout.tsx
index 344414d8c..c785066f0 100644
--- a/packages/app/src/app/_layout.tsx
+++ b/packages/app/src/app/_layout.tsx
@@ -620,7 +620,6 @@ export default function RootLayout() {
/>
-
diff --git a/packages/app/src/app/h/[serverId]/new-agent.tsx b/packages/app/src/app/h/[serverId]/new-agent.tsx
deleted file mode 100644
index 64bcc2833..000000000
--- a/packages/app/src/app/h/[serverId]/new-agent.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-import { useLocalSearchParams } from "expo-router";
-import { DraftAgentScreen } from "@/screens/agent/draft-agent-screen";
-
-export default function HostNewAgentRoute() {
- const params = useLocalSearchParams<{ serverId?: string }>();
- const serverId = typeof params.serverId === "string" ? params.serverId : "";
-
- return ;
-}
diff --git a/packages/app/src/components/left-sidebar.tsx b/packages/app/src/components/left-sidebar.tsx
index 927be8135..172959e9b 100644
--- a/packages/app/src/components/left-sidebar.tsx
+++ b/packages/app/src/components/left-sidebar.tsx
@@ -618,7 +618,8 @@ const styles = StyleSheet.create((theme) => ({
alignItems: 'center',
gap: theme.spacing[2],
paddingVertical: theme.spacing[1],
- paddingHorizontal: theme.spacing[1],
+ paddingRight: theme.spacing[1],
+ paddingLeft: theme.spacing[3],
flexShrink: 0,
},
newAgentButtonHovered: {},
diff --git a/packages/app/src/components/sidebar-workspace-list.tsx b/packages/app/src/components/sidebar-workspace-list.tsx
index 068f52e1b..09a50706a 100644
--- a/packages/app/src/components/sidebar-workspace-list.tsx
+++ b/packages/app/src/components/sidebar-workspace-list.tsx
@@ -33,7 +33,7 @@ import { getHostRuntimeStore, isHostRuntimeConnected } from '@/runtime/host-runt
import { getIsTauri } from '@/constants/layout'
import { projectIconQueryKey } from '@/hooks/use-project-icon-query'
import {
- buildHostNewAgentRoute,
+ buildHostWorkspaceRouteWithOpenIntent,
parseHostWorkspaceRouteFromPathname,
} from '@/utils/host-routes'
import {
@@ -71,6 +71,8 @@ import {
} from '@/components/ui/tooltip'
import { buildSidebarProjectRowModel } from '@/utils/sidebar-project-row-model'
import { useNavigationActiveWorkspaceSelection } from '@/stores/navigation-active-workspace-store'
+import { normalizeWorkspaceDescriptor, useSessionStore } from '@/stores/session-store'
+import { createNameId } from 'mnemonic-id'
function toProjectIconDataUri(icon: { mimeType: string; data: string } | null): string | null {
if (!icon) {
@@ -126,6 +128,7 @@ interface WorkspaceRowInnerProps {
drag: () => void
isDragging: boolean
isArchiving: boolean
+ isCreating?: boolean
dragHandleProps?: DraggableListDragHandleProps
menuController: ReturnType | null
archiveLabel?: string
@@ -626,6 +629,7 @@ function WorkspaceRowInner({
drag,
isDragging,
isArchiving,
+ isCreating = false,
dragHandleProps,
menuController,
archiveLabel,
@@ -678,15 +682,23 @@ function WorkspaceRowInner({
ref={dragHandleProps?.setActivatorNodeRef as any}
style={styles.workspaceRowLeft}
>
-
+
{workspace.name}
+ {isCreating ? Creating... : null}
{onArchive && (isHovered || isMobile) ? (
state.archiveWorktree)
@@ -873,6 +887,7 @@ function WorkspaceRowWithMenu({
drag={drag}
isDragging={isDragging}
isArchiving={isArchiving}
+ isCreating={isCreating}
dragHandleProps={dragHandleProps}
menuController={null}
archiveLabel={isWorktree ? 'Archive worktree' : 'Hide from sidebar'}
@@ -1082,6 +1097,7 @@ function WorkspaceRow({
isDragging,
dragHandleProps,
canCopyBranchName,
+ isCreating = false,
}: {
workspace: SidebarWorkspaceEntry
selected: boolean
@@ -1092,6 +1108,7 @@ function WorkspaceRow({
isDragging: boolean
dragHandleProps?: DraggableListDragHandleProps
canCopyBranchName: boolean
+ isCreating?: boolean
}) {
return (
)
}
@@ -1126,6 +1144,7 @@ function ProjectBlock({
isDragging,
dragHandleProps,
useNestable,
+ creatingWorkspaceIds,
}: {
project: SidebarProjectEntry
collapsed: boolean
@@ -1144,6 +1163,7 @@ function ProjectBlock({
isDragging: boolean
dragHandleProps?: DraggableListDragHandleProps
useNestable: boolean
+ creatingWorkspaceIds: ReadonlySet
}) {
const rowModel = useMemo(
() =>
@@ -1170,6 +1190,7 @@ function ProjectBlock({
shortcutNumber={shortcutIndexByWorkspaceKey.get(item.workspaceKey) ?? null}
showShortcutBadge={showShortcutBadges}
canCopyBranchName={project.projectKind === 'git'}
+ isCreating={creatingWorkspaceIds.has(item.workspaceId)}
onPress={() => {
if (!serverId) {
return
@@ -1186,6 +1207,7 @@ function ProjectBlock({
[
activeWorkspaceSelection,
project.projectKind,
+ creatingWorkspaceIds,
onWorkspacePress,
serverId,
shortcutIndexByWorkspaceKey,
@@ -1300,6 +1322,13 @@ export function SidebarWorkspaceList({
const isNative = Platform.OS !== 'web'
const pathname = usePathname()
const activeWorkspaceSelection = useNavigationActiveWorkspaceSelection()
+ const toast = useToast()
+ const mergeWorkspaces = useSessionStore((state) => state.mergeWorkspaces)
+ const [creatingProjectKey, setCreatingProjectKey] = useState(null)
+ const [creatingWorkspaceIds, setCreatingWorkspaceIds] = useState>(() => new Set())
+ const creatingWorkspaceTimeoutsRef = useRef