fix agent create: keep draft view until agent ready

This commit is contained in:
Mohamed Boudra
2026-01-24 19:29:56 +07:00
parent 6ecf88b502
commit 3e2d403f1b
10 changed files with 133 additions and 51 deletions
+2 -4
View File
@@ -85,10 +85,8 @@ export function AgentList({
onAgentSelect?.();
navigate({
pathname: "/agent/[...route]",
params: {
route: [serverId, agentId],
},
pathname: "/agent/[[...route]]",
params: { route: [serverId, agentId] },
});
},
[isActionSheetVisible, pathname, onAgentSelect]
@@ -607,7 +607,7 @@ export function GitDiffPane({ serverId, agentId }: GitDiffPaneProps) {
predicate: (query) =>
Array.isArray(query.queryKey) && query.queryKey[0] === "paseoWorktreeList",
});
router.replace("/agent");
router.replace({ pathname: "/agent/[[...route]]" });
},
onError: (err) => {
const message = err instanceof Error ? err.message : "Failed to archive worktree";
+1 -1
View File
@@ -142,7 +142,7 @@ export function HomeFooter() {
<Pressable
onPress={() => {
console.log("[HomeFooter] New Agent button pressed");
router.push("/agent");
router.push({ pathname: "/agent/[[...route]]" });
}}
style={({ pressed }) => [
styles.footerButton,
@@ -82,7 +82,7 @@ export function SlidingSidebar({ selectedAgentId }: SlidingSidebarProps) {
}, [closeToAgent]);
const handleCreateAgentClean = useCallback(() => {
router.push("/agent");
router.push({ pathname: "/agent/[[...route]]" });
}, []);
// Mobile: close sidebar and navigate