Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Summary of ChangesHello @shinwokkang, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 S3 프로필 이미지 업로드 로직을 개선하고, 회원가입 과정의 오류 처리 방식을 현대화하며, 관심사 카테고리 데이터를 중앙 관리하도록 리팩토링합니다. 이를 통해 코드의 일관성을 높이고, 사용자 경험을 향상시키며, 향후 기능 확장을 용이하게 합니다. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
이 PR은 프로필 이미지 및 관심 카테고리 선택 로직을 리팩터링하고 S3 이미지 업로드 로직을 수정합니다. 전반적으로 코드 구조를 개선하는 좋은 변경 사항들이 포함되어 있습니다. 상수 중앙화, 오류 처리 개선 등 긍정적인 변화가 많습니다. 다만, 몇 가지 잠재적인 문제점과 개선 사항을 발견하여 리뷰 코멘트를 남겼습니다. 기본 프로필 이미지 경로 처리의 불일치 문제, 카테고리 매핑 로직의 혼란 가능성, 그리고 API 엔드포인트의 타입 안정성 강화에 대한 제안을 확인해주시면 좋겠습니다.
| } | ||
| } else if (imgUrl && !imgUrl.startsWith("blob:") && !imgUrl.includes("default_profile")) { | ||
| // Already uploaded URL (e.g. from previous attempt or social) | ||
| } else if (imgUrl && !imgUrl.startsWith("blob:")) { |
There was a problem hiding this comment.
이 로직 변경으로 기본 이미지 경로도 서버로 전송될 수 있게 되었습니다. 하지만 SignupContext의 profileImage 초기값이 "/default_profile_1.svg"로 남아있어, 사용자가 이미지를 변경하지 않으면 이전 기본 이미지 경로가 전송됩니다. 이 PR의 다른 변경사항들(handleResetImage 등)은 "/profile.svg"를 사용하고 있어 불일치가 발생합니다. SignupContext.tsx의 초기 상태도 "/profile.svg"로 업데이트하거나, 혹은 서버로 전송하기 전에 기본 이미지 경로를 통일된 값으로 변경하는 로직이 필요해 보입니다.
| } | ||
|
|
||
| // 2. Submit all info to additional-info endpoint | ||
| const categories = selectedInterests.map((c: string) => CATEGORY_MAP[c] || c); |
There was a problem hiding this comment.
selectedInterests 배열에는 이제 카테고리 label이 아닌 value가 저장됩니다. CATEGORY_MAP은 label을 value로 변환하는 객체이므로, CATEGORY_MAP[c]는 항상 undefined가 됩니다. 코드가 || c 덕분에 의도대로 동작하기는 하지만, 혼란을 줄 수 있으므로 매핑 로직을 제거하는 것이 좋습니다.
| const categories = selectedInterests.map((c: string) => CATEGORY_MAP[c] || c); | |
| const categories = selectedInterests; |
| ADDITIONAL_INFO: `${API_BASE_URL}/members/additional-info`, | ||
| CHECK_NICKNAME: `${API_BASE_URL}/members/check-nickname`, | ||
| PROFILE: `${API_BASE_URL}/members/me`, | ||
| IMAGE_UPLOAD: (type: string) => `${API_BASE_URL}/image/${type}/upload-url`, |
There was a problem hiding this comment.
type 매개변수를 string으로 지정하는 것보다 authService.ts에서 사용되는 것처럼 더 구체적인 타입 ("PROFILE" | "CLUB" | "NOTICE")으로 지정하면 타입 안정성을 높일 수 있습니다. 이렇게 하면 잘못된 이미지 타입을 사용하는 것을 컴파일 시점에 방지할 수 있습니다.
| IMAGE_UPLOAD: (type: string) => `${API_BASE_URL}/image/${type}/upload-url`, | |
| IMAGE_UPLOAD: (type: "PROFILE" | "CLUB" | "NOTICE") => `${API_BASE_URL}/image/${type}/upload-url`, |
📌 개요 (Summary)
🛠️ 변경 사항 (Changes)
📸 스크린샷 (Screenshots)
(UI 변경 사항이 있다면 첨부해주세요)
✅ 체크리스트 (Checklist)
pnpm build)pnpm lint)