Skip to content

[REFACTOR] 서브태스크 관련 스키마 변경사항 반영#262

Merged
jjangminii merged 1 commit into
developfrom
refactor/web/261-subtask-schema-updates
Jul 16, 2026
Merged

[REFACTOR] 서브태스크 관련 스키마 변경사항 반영#262
jjangminii merged 1 commit into
developfrom
refactor/web/261-subtask-schema-updates

Conversation

@jjangminii

Copy link
Copy Markdown
Contributor

ISSUE 🔗

close #261



What is this PR? 🔍

백엔드에서 서브태스크 관련 스키마가 변경되어(완료 상태 변경 API에 date 파라미터 필수화, 수정 요청에서 completed 필드 제거) 클라이언트를 반영했습니다.

배경

  • 기존 구조: 서브태스크 완료 상태 변경(changeSubtaskStatus) API가 todoId, subtaskId만으로 대상을 특정했습니다.
  • 발생 문제: 반복 TODO는 하나의 todoId를 여러 날짜 인스턴스가 공유하기 때문에, 날짜 지정 없이는 완료 상태가 어느 날짜 인스턴스에 반영되는지 특정할 수 없었습니다. (이전에 startTimer([FIX] 반복 투두를 오늘이 아닌 날짜에서 재생해도 해당 날짜에 귀속되도록 수정 #254) 등 다른 타이머/투두 API에도 동일한 이유로 date 파라미터가 추가된 적이 있습니다.)
  • 해결 방향: 백엔드가 changeSubtaskStatus에 필수 date 쿼리 파라미터를 추가했고, 클라이언트의 모든 호출부에서 해당 서브태스크가 속한 투두의 날짜를 함께 전송하도록 반영했습니다.

API 클라이언트 (generated)

  • 변경 요약: changeSubtaskStatusChangeSubtaskStatusParams({ date: string })를 필수로 받도록 타입과 mutation 훅을 갱신하고, TodoSubtaskUpdateRequest에서 completed 필드를 제거했습니다.
  • 이유: 최신 API 스펙(https://api.timo.kr/v3/api-docs)에 맞춰 반영했습니다.
  • 구현 방식: pnpm gen:api로 재생성한 뒤, 이번 이슈와 무관한 캘린더/온보딩 등 다른 도메인의 재생성 diff는 제외하고 todo.tschangeSubtaskStatus 관련 변경만 수동으로 반영했습니다.

서브태스크 완료 상태 변경 호출부

  • 변경 요약: Today, Home, Focus, 상세 모달 4곳의 changeSubtaskStatus 호출에 params: { date }를 추가했습니다.
  • 이유: 새로 필수가 된 date 파라미터 없이는 타입 에러가 발생하고, 반복 TODO에서 완료 상태가 잘못된 날짜 인스턴스에 반영될 수 있습니다.
  • 구현 방식: 각 호출부에서 이미 보유하고 있던 해당 투두의 날짜 값(dateKey, focusView.date, 상세 모달의 date 인자)을 그대로 전달했습니다.

상세 모달 수정 요청 빌더

  • 변경 요약: buildDetailTodoSubtasksUpdateRequest에서 completed 필드 전송을 제거했습니다.
  • 이유: TodoSubtaskUpdateRequest에서 completed 필드가 제거되어 더 이상 요청 body에 포함될 수 없습니다.



To Reviewers

이번 PR 범위에는 포함하지 않았지만, pnpm gen:api 재생성 과정에서 TodoUpdateRequest.memo 필드가 사라지고 별도의 memo 전용 엔드포인트가 새로 생긴 것을 확인했습니다. 이는 별도 이슈로 추후 처리할 예정입니다.



Screenshot 📷



Test Checklist ✔

  • pnpm check-types 통과
  • pnpm lint 통과
  • Today/Home/Focus/상세 모달에서 서브태스크 완료 토글 동작 확인 — 미실행: 로그인 필요

- 서브태스크 완료 상태 변경 API에 추가된 필수 date 파라미터를 반영했습니다
- 서브태스크 수정 요청에서 제거된 completed 필드를 반영했습니다
@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
timo Ready Ready Preview, Comment Jul 16, 2026 9:38am

Request Review

@github-actions github-actions Bot added the ⏰ Timo-web Timo 웹 서비스 label Jul 16, 2026
@github-actions github-actions Bot requested review from ehye1 and kimminna July 16, 2026 09:37
@github-actions github-actions Bot added ♻ Refactor 기능 개선 및 리팩토링 작업 ♠️ 정민 정민양 labels Jul 16, 2026
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f3e126d5-6b63-4680-8a2b-2d6da93b8c93

📥 Commits

Reviewing files that changed from the base of the PR and between 086c83d and 7c3dd65.

⛔ Files ignored due to path filters (4)
  • apps/timo-web/api/generated/endpoints/todo/todo.ts is excluded by !**/generated/**
  • apps/timo-web/api/generated/models/changeSubtaskStatusParams.ts is excluded by !**/generated/**
  • apps/timo-web/api/generated/models/index.ts is excluded by !**/generated/**
  • apps/timo-web/api/generated/models/todoSubtaskUpdateRequest.ts is excluded by !**/generated/**
📒 Files selected for processing (5)
  • apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_hooks/use-home-todos-by-date.ts
  • apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/today/_hooks/useTodayTodoList.ts
  • apps/timo-web/app/[locale]/(main)/focus/_hooks/use-focus-session.ts
  • apps/timo-web/hooks/todo-modal/detail/use-toggle-subtask-submit.ts
  • apps/timo-web/utils/todo/detail-todo-update-request.ts
💤 Files with no reviewable changes (1)
  • apps/timo-web/utils/todo/detail-todo-update-request.ts

Walkthrough

서브태스크 상태 변경 요청에 날짜 컨텍스트를 추가하고, 상세 서브태스크 수정 요청에서 completed 필드를 제거해 변경된 API 스키마를 반영합니다.

Changes

서브태스크 API 스키마 변경

Layer / File(s) Summary
상태 변경 요청의 날짜 파라미터 추가
apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_hooks/use-home-todos-by-date.ts, apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/today/_hooks/useTodayTodoList.ts, apps/timo-web/app/[locale]/(main)/focus/_hooks/use-focus-session.ts, apps/timo-web/hooks/todo-modal/detail/use-toggle-subtask-submit.ts
changeSubtaskStatus 호출에 상황별 날짜를 params.date로 전달합니다.
상세 수정 요청의 completed 제거
apps/timo-web/utils/todo/detail-todo-update-request.ts
서브태스크 수정 payload에서 completed를 제거하고 subtaskId와 정리된 content를 유지합니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: 🐛 Bug

Suggested reviewers: kimminna

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 서브태스크 스키마 변경 반영이라는 핵심 변경을 정확히 요약합니다.
Description check ✅ Passed 설명이 date 필수화와 completed 제거라는 실제 변경사항을 잘 설명해 PR 내용과 일치합니다.
Linked Issues check ✅ Passed Today/Home/Focus/상세 모달 호출부와 상세 요청 빌더가 요구사항대로 수정되어 핵심 목표를 충족합니다.
Out of Scope Changes check ✅ Passed 요구사항과 무관한 변경은 보이지 않으며, 범위가 서브태스크 스키마 반영에 맞게 잘 제한되어 있습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/web/261-subtask-schema-updates

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ehye1 ehye1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

스키마 변경하셨군요. 확인했습니다~굿.

@github-actions

Copy link
Copy Markdown

Timo Performance Report

Bundle Size — timo-web
라우트 크기 First Load JS
/[locale]/home 214.14 kB 🔴 420.04 kB
/[locale]/today 198.30 kB 🔴 404.19 kB
/[locale]/focus 161.98 kB 🔴 367.87 kB
/[locale]/settings 168.81 kB 🔴 374.71 kB
/[locale]/statistics 155.72 kB 🔴 361.61 kB
/[locale]/[...rest] 0 B 🟡 205.89 kB
/[locale]/login 213.80 kB 🔴 419.69 kB
/[locale]/oauth/calendar/callback 120.82 kB 🟡 326.72 kB
/[locale]/oauth/callback 120.49 kB 🟡 326.38 kB
/[locale]/onboarding 234.55 kB 🔴 440.45 kB
/[locale] 119.80 kB 🟡 325.70 kB
/[locale]/policy 125.93 kB 🟡 331.82 kB
/robots.txt/route 0 B 🟡 205.89 kB
/sitemap.xml/route 0 B 🟡 205.89 kB

공유 번들: 205.89 kB
🟢 < 200kB  |  🟡 < 350kB  |  🔴 ≥ 350kB (First Load JS · gzip)

Lighthouse — timo-web
URL Perf A11y LCP CLS TBT
/en/home 🔴 59 🟢 95 🔴 15.8s 🟢 0.000 🔴 614ms
/en/today 🔴 60 🟢 95 🔴 15.6s 🟢 0.000 🟡 577ms
/en/focus 🔴 62 🟢 95 🔴 15.3s 🟢 0.000 🟡 499ms
/en/statistics 🔴 59 🟢 95 🔴 15.2s 🟢 0.000 🟡 598ms

Perf ≥ 70 / A11y ≥ 85 목표
LCP 🟢 < 2.5s 🟡 < 4s 🔴 ≥ 4s  |  CLS 🟢 < 0.1 🟡 < 0.25 🔴 ≥ 0.25  |  TBT 🟢 < 200ms 🟡 < 600ms 🔴 ≥ 600ms

Image Optimization — timo-web
파일 크기 포맷 상태
favicon.png 27.84 kB PNG ⚠️ 🟢
images/google-calendar.png 36.20 kB PNG ⚠️ 🟢
images/google-logo.png 26.79 kB PNG ⚠️ 🟢
og.png 437.44 kB PNG ⚠️ 🟡

총 4개 · 528.28 kB  |  🟢 < 200KB  |  🟡 < 500KB  |  🔴 ≥ 500KB
⚠️ 4개 파일 WebP/AVIF 변환 권장

측정 커밋: bb217f9

@jjangminii jjangminii merged commit 6015b4c into develop Jul 16, 2026
13 checks passed
@jjangminii jjangminii mentioned this pull request Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⏰ Timo-web Timo 웹 서비스 ♠️ 정민 정민양 ♻ Refactor 기능 개선 및 리팩토링 작업

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REFACTOR] 서브태스크 관련 스키마 변경사항 반영 (완료 상태 변경 date 필수화, 수정 요청 completed 제거)

2 participants