Skip to content

fix : 마이페이지 정보 수정 시 전역변수 user update#129

Merged
leetaewon123 merged 1 commit intodevfrom
fix/mypage
Sep 17, 2025
Merged

fix : 마이페이지 정보 수정 시 전역변수 user update#129
leetaewon123 merged 1 commit intodevfrom
fix/mypage

Conversation

@leetaewon123
Copy link
Copy Markdown
Collaborator

@leetaewon123 leetaewon123 commented Sep 17, 2025

🔎 작업 사항

  • 마이페이지 정보 수정 시 전역변수 user update

Summary by CodeRabbit

  • 버그 수정
    • 프로필 수정 후 앱 전반에 사용자 정보가 즉시 갱신되지 않던 문제를 해결하여, 저장 직후 최신 정보와 토스트 알림이 일관되게 표시됩니다.
  • 리팩터
    • 프로필 수정 요청/응답 처리 로직을 정교화하여 안정성과 일관성을 개선했습니다.
    • 불필요한 디버그 로그를 제거해 콘솔 가독성을 높였습니다.

@leetaewon123 leetaewon123 merged commit 4f08b8d into dev Sep 17, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Sep 17, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

마이페이지 프로필 수정 흐름을 타입 안전하게 정비하고, 수정 성공 시 글로벌 유저 스토어를 실제로 갱신하도록 변경했습니다. 수정 요청은 FormData에 JSON(request)과 이미지 파일을 함께 전송하며, 응답 타입을 IUserInfoModifyResponse로 명시했습니다.

Changes

Cohort / File(s) Change Summary
Mypage UI (Mine tab)
src/app/(auth)/(navigationsBarLayout)/mypage/tab/Mine.tsx
useUserStore에서 setUser를 사용해 프로필 수정 응답의 result로 전역 사용자 상태 갱신. 로깅 유지 및 토스트/쿼리 무효화 흐름과 연계. 주석 처리됐던 setUser 호출을 활성화.
Mypage model: mutation
src/entities/mypage/model/query.ts
디버그 console.log 제거. FormData에 request를 JSON Blob으로 추가하고 이미지 파일을 선택적으로 첨부. ApiHelper.put<IUserInfoModifyResponse>로 응답 타입 제네릭 명시.
Types: user modify response
src/entities/mypage/model/types.ts
IUserInfoModifyResponseLanguage 인터페이스 신규 추가. 수정 응답 스키마(나이, 닉네임, 언어, 인증 타입 등) 정의. 공개 엔티티 삭제/이름 변경 없음.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor U as User
  participant V as Mine.tsx (View)
  participant S as useModifyInfo (Mutation)
  participant API as API_URL.MYPAGE.USER_INFO
  participant Store as useUserStore

  U->>V: 프로필 수정 제출
  V->>S: mutate({request, image})
  S->>S: FormData 생성 (request JSON + image)
  S->>API: PUT /user-info (FormData)
  API-->>S: IUserInfoModifyResponse
  S-->>V: 응답 전달
  V->>Store: setUser(response.result)
  V->>V: 토스트/쿼리 무효화 등 후속 처리
  Note over V,Store: 전역 사용자 상태 최신화
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

fix

Poem

작은 발로 탭-탭, 프로필을 고쳐 보았지!
JSON을 보따리에, 이미지도 살짝 같이 🧺
서버가 말해주면, 난 setUser로 척척—
내 정보는 반짝, 토스트는 또 깜짝 ✨
오늘도 토끼는 코드밭을 뛰어넘지 🐇

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/mypage

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 41d24c7 and a16a56c.

📒 Files selected for processing (3)
  • src/app/(auth)/(navigationsBarLayout)/mypage/tab/Mine.tsx (3 hunks)
  • src/entities/mypage/model/query.ts (3 hunks)
  • src/entities/mypage/model/types.ts (1 hunks)

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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 and usage tips.

@coderabbitai coderabbitai Bot added the fix label Sep 17, 2025
@coderabbitai coderabbitai Bot mentioned this pull request Dec 23, 2025
@grimza99 grimza99 deleted the fix/mypage branch January 16, 2026 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant