Fix agent routing and E2E create flow

This commit is contained in:
Mohamed Boudra
2026-01-24 20:20:56 +07:00
parent 3e2d403f1b
commit dc4839e2c0
14 changed files with 204 additions and 147 deletions
+1 -4
View File
@@ -84,10 +84,7 @@ export function AgentList({
onAgentSelect?.();
navigate({
pathname: "/agent/[[...route]]",
params: { route: [serverId, agentId] },
});
navigate(`/agent/${serverId}/${agentId}` as any);
},
[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({ pathname: "/agent/[[...route]]" });
router.replace("/agent" as any);
},
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({ pathname: "/agent/[[...route]]" });
router.push("/agent" as any);
}}
style={({ pressed }) => [
styles.footerButton,
@@ -82,7 +82,7 @@ export function SlidingSidebar({ selectedAgentId }: SlidingSidebarProps) {
}, [closeToAgent]);
const handleCreateAgentClean = useCallback(() => {
router.push({ pathname: "/agent/[[...route]]" });
router.push("/agent" as any);
}, []);
// Mobile: close sidebar and navigate