From ed781b552a24a12552342c42be04dbcf1ffdc639 Mon Sep 17 00:00:00 2001 From: Louis Knight-Webb Date: Tue, 15 Jul 2025 11:20:48 +0100 Subject: [PATCH] Open task after creating (vibe-kanban) (#184) * Perfect! I've successfully implemented the feature to automatically open a task in the sidebar after creation. The change was made to the [`handleCreateTask` function in project-tasks.tsx](file:///private/var/folders/kr/jdxkcn7129j376nrg0stj9zm0000gn/T/vibe-kanban/vk-f5e5-open-task/frontend/src/pages/project-tasks.tsx#L152-L168). Now when users create a task using the "Create Task" button, it will automatically navigate to the task details view in the sidebar, making it consistent with the "Create & Start" button behavior that already had this functionality. * prettier --- frontend/src/pages/project-tasks.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/project-tasks.tsx b/frontend/src/pages/project-tasks.tsx index 7cef04e0..564c08d9 100644 --- a/frontend/src/pages/project-tasks.tsx +++ b/frontend/src/pages/project-tasks.tsx @@ -152,17 +152,21 @@ export function ProjectTasks() { const handleCreateTask = useCallback( async (title: string, description: string) => { try { - await tasksApi.create(projectId!, { + const createdTask = await tasksApi.create(projectId!, { project_id: projectId!, title, description: description || null, }); await fetchTasks(); + // Open the newly created task in the details panel + navigate(`/projects/${projectId}/tasks/${createdTask.id}`, { + replace: true, + }); } catch (err) { setError('Failed to create task'); } }, - [projectId, fetchTasks] + [projectId, fetchTasks, navigate] ); const handleCreateAndStartTask = useCallback(