Skip to content

[FIX] 영어 환경 태그 생성 제한 오류 수정#253

Merged
yumin-kim2 merged 1 commit into
developfrom
fix/web/252-english-tag-limit
Jul 16, 2026
Merged

[FIX] 영어 환경 태그 생성 제한 오류 수정#253
yumin-kim2 merged 1 commit into
developfrom
fix/web/252-english-tag-limit

Conversation

@yumin-kim2

Copy link
Copy Markdown
Contributor

ISSUE 🔗

close #252


What is this PR? 🔍

영어 환경에서 커스텀 태그가 최대 개수에 도달해도 태그 생성 모달이 열리는 문제를 수정했습니다.

기존에는 태그 목록의 isDefault 값을 기준으로 기본 태그와 커스텀 태그를 구분했지만, 태그 목록 응답 타입에는 isDefault가 포함되어 있지 않았습니다.
따라서 기본 태그의 고정 tagId를 기준으로 기본 태그 여부를 판별하도록 변경했습니다.

  • 기본 태그 tagId 판별 유틸 추가
  • 홈/투두 모달의 커스텀 태그 개수 계산 기준 수정
  • 설정 페이지의 기본 태그 판별 기준 수정
  • 태그 목록 스키마에서 응답에 없는 isDefault 제거



To Reviewers

  • isDefault 응답 필드 대신 기본 태그 고정 ID(1~4)를 기준으로 판별하도록 변경했습니다.

  • 생성 응답에는 isDefault가 존재하므로 tagCreateDataSchema에는 유지했고, 목록 응답용 tagSchema에서만 제거했습니다.



Screenshot 📷

image image



Test Checklist ✔

  • 영어 환경에서 커스텀 태그 4개일 때 태그 추가 모달이 열리지 않는지 확인
  • 영어 환경에서 태그 제한 토스트가 노출되는지 확인
  • 한국어 환경에서도 기존과 동일하게 태그 제한이 동작하는지 확인
  • pnpm lint:web
  • pnpm check-types:web

@yumin-kim2 yumin-kim2 linked an issue Jul 16, 2026 that may be closed by this pull request
@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 6:26am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

기본 태그 판별 기준을 tag.isDefault에서 tagId 기반 isDefaultTagId로 통일했습니다. Tag 스키마에서 isDefault를 제거하고, 설정 프로필과 태그 생성 제한 로직을 새 기준에 맞게 갱신했습니다.

Changes

기본 태그 판별 변경

Layer / File(s) Summary
기본 태그 판별 계약
apps/timo-web/schemas/tag/tag-schema.ts, apps/timo-web/utils/todo/tag-label.ts
Tag 스키마에서 isDefault를 제거하고, 기본 태그 매핑에 tagId가 존재하는지 확인하는 isDefaultTagId를 추가했습니다.
태그 사용처 갱신
apps/timo-web/app/[locale]/(main)/settings/_hooks/account/use-settings-profile.ts, apps/timo-web/hooks/todo-modal/common/use-tag-field.tsx
설정 프로필의 기본 태그 라벨과 태그 필드의 커스텀 태그 개수 계산을 isDefaultTagId 기준으로 변경했습니다.

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

Possibly related PRs

Suggested labels: 🐛 Bug, ⏰ Timo-web, ♣️ 유민

Suggested reviewers: kimminna

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 영어 환경 태그 생성 제한 오류 수정이라는 핵심 변경을 정확히 담고 있습니다.
Description check ✅ Passed 설명이 태그 제한 버그와 기본 태그 판별 기준 변경을 잘 설명해 변경 내용과 일치합니다.
Linked Issues check ✅ Passed 기본 태그를 고정 tagId로 판별하도록 바꿔 영어/한국어 모두 태그 제한이 동일하게 동작하도록 맞췄습니다.
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 fix/web/252-english-tag-limit

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 ⏰ Timo-web Timo 웹 서비스 label Jul 16, 2026
@github-actions github-actions Bot requested review from ehye1 and kimminna July 16, 2026 06:27
@github-actions github-actions Bot added 🐛 Bug 기능이 정상적으로 작동하지 않는 문제 수정 ♣️ 유민 유민양 labels Jul 16, 2026

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

Actionable comments posted: 1

🤖 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.

Inline comments:
In
`@apps/timo-web/app/`[locale]/(main)/settings/_hooks/account/use-settings-profile.ts:
- Around line 61-67: Update the tag mapping logic to call getDefaultTagLabelKey
once, store its result in labelKey, and derive isDefault from whether labelKey
is present. Remove the now-unused isDefaultTagId import while preserving the
existing label translation and fallback behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: b9fb2b4b-465a-41c3-bcb3-0782261fe04e

📥 Commits

Reviewing files that changed from the base of the PR and between d686aa2 and b886876.

📒 Files selected for processing (4)
  • apps/timo-web/app/[locale]/(main)/settings/_hooks/account/use-settings-profile.ts
  • apps/timo-web/hooks/todo-modal/common/use-tag-field.tsx
  • apps/timo-web/schemas/tag/tag-schema.ts
  • apps/timo-web/utils/todo/tag-label.ts
💤 Files with no reviewable changes (1)
  • apps/timo-web/schemas/tag/tag-schema.ts

Comment on lines +61 to +67
const isDefault = isDefaultTagId(tag.tagId);
const labelKey = isDefault ? getDefaultTagLabelKey(tag.tagId) : undefined;

return {
id: tag.tagId,
label: labelKey ? tCommon(`tag.${labelKey}`) : tag.name,
isDefault: tag.isDefault,
isDefault,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

센스 있는 최적화로 성능을 한 스푼 올려볼까요?

현재 isDefault를 구할 때 내부적으로 getDefaultTagLabelKey를 호출하고, 그 값이 참이면 labelKey를 구하기 위해 동일한 함수를 한 번 더 호출하고 있어요.

getDefaultTagLabelKey의 결과를 먼저 변수에 담아두고 이 값을 활용해 기본 태그 여부를 판별하면 중복 연산을 깔끔하게 줄일 수 있습니다. 결괏값 재사용은 연산 낭비를 막는 최적화의 기본 관행이랍니다! (참고: MDN - 함수의 기본)

수정하신 로직도 문제없이 훌륭하게 작동하지만, 이 부분만 살짝 다듬어보면 더 완벽해질 것 같아요. 제안된 코드를 적용하신다면 상단의 isDefaultTagId import도 함께 제거해 주시면 좋습니다. 🚀

✨ 중복 호출을 제거하는 제안
-    const isDefault = isDefaultTagId(tag.tagId);
-    const labelKey = isDefault ? getDefaultTagLabelKey(tag.tagId) : undefined;
+    const labelKey = getDefaultTagLabelKey(tag.tagId);
+    const isDefault = labelKey !== undefined;

     return {
       id: tag.tagId,
       label: labelKey ? tCommon(`tag.${labelKey}`) : tag.name,
       isDefault,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const isDefault = isDefaultTagId(tag.tagId);
const labelKey = isDefault ? getDefaultTagLabelKey(tag.tagId) : undefined;
return {
id: tag.tagId,
label: labelKey ? tCommon(`tag.${labelKey}`) : tag.name,
isDefault: tag.isDefault,
isDefault,
const labelKey = getDefaultTagLabelKey(tag.tagId);
const isDefault = labelKey !== undefined;
return {
id: tag.tagId,
label: labelKey ? tCommon(`tag.${labelKey}`) : tag.name,
isDefault,
🤖 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)/settings/_hooks/account/use-settings-profile.ts
around lines 61 - 67, Update the tag mapping logic to call getDefaultTagLabelKey
once, store its result in labelKey, and derive isDefault from whether labelKey
is present. Remove the now-unused isDefaultTagId import while preserving the
existing label translation and fallback behavior.

@github-actions

Copy link
Copy Markdown

Timo Performance Report

Bundle Size — timo-web
라우트 크기 First Load JS
/[locale]/home 212.34 kB 🔴 418.20 kB
/[locale]/today 196.52 kB 🔴 402.38 kB
/[locale]/focus 161.02 kB 🔴 366.88 kB
/[locale]/settings 167.61 kB 🔴 373.46 kB
/[locale]/statistics 154.90 kB 🔴 360.75 kB
/[locale]/[...rest] 0 B 🟡 205.86 kB
/[locale]/login 212.98 kB 🔴 418.83 kB
/[locale]/oauth/callback 119.67 kB 🟡 325.53 kB
/[locale]/onboarding 233.49 kB 🔴 439.34 kB
/[locale] 118.99 kB 🟡 324.84 kB
/[locale]/policy 125.11 kB 🟡 330.97 kB

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

Lighthouse — timo-web
URL Perf A11y LCP CLS TBT
/en/home 🔴 59 🟢 95 🔴 15.9s 🟢 0.000 🟡 543ms
/en/today 🔴 59 🟢 95 🔴 15.6s 🟢 0.000 🟡 577ms
/en/focus 🔴 62 🟢 95 🔴 15.3s 🟢 0.000 🟡 506ms
/en/statistics 🔴 57 🟢 95 🔴 15.3s 🟢 0.000 🔴 673ms

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 변환 권장

측정 커밋: 4a6ccce

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

체크아웃해서 태그 갯수 제한 토스트 확인했습니다~

@yumin-kim2 yumin-kim2 merged commit 8c59656 into develop Jul 16, 2026
15 checks passed
@yumin-kim2 yumin-kim2 deleted the fix/web/252-english-tag-limit branch July 16, 2026 07:00
@kimminna kimminna 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 웹 서비스 ♣️ 유민 유민양 🐛 Bug 기능이 정상적으로 작동하지 않는 문제 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FIX] 영어 환경 태그 생성 제한 미동작 오류 수정

2 participants