Conversation
Summary of ChangesHello, 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은 백엔드 API 스펙 변경에 따라 프로필 관련 응답 변수명과 데이터 구조를 업데이트하는 것을 목표로 합니다. Highlights
Changelog
Activity
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
|
Review Summary by QodoAPI 응답 변수명 및 데이터 구조 통일
WalkthroughsDescription• API 응답 변수명 통일 (profileImageUrl → profileImageKey, advantages → tags, favoriteSong → song) • 태그 데이터 구조 변경 (배열 → 객체 배열로 변환) • 이모지 제거 로직 추가 및 데이터 변환 로직 개선 • 기본 프로필 이미지 목록 순서 및 항목 업데이트 Diagramflowchart LR
A["API 응답 변수명 변경"] --> B["타입 정의 업데이트"]
A --> C["컴포넌트 로직 수정"]
D["데이터 구조 변경<br/>string[] → object[]"] --> E["변환 로직 추가"]
E --> F["이모지 제거 처리"]
G["기본 프로필 목록 변경"] --> H["순서 및 항목 업데이트"]
File Changes1. hooks/useMatchingHistory.ts
|
Enabling\disabling automation
meaning the
the tool will replace every marker of the form
Note that when markers are enabled, if the original PR description does not contain any markers, the tool will not alter the description at all. |
Custom labelsThe default labels of the If you specify custom labels in the repo's labels page or via configuration file, you can get tailored labels for your use cases.
The list above is eclectic, and aims to give an idea of different possibilities. Define custom labels that are relevant for your repo and use cases. |
Inline File Walkthrough 💎For enhanced user experience, the To enable inline file summary, set
|
Utilizing extra instructionsThe Be specific, clear, and concise in the instructions. With extra instructions, you are the prompter. Notice that the general structure of the description is fixed, and cannot be changed. Extra instructions can change the content or style of each sub-section of the PR description. Examples for extra instructions: Use triple quotes to write multi-line instructions. Use bullet points to make the instructions more readable. |
More PR-Agent commands
|
See the describe usage page for a comprehensive guide on using this tool.
Code Review by Qodo
1. Image key passed to Image
|
There was a problem hiding this comment.
Code Review
이번 PR은 API 응답 스펙 변경에 따라 프론트엔드 전체에 걸쳐 변수명을 수정한 것으로 보입니다. (advantages -> tags, favoriteSong -> song, profileImageUrl -> profileImageKey) 변경 사항은 대부분 잘 적용되었으나, 몇 가지 개선점을 발견하여 리뷰를 남깁니다. 주요 내용으로는 이미지 키를 URL로 변환하는 로직 누락, 중복된 이모지 제거 로직, 그리고 소셜 정보 확인 로직의 가독성 개선에 대한 제안이 포함되어 있습니다.
| ...partner, | ||
| // API에서 null로 올 수 있는 필드들만 안전하게 변환 | ||
| // API에서 필드명이 변경되었거나 null로 올 수 있는 필드들만 안전하게 변환 | ||
| profileImageUrl: partner.profileImageKey, |
There was a problem hiding this comment.
| tag: tag | ||
| .replace( | ||
| /[\uD800-\uDBFF][\uDC00-\uDFFF]|\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDDFF]|\uD83D[\uDE00-\uDE4F]|\uD83E[\uDD00-\uDDFF]/g, | ||
| "", | ||
| ) | ||
| .trim(), |
There was a problem hiding this comment.
이모지 제거를 위한 정규식과 로직이 app/profile-image/_components/TermsDrawer.tsx 파일에서도 중복으로 사용되고 있습니다. 코드 중복을 피하고 유지보수성을 높이기 위해 이 로직을 lib/utils.ts와 같은 공통 유틸리티 파일로 추출하는 것을 권장합니다.
또한, 더 간결하고 표준적인 유니코드 속성 이스케이프(Unicode property escapes) \p{Emoji}를 사용하면 가독성을 향상시킬 수 있습니다.
tag: tag.replace(/\p{Emoji}/gu, "").trim(),
References
- Pure functions, such as validation logic, should be extracted into common utility files to improve reusability and separate concerns.
| socialType: | ||
| profile.socialType && profile.socialAccountId | ||
| ? profile.socialType | ||
| : null, | ||
| socialAccountId: | ||
| profile.socialType && profile.socialAccountId | ||
| ? profile.socialAccountId | ||
| : null, |
There was a problem hiding this comment.
소셜 정보 유효성을 확인하는 profile.socialType && profile.socialAccountId 조건이 중복으로 사용되고 있습니다. 가독성을 높이고 실수를 줄이기 위해 이 조건을 변수로 추출하는 것을 고려해 보세요.
예시:
const hasSocialInfo = profile.socialType && profile.socialAccountId;
const submitData: ProfileSubmitData = {
// ...
socialType: hasSocialInfo ? profile.socialType : null,
socialAccountId: hasSocialInfo ? profile.socialAccountId : null,
// ...
};| ...partner, | ||
| // API에서 null로 올 수 있는 필드들만 안전하게 변환 | ||
| // API에서 필드명이 변경되었거나 null로 올 수 있는 필드들만 안전하게 변환 | ||
| profileImageUrl: partner.profileImageKey, |
There was a problem hiding this comment.
1. Image key passed to image 🐞 Bug ✓ Correctness
ScreenMainPage assigns partner.profileImageKey into profileImageUrl, but ProfileCard passes profileImageUrl directly to next/image as src. Since profileImageKey is an object key (e.g. "default_bear" / S3 key) rather than a URL/path starting with "/" or "http", next/image will error or render broken images on the main page.
Agent Prompt
### Issue description
The main page maps `partner.profileImageKey` into `ProfileData.profileImageUrl` and then uses it directly as the `src` for `next/image`. A key like `default_bear` or an S3 object key is not a valid image URL/path for `next/image`, leading to runtime errors/broken images.
### Issue Context
- API and upload flow both treat the value as an *image key*.
- UI rendering expects a valid URL/path.
### Fix Focus Areas
- app/main/_components/ScreenMainPage.tsx[48-58]
- app/main/_components/ProfileCard.tsx[36-48]
- hooks/useProfileSignUp.ts[6-57]
- app/profile-image/_components/TermsDrawer.tsx[103-123]
- lib/types/profile.ts[34-60]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
No description provided.