Skip to content

fix: 마케팅 동의 여부 선택으로 변경 및 데드파일 삭제 - #500

Merged
yhi9839 merged 2 commits into
mainfrom
fix/499-terms-logic
Jul 13, 2026
Merged

yhi9839 merged 2 commits into
mainfrom
fix/499-terms-logic

Conversation

@shinwokkang

@shinwokkang shinwokkang commented Jul 11, 2026 •

Copy link
Copy Markdown
Contributor

📌 개요 (Summary)

  • 회원가입 약관 동의 화면(/signup/terms)에서 "개인정보 제3자 제공 동의" 항목이 필수로 처리되던 문제를 (선택) 항목으로 변경하여 의도에 맞게 수정했습니다.
  • 프로젝트 내 어느 곳에서도 사용되지 않고 방치되어 있던 구형 회원가입 관련 컴포넌트(Dead Code)를 식별하고 완전히 제거하여 코드베이스를 깔끔하게 유지했습니다.
  • 관련 이슈: Resolves fix: 약관 동의 필수 권한 및 로직 수정 #499

🛠️ 변경 사항 (Changes)

  • 새로운 기능 추가
  • 버그 수정
    • useTermsAgreement.ts 내 약관 데이터 정규화 로직(normalizeTermsRequirement) 수정
    • "THIRD_PARTY_PROVISION" 타입 약관의 required 속성을 false로 예외 처리
  • 코드 리팩토링
    • 완벽한 데드 코드로 판명된 src/components/base-ui/Signup 디렉토리 통째로 삭제 (SignupTerms.tsx, SignupTerms.module.css 제거)
  • 문서 업데이트
  • 기타 (설명: )

📸 스크린샷 (Screenshots)

(여기에 "개인정보 제3자 제공 동의 (선택)" 으로 텍스트가 정상적으로 변경된 약관 동의 화면 캡처 이미지를 첨부해주세요)

✅ 체크리스트 (Checklist)

  • 빌드가 성공적으로 수행되었나요? (pnpm build / npm run build 확인 완료)
  • 린트 에러가 없나요? (pnpm lint)
  • 불필요한 콘솔 로그나 주석을 제거했나요?

Summary by CodeRabbit

  • Bug Fixes

    • Updated terms agreement handling so third-party provision terms are no longer treated as mandatory for signup completion.
  • Changes

    • Removed the previous standalone signup terms agreement screen and its associated styling.

@shinwokkang shinwokkang self-assigned this Jul 11, 2026
@shinwokkang shinwokkang added the 🐛 bug 버그 수정 label Jul 11, 2026
@shinwokkang shinwokkang linked an issue Jul 11, 2026 that may be closed by this pull request
4 tasks
@vercel

vercel Bot commented Jul 11, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
checkmo Ready Ready Preview, Comment Jul 11, 2026 4:18pm

@coderabbitai

coderabbitai Bot commented Jul 11, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The terms normalization logic no longer requires third-party provision terms for agreement gating. The legacy signup terms component and its stylesheet were also removed.

Changes

Terms agreement flow

Layer / File(s) Summary
Required-term classification and legacy UI removal
src/components/base-ui/Join/steps/TermsAgreement/useTermsAgreement.ts, src/components/base-ui/Signup/SignupTerms.tsx, src/components/base-ui/Signup/SignupTerms.module.css
normalizeTermsRequirement excludes THIRD_PARTY_PROVISION alongside MARKETING when determining required terms. The legacy signup terms component and stylesheet are deleted.

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

Possibly related PRs

  • checkmo2025/FE#445: Introduces the signup terms-agreement flow that this change adjusts.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the PR’s main themes of consent logic changes and dead-file deletion, though it is slightly imprecise about the specific term affected.
Linked Issues check ✅ Passed The PR addresses issue #499 by making THIRD_PARTY_PROVISION non-required in the terms normalization logic.
Out of Scope Changes check ✅ Passed The component and stylesheet deletions are consistent with the stated cleanup of unused signup files and do not appear unrelated.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/499-terms-logic

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.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request removes the unused SignupTerms component and its associated CSS module, and updates the useTermsAgreement hook to treat THIRD_PARTY_PROVISION terms as optional. The reviewer noted that the normalization logic currently overrides all other terms to be required, which could cause issues if the backend introduces new optional terms in the future. A suggestion was provided to preserve the original required status.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

terms.map((term) => ({
...term,
required: term.termsType !== "MARKETING",
required: term.termsType !== "MARKETING" && term.termsType !== "THIRD_PARTY_PROVISION",

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.

medium

현재 구현된 normalizeTermsRequirement 로직은 termsType이 "MARKETING"이나 "THIRD_PARTY_PROVISION"이 아닌 모든 약관의 required 속성을 강제로 true로 설정하게 됩니다.

이로 인해 향후 백엔드에서 새로운 선택 약관(예: required: false)을 추가하더라도, 프론트엔드에서는 해당 약관을 필수 약관(required: true)으로 잘못 처리하는 버그가 발생할 수 있습니다.

따라서 기존 백엔드에서 전달된 term.required 상태를 보존하면서, 특정 타입만 선택 약관(false)으로 예외 처리하도록 수정하는 것이 안전합니다.

Suggested change
required: term.termsType !== "MARKETING" && term.termsType !== "THIRD_PARTY_PROVISION",
required: term.required && term.termsType !== "MARKETING" && term.termsType !== "THIRD_PARTY_PROVISION",

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

🧹 Nitpick comments (1)
src/components/base-ui/Join/steps/TermsAgreement/useTermsAgreement.ts (1)

9-9: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Change looks correct — THIRD_PARTY_PROVISION is now optional.

The THIRD_PARTY_DATA content explicitly states "본 동의는 선택 사항이며, 동의하지 않더라도 서비스 이용에는 제한이 없습니다," so excluding it from required gating is the right call. The downstream isButtonEnabled filter (line 78) correctly picks up the overridden required value, and TermsDetailModal still renders the term details.

As a minor maintainability note: as more optional term types are added, the chained !== conditions will grow. Consider an array-based exclusion:

♻️ Optional refactor
-const normalizeTermsRequirement = (terms: Term[]) =>
-  terms.map((term) => ({
-    ...term,
-    required: term.termsType !== "MARKETING" && term.termsType !== "THIRD_PARTY_PROVISION",
-  }));
+const OPTIONAL_TERM_TYPES = new Set(["MARKETING", "THIRD_PARTY_PROVISION"]);
+
+const normalizeTermsRequirement = (terms: Term[]) =>
+  terms.map((term) => ({
+    ...term,
+    required: !OPTIONAL_TERM_TYPES.has(term.termsType),
+  }));
🤖 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 `@src/components/base-ui/Join/steps/TermsAgreement/useTermsAgreement.ts` at
line 9, Keep the current behavior that marks both MARKETING and
THIRD_PARTY_PROVISION terms as optional, while preserving downstream
isButtonEnabled filtering and TermsDetailModal rendering. Refactor the required
expression in the term mapping to use a centralized collection of optional term
types with an inclusion check, so future optional types can be added without
extending chained comparisons.
🤖 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.

Nitpick comments:
In `@src/components/base-ui/Join/steps/TermsAgreement/useTermsAgreement.ts`:
- Line 9: Keep the current behavior that marks both MARKETING and
THIRD_PARTY_PROVISION terms as optional, while preserving downstream
isButtonEnabled filtering and TermsDetailModal rendering. Refactor the required
expression in the term mapping to use a centralized collection of optional term
types with an inclusion check, so future optional types can be added without
extending chained comparisons.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a6416a92-b2d2-43a9-91de-eca9717dad2f

📥 Commits

Reviewing files that changed from the base of the PR and between a953f66 and 1ca95ca.

📒 Files selected for processing (3)
  • src/components/base-ui/Join/steps/TermsAgreement/useTermsAgreement.ts
  • src/components/base-ui/Signup/SignupTerms.module.css
  • src/components/base-ui/Signup/SignupTerms.tsx
💤 Files with no reviewable changes (2)
  • src/components/base-ui/Signup/SignupTerms.tsx
  • src/components/base-ui/Signup/SignupTerms.module.css

@yhi9839
yhi9839 merged commit f49eb44 into main Jul 13, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Preview — 1ca95ca0 Deployed Jul 11, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug 버그 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: 약관 동의 필수 권한 및 로직 수정

2 participants