From 8723ac78bfe612c2ad333c0a38085797021d224b Mon Sep 17 00:00:00 2001 From: jjangminii Date: Wed, 15 Jul 2026 01:17:39 +0900 Subject: [PATCH 1/8] =?UTF-8?q?fix(web):=20=EC=88=98=EC=A0=95=20=EB=AA=A8?= =?UTF-8?q?=EB=8B=AC=20=EC=9E=AC=EC=83=9D=20=EB=B2=84=ED=8A=BC=20=ED=81=B4?= =?UTF-8?q?=EB=A6=AD=20=EC=8B=9C=20=EB=AA=A8=EB=8B=AC=EC=9D=B4=20=EB=8B=AB?= =?UTF-8?q?=ED=9E=88=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?(#200)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 재생 버튼 클릭 시 무조건 onClose()가 호출되던 로직을 제거했습니다 --- .../components/todo-modal/detail/DetailTodoModalContent.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/apps/timo-web/components/todo-modal/detail/DetailTodoModalContent.tsx b/apps/timo-web/components/todo-modal/detail/DetailTodoModalContent.tsx index 85de321b..5a234317 100644 --- a/apps/timo-web/components/todo-modal/detail/DetailTodoModalContent.tsx +++ b/apps/timo-web/components/todo-modal/detail/DetailTodoModalContent.tsx @@ -226,10 +226,7 @@ export const DetailTodoModalContent = ({ subtaskInputs={detailTodoForm.subtaskInputs} onTitleChange={detailTodoForm.changeTitle} onToggleCompleted={detailTodoForm.setIsCompleted} - onTogglePlay={() => { - onTogglePlay(); - onClose(); - }} + onTogglePlay={onTogglePlay} onSubtaskInputChange={detailTodoForm.changeSubtaskInput} onToggleSubtaskCompleted={handleSubtaskCompletedChange} registerSubtaskInputRef={detailTodoForm.registerSubtaskInputRef} From ffac8dcad1aab812ba57f8f7153d3541a4e54438 Mon Sep 17 00:00:00 2001 From: jjangminii Date: Wed, 15 Jul 2026 01:17:50 +0900 Subject: [PATCH 2/8] =?UTF-8?q?fix(web):=20=EC=88=98=EC=A0=95=20=EB=AA=A8?= =?UTF-8?q?=EB=8B=AC=20=EC=9E=AC=EC=83=9D=20=EB=B2=84=ED=8A=BC=20=EC=95=84?= =?UTF-8?q?=EC=9D=B4=EC=BD=98=EC=9D=B4=20=ED=83=80=EC=9D=B4=EB=A8=B8=20?= =?UTF-8?q?=EC=83=81=ED=83=9C=EC=99=80=20=EB=8F=99=EA=B8=B0=ED=99=94?= =?UTF-8?q?=EB=90=98=EC=A7=80=20=EC=95=8A=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20(#200)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 타이머 시작/토글 성공 시 해당 투두의 상세 조회 쿼리도 함께 무효화하도록 했습니다 --- .../home/_hooks/use-home-todos-by-date.ts | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_hooks/use-home-todos-by-date.ts b/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_hooks/use-home-todos-by-date.ts index f5a17426..6f09c507 100644 --- a/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_hooks/use-home-todos-by-date.ts +++ b/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_hooks/use-home-todos-by-date.ts @@ -13,6 +13,7 @@ import { useStopTimer, } from "@/api/generated/endpoints/timer/timer"; import { + getGetTodoDetailQueryKey, useChangeSubtaskStatus, useChangeTodoStatus, useReorderTodo, @@ -80,6 +81,11 @@ export const useHomeTodosByDate = ( invalidateHomeView(); invalidateFocusTodo(); }; + const invalidateTodoDetail = (dateKey: string, todoId: number) => { + queryClient.invalidateQueries({ + queryKey: getGetTodoDetailQueryKey(todoId, { date: dateKey }), + }); + }; const handleToggleCompleted = ( dateKey: string, @@ -141,10 +147,15 @@ export const useHomeTodosByDate = ( } if (activeTimer && activeTimer.todoId === todoId) { - changeStatus({ - timerId: activeTimer.timerId, - data: { action: activeTimer.status === "RUNNING" ? "PAUSE" : "RESUME" }, - }); + changeStatus( + { + timerId: activeTimer.timerId, + data: { + action: activeTimer.status === "RUNNING" ? "PAUSE" : "RESUME", + }, + }, + { onSuccess: () => invalidateTodoDetail(dateKey, todoId) }, + ); return; } @@ -154,7 +165,10 @@ export const useHomeTodosByDate = ( return; } - startTimer({ todoId }); + startTimer( + { todoId }, + { onSuccess: () => invalidateTodoDetail(dateKey, todoId) }, + ); }; const handleToggleSubtaskCompleted = ( From 0f331fef6deb4931609b7fffca2386c2e6702842 Mon Sep 17 00:00:00 2001 From: jjangminii Date: Wed, 15 Jul 2026 01:30:03 +0900 Subject: [PATCH 3/8] =?UTF-8?q?fix(web):=20=EC=88=98=EC=A0=95=20=EB=AA=A8?= =?UTF-8?q?=EB=8B=AC=20=EC=99=84=EB=A3=8C=20=EC=B2=B4=ED=81=AC=EB=B0=95?= =?UTF-8?q?=EC=8A=A4=EA=B0=80=20=ED=83=80=EC=9D=B4=EB=A8=B8=20=EC=8B=A4?= =?UTF-8?q?=ED=96=89=20=EC=A4=91=20=EB=B9=84=ED=99=9C=EC=84=B1=ED=99=94?= =?UTF-8?q?=C2=B7=EB=AF=B8=EB=B0=98=EC=98=81=EB=90=98=EB=8A=94=20=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C=20=EC=88=98=EC=A0=95=20(#200)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 완료 체크박스에서 disabled를 제거하고, 홈 페이지의 handleToggleCompleted(실행 중이면 중지 확인, 아니면 즉시 완료)를 모달에 연결했습니다 - 서브태스크 완료도 타이머 실행 여부와 무관하게 즉시 저장되도록 했습니다 - 완료 처리 성공 시 모달의 상세 조회 쿼리도 함께 무효화하도록 했습니다 --- .../home/_containers/HomeTodoContainer.tsx | 3 +++ .../home/_hooks/use-home-todos-by-date.ts | 9 ++++++++- .../today/_containers/TodayTodoListContainer.tsx | 1 + .../todo-modal/detail/DetailTodoModalContent.tsx | 10 +++++++--- .../todo-modal/detail/DetailTodoTaskFields.tsx | 7 +------ .../todo-modal/detail/DetailTodoModalContainer.tsx | 3 +++ .../hooks/todo-modal/detail/use-detail-todo-form.ts | 8 -------- 7 files changed, 23 insertions(+), 18 deletions(-) diff --git a/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_containers/HomeTodoContainer.tsx b/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_containers/HomeTodoContainer.tsx index 1d950639..b11a7470 100644 --- a/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_containers/HomeTodoContainer.tsx +++ b/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_containers/HomeTodoContainer.tsx @@ -156,6 +156,9 @@ export const HomeTodoContainer = () => { onTogglePlay={() => handleTogglePlay(dateKey, todo.todoId) } + onToggleCompleted={(completed) => + handleToggleCompleted(dateKey, todo.todoId, completed) + } onDelete={() => handleDeleteTodo(dateKey, todo.todoId)} > {(openDetailTodoModal) => ( diff --git a/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_hooks/use-home-todos-by-date.ts b/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_hooks/use-home-todos-by-date.ts index 6f09c507..17fbc94b 100644 --- a/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_hooks/use-home-todos-by-date.ts +++ b/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_hooks/use-home-todos-by-date.ts @@ -106,6 +106,7 @@ export const useHomeTodosByDate = ( onSuccess: () => { invalidateHomeAndFocus(); invalidateTimeBoxes(); + invalidateTodoDetail(dateKey, todoId); }, onError: () => { setTodosByDate((prev) => ({ ...prev, [dateKey]: previous })); @@ -130,7 +131,12 @@ export const useHomeTodosByDate = ( })); changeTodoStatus( { todoId, data: { isCompleted: true, date: dateKey } }, - { onSuccess: invalidateHomeAndFocus }, + { + onSuccess: () => { + invalidateHomeAndFocus(); + invalidateTodoDetail(dateKey, todoId); + }, + }, ); }, }, @@ -191,6 +197,7 @@ export const useHomeTodosByDate = ( onSuccess: () => { invalidateHomeAndFocus(); invalidateTimeBoxes(); + invalidateTodoDetail(dateKey, todoId); }, onError: () => { setTodosByDate((prev) => ({ ...prev, [dateKey]: previous })); diff --git a/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/today/_containers/TodayTodoListContainer.tsx b/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/today/_containers/TodayTodoListContainer.tsx index bcada296..f855b7ab 100644 --- a/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/today/_containers/TodayTodoListContainer.tsx +++ b/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/today/_containers/TodayTodoListContainer.tsx @@ -49,6 +49,7 @@ export const TodayTodoListContainer = () => { todoId={todo.todoId} date={todo.date.slice(0, 10)} onTogglePlay={() => handlePlay(todo.todoId)} + onToggleCompleted={() => handleCheck(todo.todoId)} onDelete={() => handleDelete(todo.todoId)} > {(openDetailTodoModal) => ( diff --git a/apps/timo-web/components/todo-modal/detail/DetailTodoModalContent.tsx b/apps/timo-web/components/todo-modal/detail/DetailTodoModalContent.tsx index 5a234317..dad126c1 100644 --- a/apps/timo-web/components/todo-modal/detail/DetailTodoModalContent.tsx +++ b/apps/timo-web/components/todo-modal/detail/DetailTodoModalContent.tsx @@ -41,6 +41,7 @@ export interface DetailTodoModalContentProps { onExited: () => void; todo: TodoDetailResponse; onTogglePlay: () => void; + onToggleCompleted: (completed: boolean) => void; onDelete: () => void; onUpdate: (data: TodoUpdateRequest) => void; } @@ -51,6 +52,7 @@ export const DetailTodoModalContent = ({ onExited, todo, onTogglePlay, + onToggleCompleted, onDelete, onUpdate, }: DetailTodoModalContentProps) => { @@ -176,7 +178,9 @@ export const DetailTodoModalContent = ({ const handleSubtaskCompletedChange = (id: number, completed: boolean) => { const subtasks = detailTodoForm.changeSubtaskCompleted(id, completed); - updateTodo({ subtasks }); + const updateData = detailTodoForm.buildUpdateRequest({ subtasks }); + if (!updateData.title?.trim()) return; + onUpdate(updateData); }; return ( @@ -220,12 +224,12 @@ export const DetailTodoModalContent = ({
- +