Skip to content

[FEAT] Add task 버튼 클릭 시 투두 20개 제한 토스트 추가#197

Merged
kimminna merged 2 commits into
developfrom
feat/web/196-todo-limit-toast
Jul 14, 2026
Merged

[FEAT] Add task 버튼 클릭 시 투두 20개 제한 토스트 추가#197
kimminna merged 2 commits into
developfrom
feat/web/196-todo-limit-toast

Conversation

@kimminna

Copy link
Copy Markdown
Member

ISSUE 🔗

close #196



What is this PR? 🔍

Add task 버튼을 클릭했을 때 해당 날짜의 투두 개수 제한을 검사해, 제한을 넘으면 생성 모달 대신 안내 토스트를 띄우도록 했습니다. 아울러 생성 모달의 체크박스가 실제로는 클릭 동작을 하지 않는데도 pointer 커서로 표시되던 부분을 함께 수정했습니다.

배경

  • 기존 구조: Add task 버튼을 누르면 조건 없이 바로 생성 모달이 열렸습니다.
  • 발생 문제: 해당 날짜에 투두가 이미 많이 쌓여 있어도 계속 추가할 수 있어, 하루 단위로 투두 개수를 제한하고 싶다는 요구가 있었습니다.
  • 해결 방향: 버튼 클릭 시점에 해당 날짜의 투두 총 개수를 검사해, 제한 초과 시 모달을 열지 않고 안내 토스트만 노출하는 방식으로 처리했습니다.

Add task 투두 개수 제한

  • 변경 요약: CreateTodoModalContainertotalCount prop을 추가하고, 20개 이상이면 모달을 열지 않고 토스트를 띄우도록 했습니다.
  • 이유: 하루에 추가할 수 있는 투두 개수를 제한해, 특정 날짜에 투두가 무한정 쌓이는 것을 막기 위함입니다.
  • 구현 방식: handleAddClick에서 totalCount >= MAX_TODO_COUNT(20)이면 overlay.open을 호출하지 않고 isTodoLimitToastOpen을 true로 설정해 토스트만 노출합니다. totalCountHomeDayHeaderContainer, TodayDateHeaderContainer가 이미 DateInformation에 전달하던 값(해당 날짜의 완료+미완료 전체 투두 개수)을 그대로 재사용해, 별도 API 호출 없이 즉시 판단할 수 있습니다. 처음에는 "미완료 투두 20개"만 세는 방식으로 구현했으나, 완료된 투두까지 합쳐서 20개일 때도 제한이 걸려야 한다는 피드백을 받아 완료 여부와 무관한 전체 개수 기준으로 변경했습니다. 이에 맞춰 Toast.todoLimitLine1/2 안내 문구도 "미완료 투두"에서 "하루 최대 20개"로 수정했습니다.
  • 경계 · 제약: 서버에 재검증 없이 클라이언트에 이미 로드된 totalCount 값으로만 판단합니다. 여러 탭에서 동시에 추가하는 등 클라이언트 상태가 최신이 아닌 극단적인 동시성 케이스는 이번 PR 범위 밖입니다.

생성 모달 체크박스 커서

  • 변경 요약: CreateTodoTaskFields의 타이틀/서브태스크 체크박스에 cursor-default를 추가했습니다.
  • 이유: 생성 모달의 체크박스는 onChange={() => {}}로 실제 클릭 동작이 없는 장식용인데도 디자인 시스템 Checkbox 컴포넌트가 기본으로 cursor-pointer를 적용하고 있어, 클릭 가능한 것처럼 보이는 문제가 있었습니다.
  • 구현 방식: CheckboxclassNamecn()으로 마지막에 병합하므로, className="cursor-default"를 넘기면 tailwind-merge가 기본 cursor-pointer를 덮어씁니다. 실제로 토글이 동작하는 상세/편집 모달(DetailTodoTaskFields)의 체크박스는 그대로 두었습니다.

To Reviewers

totalCount 판단 기준을 완료 여부와 무관한 전체 개수로 정한 것이 맞는지 확인 부탁드립니다. 서버가 아닌 클라이언트에 이미 로드된 값으로만 판단하는 구조라, 페이지 진입 이후 다른 경로로 투두가 추가/삭제된 경우 짧은 시간 오차가 있을 수 있습니다.

Screenshot 📷

Test Checklist ✔

  • pnpm check-types 통과
  • pnpm lint 통과
  • pnpm build 통과
  • 실제 브라우저에서 20개 이상 투두 상태로 Add task 클릭 시 토스트 노출 확인 — 미실행: 로그인 필요한 백엔드 연동이라 로컬에서 재현하지 못했습니다

kimminna added 2 commits July 14, 2026 23:44
- 해당 날짜 투두 총 개수가 20개 이상이면 Add task 클릭 시 모달을 열지 않고 안내 토스트를 노출했습니다
- Today/Home 화면의 Add task 버튼에 동일 로직을 적용했습니다
- 안내 토스트 문구를 완료 여부와 무관한 전체 개수 기준으로 수정했습니다
- 클릭이 동작하지 않는 생성 모달 체크박스에서 cursor-pointer를 제거했습니다
@vercel

vercel Bot commented Jul 14, 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 14, 2026 2:47pm

Request Review

@github-actions github-actions Bot added ⏰ Timo-web Timo 웹 서비스 ✨ Feature 새로운 기능(기능성) 구현 labels Jul 14, 2026
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Home과 Today 화면에서 투두 총 개수를 생성 모달에 전달합니다. 총 개수가 20개 이상이면 생성 모달 대신 제한 토스트를 표시하며, 관련 안내 문구와 생성 폼 체크박스 표시를 수정합니다.

Changes

투두 생성 제한

Layer / File(s) Summary
제한 계약 및 호출부 연결
apps/timo-web/components/todo-modal/create/CreateTodoModalContainer.tsx, apps/timo-web/app/.../home/_containers/todo-card/HomeDayHeaderContainer.tsx, apps/timo-web/app/.../today/_containers/TodayDateHeaderContainer.tsx
CreateTodoModalContainer가 선택적 totalCount를 받고 Home과 Today 화면에서 해당 값을 전달합니다.
제한 검사 및 토스트 표시
apps/timo-web/components/todo-modal/create/CreateTodoModalContainer.tsx, apps/timo-web/messages/en.json, apps/timo-web/messages/ko.json
투두가 20개 이상이면 생성 모달을 열지 않고 제한 토스트를 표시하며, 영어와 한국어 안내 문구를 삭제 기준으로 갱신합니다.
생성 폼 체크박스 표시 조정
apps/timo-web/components/todo-modal/create/CreateTodoTaskFields.tsx
제목 및 서브태스크 체크박스 JSX를 여러 줄로 정리하고 기본 커서 스타일을 유지합니다.

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

Sequence Diagram(s)

sequenceDiagram
  participant 사용자
  participant HomeTodayHeader
  participant CreateTodoModalContainer
  participant AnimatedToast

  사용자->>HomeTodayHeader: Add task 클릭
  HomeTodayHeader->>CreateTodoModalContainer: totalCount와 defaultDate 전달
  alt totalCount >= 20
    CreateTodoModalContainer->>AnimatedToast: 제한 토스트 표시
  else totalCount < 20
    CreateTodoModalContainer-->>사용자: 생성 모달 표시
  end
Loading

Possibly related PRs

Suggested labels: ♣️ 유민

Suggested reviewers: yumin-kim2

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 Add task 20개 제한 토스트와 생성 모달 차단이라는 핵심 변경을 정확히 요약합니다.
Description check ✅ Passed 설명이 변경 내용과 일치하며, 제한 토스트와 체크박스 커서 수정까지 잘 짚고 있습니다.
Linked Issues check ✅ Passed 이슈 #196의 20개 총합 제한, 토스트 노출, Home/Today 적용, 체크박스 커서 수정 요구를 모두 반영했습니다.
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 feat/web/196-todo-limit-toast

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed: dependency version conflict. Check your lock file or package.json.


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.

@github-actions github-actions Bot added the ♦️ 민아 민아상 label Jul 14, 2026
@github-actions

Copy link
Copy Markdown

Timo Performance Report

Bundle Size — timo-web
라우트 크기 First Load JS
/[locale]/home 208.10 kB 🔴 413.96 kB
/[locale]/today 191.47 kB 🔴 397.33 kB
/[locale]/focus 158.78 kB 🔴 364.64 kB
/[locale]/settings 166.21 kB 🔴 372.07 kB
/[locale]/statistics 153.78 kB 🔴 359.64 kB
/[locale]/[...rest] 0 B 🟡 205.86 kB
/[locale]/login 212.92 kB 🔴 418.78 kB
/[locale]/oauth/callback 119.57 kB 🟡 325.43 kB
/[locale]/onboarding 232.81 kB 🔴 438.67 kB
/[locale] 118.95 kB 🟡 324.81 kB
/[locale]/policy 125.05 kB 🟡 330.91 kB

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

Lighthouse — timo-web
URL Perf A11y LCP CLS TBT
/en/home 🔴 66 🟢 95 🔴 15.5s 🟢 0.000 🟡 361ms
/en/today 🔴 64 🟢 95 🔴 15.3s 🟢 0.000 🟡 415ms
/en/focus 🟡 71 🟢 95 🔴 15.3s 🟢 0.000 🟢 179ms
/en/statistics 🟡 70 🟢 95 🔴 15.0s 🟢 0.000 🟡 241ms

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

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

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

측정 커밋: 20bbf1b

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_containers/todo-card/HomeDayHeaderContainer.tsx (1)

33-33: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

시맨틱 태그(header) 활용

두 파일 모두 컴포넌트의 역할이 헤더(*HeaderContainer)임에도 <div className="...">를 최상위 요소로 사용하고 있어요! 😉
접근성(A11y) 가이드라인에 따라 화면 구조를 더 명확히 전달하기 위해 <header> 태그로 변경하는 것을 추천합니다. 스크린 리더 등 보조 기기가 헤더 영역을 쉽게 식별할 수 있게 되어 접근성이 크게 향상됩니다. (참고: MDN 문서 - header 태그)

  • apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_containers/todo-card/HomeDayHeaderContainer.tsx#L33-L33: <div className="flex flex-col gap-3 pb-2"><header className="flex flex-col gap-3 pb-2">로 수정해 주세요. (닫는 태그 포함)
  • apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/today/_containers/TodayDateHeaderContainer.tsx#L33-L33: 동일하게 <div className="flex flex-col gap-3 pb-2"><header className="flex flex-col gap-3 pb-2">로 수정해 주세요. (닫는 태그 포함)

As per path instructions, div 남발 금지 → main, article, section, nav, header, footer 등 시맨틱 태그 사용 원칙을 준수해 주세요.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@apps/timo-web/app/`[locale]/(main)/(with-time-sidebar)/home/_containers/todo-card/HomeDayHeaderContainer.tsx
at line 33, Replace the root div with a semantic header element in
HomeDayHeaderContainer.tsx at lines 33-33, preserving the existing className and
updating its closing tag. Apply the same change in TodayDateHeaderContainer.tsx
at lines 33-33, with no other structural changes.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In
`@apps/timo-web/app/`[locale]/(main)/(with-time-sidebar)/home/_containers/todo-card/HomeDayHeaderContainer.tsx:
- Line 33: Replace the root div with a semantic header element in
HomeDayHeaderContainer.tsx at lines 33-33, preserving the existing className and
updating its closing tag. Apply the same change in TodayDateHeaderContainer.tsx
at lines 33-33, with no other structural changes.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: a4b8af1f-aa28-4a8f-9ad7-402b0f6db279

📥 Commits

Reviewing files that changed from the base of the PR and between 87b8dce and 842debf.

📒 Files selected for processing (6)
  • apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_containers/todo-card/HomeDayHeaderContainer.tsx
  • apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/today/_containers/TodayDateHeaderContainer.tsx
  • apps/timo-web/components/todo-modal/create/CreateTodoModalContainer.tsx
  • apps/timo-web/components/todo-modal/create/CreateTodoTaskFields.tsx
  • apps/timo-web/messages/en.json
  • apps/timo-web/messages/ko.json

@jjangminii jjangminii 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.

확인했습니다~ 확실히 유저에게 피드백해주는 방향이 더 좋을 것 같네요 👍 👍

import { CreateTodoModalContent } from "@/components/todo-modal/create/CreateTodoModalContent";
import { useCreateTodoSubmit } from "@/hooks/todo-modal/use-create-todo-submit";

const MAX_TODO_COUNT = 20;

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.

👍

@kimminna
kimminna merged commit 4de92ea into develop Jul 14, 2026
15 checks passed
@kimminna
kimminna deleted the feat/web/196-todo-limit-toast branch July 14, 2026 15:27
@kimminna kimminna mentioned this pull request Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feature 새로운 기능(기능성) 구현 ⏰ Timo-web Timo 웹 서비스 ♦️ 민아 민아상

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Add task 버튼 클릭 시 투두 20개 제한 토스트 추가

2 participants