Skip to content

[Fix] 프로필 완성을 해도 프로필 미완성 모달이 뜨는 오류 수정#96

Merged
woneeeee merged 2 commits intodevelopfrom
fix/프로필-완성-모달-오류
Apr 30, 2026

Hidden character warning

The head ref may contain hidden characters: "fix/\ud504\ub85c\ud544-\uc644\uc131-\ubaa8\ub2ec-\uc624\ub958"
Merged

[Fix] 프로필 완성을 해도 프로필 미완성 모달이 뜨는 오류 수정#96
woneeeee merged 2 commits intodevelopfrom
fix/프로필-완성-모달-오류

Conversation

@woneeeee
Copy link
Copy Markdown
Member

@woneeeee woneeeee commented Apr 30, 2026

✅ PR 유형

어떤 변경 사항이 있었나요?

  • 새로운 기능 추가
  • 버그 수정
  • 코드에 영향을 주지 않는 변경사항(오타 수정, 탭 사이즈 변경, 변수명 변경)
  • 코드 리팩토링
  • 주석 추가 및 수정
  • 문서 수정
  • 빌드 부분 혹은 패키지 매니저 수정
  • 파일 혹은 폴더명 수정
  • 파일 혹은 폴더 삭제

📌 관련 이슈번호

  • Closed #

✅ Key Changes

  • 프로필 완성을 해도 프로필 미완성 모달이 뜨는 오류 수정

📸 스크린샷 or 실행영상


🎸 기타 사항 or 추가 코멘트

Summary by CodeRabbit

릴리스 노트

  • 버그 수정
    • 다중 클럽 환경에서 프로필 업데이트 처리 개선
    • 프로필 상태 조회 시 올바른 클럽 데이터 반영
    • 포스트 작성 시 불필요한 데이터 새로고침 최소화
    • 프로필 완성도 추적 및 필수 입력 필드 검증 강화

@woneeeee woneeeee requested review from JIN921, dalzzy and nabbang6 April 30, 2026 05:41
@woneeeee woneeeee self-assigned this Apr 30, 2026
@woneeeee woneeeee added the 🐞 BugFix Something isn't working label Apr 30, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 30, 2026

Warning

Rate limit exceeded

@woneeeee has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 55 minutes and 11 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1a4e8029-a27a-4371-8b86-3ef706069766

📥 Commits

Reviewing files that changed from the base of the PR and between 447f745 and 590505f.

📒 Files selected for processing (1)
  • src/hooks/mutations/useUpdateProfileMutation.ts
📝 Walkthrough

개요

프로필 업데이트 흐름 전체에 clubId 전달을 추가합니다. EditProfileContent의 mutation 페이로드, useProfileStatusQuery의 선택적 파라미터, useWritePost의 조건부 refetch 로직, useUpdateProfileMutation의 캐시 업데이트가 변경되어 클럽별 스코프 지원을 구현합니다.

변경사항

Cohort / File(s) 요약
프로필 업데이트 컴포넌트
src/components/mypage/edit/EditProfileContent.tsx
mutation 페이로드에 clubId를 추가로 전달하여 updateProfile 호출 시 클럽 스코핑을 지원합니다.
프로필 상태 쿼리 훅
src/hooks/home/useProfileStatusQuery.ts
선택적 clubIdOverride 파라미터를 수용하여 제공된 값이 있으면 우선 사용하고, 없으면 저장된 clubId로 폴백하는 로직을 추가합니다.
포스트 작성 훅 및 mutation
src/hooks/home/useWritePost.ts
useProfileStatusQuery에 clubId를 전달하고, 프로필 상태의 cardinalAssigned 또는 profileCompleted 여부에 따라 refetch를 조건부로 실행합니다.
프로필 업데이트 mutation
src/hooks/mutations/useUpdateProfileMutation.ts
UpdateProfileParams에 선택적 clubId 필드를 추가하고, mutation 성공 시 isCompleteProfile 로직으로 필수 필드 완성 여부를 판단하여 캐시를 업데이트합니다. 모든 캐시 invalidation이 targetClubId를 사용하도록 통일합니다.

Sequence Diagram

sequenceDiagram
    participant User as 사용자
    participant Component as EditProfileContent
    participant Mutation as useUpdateProfileMutation
    participant QueryCache as Query Cache
    participant API as homeApi

    User->>Component: 프로필 저장 클릭
    Component->>Mutation: updateProfile(clubId, user, clubProfile, ...)
    Mutation->>QueryCache: targetClubId 결정<br/>(param clubId || store clubId)
    
    alt profileStatus 캐시 존재
        Mutation->>Mutation: isCompleteProfile 계산<br/>(trimmed required fields)
        Mutation->>QueryCache: home/profile-status 업데이트<br/>(profileCompleted, missingFields)
    end
    
    Mutation->>API: getMe() refetch
    API->>Mutation: 최신 사용자 데이터
    Mutation->>QueryCache: me 캐시 업데이트<br/>(targetClubId 사용)
    Mutation->>Component: 성공 응답
    Component->>User: 프로필 저장 완료
Loading

코드 리뷰 난이도

🎯 3 (Moderate) | ⏱️ ~20 minutes

관련 PR

검토자

  • JIN921
  • nabbang6
  • dalzzy

Poem

🐰 클럽 아이디를 따라가며
프로필 여정이 흐르네요
캐시도 깔끔하게 정렬되고
조건부 refetch로 효율적인 흐름
프로필 완성을 축하합니다! 🎉

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive PR 설명이 기본 구조는 포함하지만 PR 유형 체크박스 미선택, 관련 이슈번호 미기재, 스크린샷 미첨부 등 필수 정보가 불완전합니다. PR 유형(버그 수정)을 체크하고, 관련 이슈번호를 명시하며, 가능한 스크린샷이나 실행영상을 첨부하여 설명을 완성해주세요.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed 프로필 완성 후 미완성 모달이 표시되는 버그 수정이라는 명확한 제목으로, 변경사항의 주요 목적을 정확히 요약하고 있습니다.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/프로필-완성-모달-오류

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
Review rate limit: 0/1 reviews remaining, refill in 55 minutes and 11 seconds.

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

@github-actions
Copy link
Copy Markdown

PR 테스트 결과

Jest: 통과

🎉 모든 테스트를 통과했습니다!

@github-actions
Copy link
Copy Markdown

🤖 Claude 테스트 제안

모델: claude-sonnet-4-6 | 토큰: 0 입력 / 0 출력

변경된 컴포넌트에 대해 Claude가 생성한 테스트 코드입니다. 검토 후 적합한 부분만 사용하세요.

src/app/(private)/[clubId]/admin/layout.tsx

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


src/components/mypage/edit/EditProfileContent.tsx

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


src/hooks/home/useProfileStatusQuery.ts

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


src/hooks/home/useWritePost.ts

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


src/hooks/mutations/useUpdateProfileMutation.ts

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


이 코멘트는 Claude API를 통해 자동 생성되었습니다. 반드시 검토 후 사용하세요.

@github-actions
Copy link
Copy Markdown

구현한 기능 Preview: https://weeth-kd3yn2dzm-weethsite-4975s-projects.vercel.app

@github-actions
Copy link
Copy Markdown

PR 검증 결과

TypeScript: 통과
ESLint: 통과
Prettier: 실패
Build: 통과

⚠️ 일부 검증에 실패했습니다. 확인 후 수정해주세요.

@github-actions
Copy link
Copy Markdown

🤖 Claude 테스트 제안

모델: claude-sonnet-4-6 | 토큰: 0 입력 / 0 출력

변경된 컴포넌트에 대해 Claude가 생성한 테스트 코드입니다. 검토 후 적합한 부분만 사용하세요.

src/app/(private)/[clubId]/admin/layout.tsx

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


src/components/mypage/edit/EditProfileContent.tsx

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


src/hooks/home/useProfileStatusQuery.ts

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


src/hooks/home/useWritePost.ts

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


src/hooks/mutations/useUpdateProfileMutation.ts

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


이 코멘트는 Claude API를 통해 자동 생성되었습니다. 반드시 검토 후 사용하세요.

@github-actions
Copy link
Copy Markdown

PR 테스트 결과

Jest: 통과

🎉 모든 테스트를 통과했습니다!

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

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 the current code and only fix it if needed.

Inline comments:
In `@src/hooks/mutations/useUpdateProfileMutation.ts`:
- Around line 80-95: The cache update in queryClient.setQueryData (key
['home','profile-status', targetClubId]) only recomputes profileCompleted via
isCompleteProfile(user) but leaves missingFields as old.missingFields; change it
to recompute missingFields from the current user input (or replace with the
server response) so the modal shows up-to-date missing fields. Concretely,
inside the updater for queryClient.setQueryData (the function that currently
returns { ...old, profileCompleted, missingFields: profileCompleted ? [] :
old.missingFields }), replace the missingFields assignment with a recomputation
e.g. missingFields: profileCompleted ? [] : computeMissingFields(user) (or use
the server response payload if available) so missingFields is derived from the
current user object rather than preserved from old.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 165b8ea7-2a8c-4fb3-9250-ad2abfd2c2db

📥 Commits

Reviewing files that changed from the base of the PR and between d23f365 and 447f745.

📒 Files selected for processing (4)
  • src/components/mypage/edit/EditProfileContent.tsx
  • src/hooks/home/useProfileStatusQuery.ts
  • src/hooks/home/useWritePost.ts
  • src/hooks/mutations/useUpdateProfileMutation.ts

Comment on lines +80 to +95
queryClient.setQueryData(
['home', 'profile-status', targetClubId],
(
old:
| { cardinalAssigned: boolean; profileCompleted: boolean; missingFields: string[] }
| undefined,
) => {
if (!old) return old;

const profileCompleted = isCompleteProfile(user);
return {
...old,
profileCompleted,
missingFields: profileCompleted ? [] : old.missingFields,
};
},
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

missingFields도 현재 값 기준으로 갱신해 주세요.

지금은 profileCompleted만 다시 계산하고 missingFields는 이전 캐시를 그대로 유지합니다. 그래서 일부 필드를 수정한 뒤에도 모달이 오래된 누락 목록을 보여줄 수 있습니다. 이 구간은 현재 입력값으로 다시 계산하거나 서버 응답으로 덮어쓰는 쪽이 안전합니다.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/hooks/mutations/useUpdateProfileMutation.ts` around lines 80 - 95, The
cache update in queryClient.setQueryData (key ['home','profile-status',
targetClubId]) only recomputes profileCompleted via isCompleteProfile(user) but
leaves missingFields as old.missingFields; change it to recompute missingFields
from the current user input (or replace with the server response) so the modal
shows up-to-date missing fields. Concretely, inside the updater for
queryClient.setQueryData (the function that currently returns { ...old,
profileCompleted, missingFields: profileCompleted ? [] : old.missingFields }),
replace the missingFields assignment with a recomputation e.g. missingFields:
profileCompleted ? [] : computeMissingFields(user) (or use the server response
payload if available) so missingFields is derived from the current user object
rather than preserved from old.

@github-actions
Copy link
Copy Markdown

PR 검증 결과

TypeScript: 통과
ESLint: 통과
Prettier: 통과
Build: 통과

🎉 모든 검증을 통과했습니다!

@github-actions
Copy link
Copy Markdown

구현한 기능 Preview: https://weeth-jfozf7d9x-weethsite-4975s-projects.vercel.app

Copy link
Copy Markdown
Collaborator

@nabbang6 nabbang6 left a comment

Choose a reason for hiding this comment

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

확인이를 햇습니당,,, 짱!!!!

@woneeeee woneeeee merged commit fba9201 into develop Apr 30, 2026
5 checks passed
@woneeeee woneeeee deleted the fix/프로필-완성-모달-오류 branch April 30, 2026 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 BugFix Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants