From dfb4c7c54841575c33a6d6dcbdaf6d21d3362ee1 Mon Sep 17 00:00:00 2001 From: kimminna Date: Thu, 16 Jul 2026 15:53:26 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix(web):=20=EC=84=9C=EB=B8=8C=ED=83=9C?= =?UTF-8?q?=EC=8A=A4=ED=81=AC=20=EC=99=84=EB=A3=8C=20=EC=83=81=ED=83=9C?= =?UTF-8?q?=EA=B0=80=20=EC=83=81=EC=84=B8=20=EB=AA=A8=EB=8B=AC=EC=97=90=20?= =?UTF-8?q?=EC=9E=AC=EB=8F=99=EA=B8=B0=ED=99=94=EB=90=98=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EB=8A=94=20=EB=AC=B8=EC=A0=9C=EB=A5=BC=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=ED=95=9C=EB=8B=A4=20(#255)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Today 카드에서 서브태스크를 완료 토글한 직후 상세 모달을 열면, 모달의 첫 조회가 완료 처리 요청보다 먼저 끝나 옛 데이터로 폼이 초기화되는 문제가 있었습니다 - useDetailSubtaskField의 subtaskInputs가 마운트 시 한 번만 초기화되고 이후 재동기화되지 않아, 서버 데이터가 나중에 갱신되어도 체크박스가 계속 옛 값에 머물렀습니다 - 서버에서 받아온 subtasks가 바뀔 때 완료 여부만 로컬 폼 상태에 재동기화하는 effect를 추가했습니다 --- .../todo-modal/detail/use-detail-subtask-field.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/apps/timo-web/hooks/todo-modal/detail/use-detail-subtask-field.ts b/apps/timo-web/hooks/todo-modal/detail/use-detail-subtask-field.ts index 67f93c12..f4e6d1a1 100644 --- a/apps/timo-web/hooks/todo-modal/detail/use-detail-subtask-field.ts +++ b/apps/timo-web/hooks/todo-modal/detail/use-detail-subtask-field.ts @@ -40,6 +40,20 @@ export const useDetailSubtaskField = ({ const inputRefs = useRef>([]); const pendingFocusIndex = useRef(null); + useEffect(() => { + setSubtaskInputs((prev) => + prev.map((input) => { + const serverSubtask = subtasks.find( + (subtask) => subtask.subtaskId === input.subtaskId, + ); + if (!serverSubtask || serverSubtask.completed === input.completed) { + return input; + } + return { ...input, completed: serverSubtask.completed }; + }), + ); + }, [subtasks]); + useEffect(() => { if (pendingFocusIndex.current === null) return; From 3f3df54ed07e39b61589d43e35eb5979c1316539 Mon Sep 17 00:00:00 2001 From: kimminna Date: Thu, 16 Jul 2026 16:13:48 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix(web):=20=EC=99=84=EB=A3=8C=EB=90=9C=20?= =?UTF-8?q?=ED=99=88=20=ED=88=AC=EB=91=90=20=EC=B9=B4=EB=93=9C=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EC=B2=B4=ED=81=AC=20=ED=95=B4=EC=A0=9C=20=EC=8B=9C?= =?UTF-8?q?=20=EC=83=81=EC=84=B8=20=EB=AA=A8=EB=8B=AC=EC=9D=B4=20=EC=97=B4?= =?UTF-8?q?=EB=A6=AC=EB=8A=94=20=EB=AC=B8=EC=A0=9C=EB=A5=BC=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=ED=95=9C=EB=8B=A4=20(#255)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 체크박스가 checked 상태일 때만 렌더링되는 체크마크 아이콘이 SVGElement라서 HTMLElement의 인스턴스가 아니었습니다 - isInteractiveElement가 target instanceof HTMLElement로 검사해, 체크 해제를 위해 체크마크를 직접 클릭하면 인터랙티브 요소로 인식하지 못하고 카드 클릭(상세 모달 오픈)으로 새어나갔습니다 - instanceof Element로 변경해 HTML/SVG 요소 모두 정상적으로 감지하도록 했습니다 --- .../home/_components/todo-card/HomeTodoCard.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_components/todo-card/HomeTodoCard.tsx b/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_components/todo-card/HomeTodoCard.tsx index fad902ee..81ab97a3 100644 --- a/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_components/todo-card/HomeTodoCard.tsx +++ b/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_components/todo-card/HomeTodoCard.tsx @@ -28,8 +28,7 @@ import type { KeyboardEvent, MouseEvent, PointerEvent } from "react"; import { convertDurationToTimeText } from "@/utils/todo/todo-time"; const isInteractiveElement = (target: EventTarget | null) => - target instanceof HTMLElement && - Boolean(target.closest("button, input, label")); + target instanceof Element && Boolean(target.closest("button, input, label")); export interface HomeTodoCardProps { todoId: number;