Skip to content

Fix/profile card#43

Merged
dasosann merged 3 commits intomainfrom
fix/profile-card
Mar 13, 2026
Merged

Fix/profile card#43
dasosann merged 3 commits intomainfrom
fix/profile-card

Conversation

@dasosann
Copy link
Copy Markdown
Contributor

No description provided.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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!

This pull request focuses on improving the architecture and user experience of the profile display feature. By breaking down a large component into smaller, specialized ones, the codebase becomes more maintainable and scalable. The changes also introduce visual enhancements and smoother interactions for viewing user profiles, making the interface more intuitive and modern.

Highlights

  • Component Refactoring: The monolithic ContactUserProfile component was refactored and split into two distinct, more modular components: ProfileCard and ProfileSlider.
  • Enhanced Profile Card: A new ProfileCard component was introduced to display individual user profiles, featuring an improved expandable details section with maxHeight and maskImage transitions, and a new Tag component for hobbies and advantages.
  • Dedicated Profile Slider: A new ProfileSlider component was created to manage the horizontal swipe functionality and pagination indicators for a collection of ProfileCard instances, centralizing the swipe logic.
  • UI/UX Improvements: The overall user interface and experience of the profile display were updated, including a cleaner presentation of profile details and smoother expansion animations.
Changelog
  • app/main/_components/ContactUserProfile.tsx
    • Removed the ContactUserProfile component, which previously handled both individual profile display and swipe functionality.
  • app/main/_components/ProfileCard.tsx
    • Added the ProfileCard component, responsible for rendering a single user profile with an expandable details section and tag-based display for interests and advantages.
  • app/main/_components/ProfileSlider.tsx
    • Added the ProfileSlider component, which manages the horizontal swiping and dot indicators for a collection of ProfileCard components.
  • app/main/_components/ScreenMainPage.tsx
    • Updated the import statement to use ProfileSlider instead of ContactUserProfile.
    • Replaced the usage of ContactUserProfile with ProfileSlider to display the mock profile data.
Activity
  • No specific activity has been recorded for this pull request yet.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@qodo-code-review
Copy link
Copy Markdown

Review Summary by Qodo

프로필 카드 컴포넌트 리팩토링 및 디자인 개선

✨ Enhancement

Grey Divider

Walkthroughs

Description
• 프로필 카드 컴포넌트를 단일 카드 기반으로 리팩토링
• 스와이프 기능과 인디케이터를 별도 슬라이더 컴포넌트로 분리
• 디자인 개선: 태그 기반 UI, 마스크 애니메이션 추가
• 터치/클릭 이벤트 처리 최적화
Diagram
flowchart LR
  A["ContactUserProfile<br/>기존 통합 컴포넌트"] -->|분리| B["ProfileCard<br/>단일 카드"]
  A -->|분리| C["ProfileSlider<br/>스와이프 + 인디케이터"]
  B -->|포함| C
  D["디자인 개선"] -->|적용| B
  D -->|태그 UI| E["Tag 컴포넌트"]
  D -->|마스크 애니메이션| F["ProfileDetails"]
Loading

Grey Divider

File Changes

1. app/main/_components/ContactUserProfile.tsx Refactoring +0/-333

기존 통합 컴포넌트 제거

• 파일 전체 삭제 (333줄)
• 기능을 ProfileCard와 ProfileSlider로 분리
• 통합 컴포넌트에서 단일 책임 원칙으로 리팩토링

app/main/_components/ContactUserProfile.tsx


2. app/main/_components/ProfileCard.tsx ✨ Enhancement +240/-0

새로운 단일 카드 컴포넌트 구현

• 새로운 단일 프로필 카드 컴포넌트 생성 (240줄)
• 태그 기반 UI로 관심사/장점 표시
• 마스크 이미지를 활용한 부드러운 확장/축소 애니메이션
• 터치/마우스 이벤트로 카드 클릭 감지
• 색상 및 타이포그래피 개선

app/main/_components/ProfileCard.tsx


3. app/main/_components/ProfileSlider.tsx ✨ Enhancement +100/-0

스와이프 슬라이더 컴포넌트 신규 작성

• 새로운 슬라이더 컴포넌트 생성 (100줄)
• 스와이프 기능과 인디케이터 도트 관리
• ProfileCard를 반복 렌더링하는 컨테이너 역할
• 스크롤 이벤트 기반 활성 인덱스 추적

app/main/_components/ProfileSlider.tsx


View more (1)
4. app/main/_components/ScreenMainPage.tsx Refactoring +2/-2

슬라이더 컴포넌트 임포트 변경

• ContactUserProfile 임포트를 ProfileSlider로 변경
• 컴포넌트 사용처 업데이트 (1줄 변경)

app/main/_components/ScreenMainPage.tsx


Grey Divider

Qodo Logo


✨ Describe tool usage guide:

Overview:
The describe tool scans the PR code changes, and generates a description for the PR - title, type, summary, walkthrough and labels. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on a PR.

When commenting, to edit configurations related to the describe tool (pr_description section), use the following template:

/describe --pr_description.some_config1=... --pr_description.some_config2=...

With a configuration file, use the following template:

[pr_description]
some_config1=...
some_config2=...
Enabling\disabling automation
  • When you first install the app, the default mode for the describe tool is:
pr_commands = ["/describe", ...]

meaning the describe tool will run automatically on every PR.

  • Markers are an alternative way to control the generated description, to give maximal control to the user. If you set:
pr_commands = ["/describe --pr_description.use_description_markers=true", ...]

the tool will replace every marker of the form pr_agent:marker_name in the PR description with the relevant content, where marker_name is one of the following:

  • type: the PR type.
  • summary: the PR summary.
  • walkthrough: the PR walkthrough.
  • diagram: the PR sequence diagram (if enabled).

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 labels

The default labels of the describe tool are quite generic: [Bug fix, Tests, Enhancement, Documentation, Other].

If you specify custom labels in the repo's labels page or via configuration file, you can get tailored labels for your use cases.
Examples for custom labels:

  • Main topic:performance - pr_agent:The main topic of this PR is performance
  • New endpoint - pr_agent:A new endpoint was added in this PR
  • SQL query - pr_agent:A new SQL query was added in this PR
  • Dockerfile changes - pr_agent:The PR contains changes in the Dockerfile
  • ...

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.
Note that Labels are not mutually exclusive, so you can add multiple label categories.
Make sure to provide proper title, and a detailed and well-phrased description for each label, so the tool will know when to suggest it.

Inline File Walkthrough 💎

For enhanced user experience, the describe tool can add file summaries directly to the "Files changed" tab in the PR page.
This will enable you to quickly understand the changes in each file, while reviewing the code changes (diffs).

To enable inline file summary, set pr_description.inline_file_summary in the configuration file, possible values are:

  • 'table': File changes walkthrough table will be displayed on the top of the "Files changed" tab, in addition to the "Conversation" tab.
  • true: A collapsable file comment with changes title and a changes summary for each file in the PR.
  • false (default): File changes walkthrough will be added only to the "Conversation" tab.
Utilizing extra instructions

The describe tool can be configured with extra instructions, to guide the model to a feedback tailored to the needs of your project.

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:

[pr_description]
extra_instructions="""- The PR title should be in the format: '<PR type>: <title>'
- The title should be short and concise (up to 10 words)
- ...
"""

Use triple quotes to write multi-line instructions. Use bullet points to make the instructions more readable.

More PR-Agent commands

To invoke the PR-Agent, add a comment using one of the following commands:

  • /review: Request a review of your Pull Request.
  • /describe: Update the PR title and description based on the contents of the PR.
  • /improve [--extended]: Suggest code improvements. Extended mode provides a higher quality feedback.
  • /ask <QUESTION>: Ask a question about the PR.
  • /update_changelog: Update the changelog based on the PR's contents.
  • /help_docs <QUESTION>: Given a path to documentation (either for this repository or for a given one), ask a question.
  • /add_docs 💎: Generate docstring for new components introduced in the PR.
  • /generate_labels 💎: Generate labels for the PR based on the PR's contents.
  • /analyze 💎: Automatically analyzes the PR, and presents changes walkthrough for each component.

See the tools guide for more details.
To list the possible configuration parameters, add a /config comment.

See the describe usage page for a comprehensive guide on using this tool.

@qodo-code-review
Copy link
Copy Markdown

qodo-code-review bot commented Mar 13, 2026

Code Review by Qodo

🐞 Bugs (4) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Broken default profile image 🐞 Bug ✓ Correctness
Description
ProfileCard falls back to "/default-profile.png", but the project’s default profile asset is
"/profile/default-profile.svg", so users without profileImageUrl will hit a 404 and see a broken
image.
Code

app/main/_components/ProfileCard.tsx[R40-45]

+        <Image
+          src={profile.profileImageUrl || "/default-profile.png"}
+          alt="Profile"
+          fill
+          className="object-cover"
+        />
Evidence
ProfileCard hardcodes a fallback path that does not match the existing default profile asset path
used elsewhere and present in public/.

app/main/_components/ProfileCard.tsx[38-45]
app/profile-image/_components/ProfileImageSelection.tsx[138-144]
public/profile/default-profile.svg[1-2]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`ProfileCard` uses a non-existent fallback image path (`/default-profile.png`), which causes broken images when `profile.profileImageUrl` is missing.
### Issue Context
The codebase already uses `/profile/default-profile.svg` as the default profile image elsewhere.
### Fix Focus Areas
- app/main/_components/ProfileCard.tsx[38-45]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Invalid profileImageUrl src 🐞 Bug ✓ Correctness
Description
ProfileCard passes profile.profileImageUrl directly to next/image, but the signup flow persists
non-URL values (e.g., "default_<id>" or an S3 imageKey), so the rendered Image src will be
invalid/broken for real user data.
Code

app/main/_components/ProfileCard.tsx[R40-45]

+        <Image
+          src={profile.profileImageUrl || "/default-profile.png"}
+          alt="Profile"
+          fill
+          className="object-cover"
+        />
Evidence
The signup flow explicitly constructs profileImageUrl values as either default_ or an S3
imageKey string, neither of which is transformed into a browser-resolvable URL/path before
ProfileCard feeds it to next/image. Also, next.config.ts does not define any images
remotePatterns/loader configuration that would help with non-local sources.

app/profile-image/_components/TermsDrawer.tsx[104-125]
hooks/useProfileSignUp.ts[27-57]
app/main/_components/ProfileCard.tsx[40-45]
next.config.ts[3-7]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`ProfileCard` renders `profile.profileImageUrl` directly via `next/image`, but `profileImageUrl` is persisted as either `default_&amp;amp;lt;id&amp;amp;gt;` or as an S3 `imageKey` (not a valid public URL/path). This leads to broken profile images for real user profiles.
### Issue Context
- Signup flow sets `profileImageUrl` to `default_${selectedId}` for default images, or to `imageKey` returned by the presigned upload flow.
- `next.config.ts` currently has no `images` configuration.
### Fix Focus Areas
- app/main/_components/ProfileCard.tsx[38-45]
- app/profile-image/_components/TermsDrawer.tsx[104-125]
- hooks/useProfileSignUp.ts[27-57]
- next.config.ts[1-9]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

3. Card not keyboard operable🐞 Bug ⛯ Reliability
Description
The expand/collapse interaction is attached to a non-semantic div without focus/keyboard handling,
so keyboard users cannot navigate to and toggle the card expansion state.
Code

app/main/_components/ProfileCard.tsx[R213-218]

+      <div
+        onTouchStart={() => (touchStartTime.current = Date.now())}
+        onMouseDown={() => (touchStartTime.current = Date.now())}
+        onClick={handleCardClick}
+        className="flex w-full cursor-pointer flex-col items-center justify-start gap-3 p-4"
+      >
Evidence
The interactive surface is a plain ` with pointer handlers and onClick, but no role, tabIndex`,
or key handlers, making it non-focusable and not operable via keyboard navigation.

app/main/_components/ProfileCard.tsx[199-218]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The expand/collapse control is implemented on a non-focusable `&amp;amp;lt;div&amp;amp;gt;`, so keyboard users cannot toggle expansion.
### Issue Context
The toggle is currently bound to `onTouchStart`/`onMouseDown`/`onClick` on a div.
### Fix Focus Areas
- app/main/_components/ProfileCard.tsx[199-223]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


4. Unused Hobby import 🐞 Bug ⛯ Reliability
Description
ProfileCard imports Hobby but never uses it, creating lint noise and potentially failing repo lint
checks.
Code

app/main/_components/ProfileCard.tsx[3]

+import { Hobby, ProfileData } from "@/lib/types/profile";
Evidence
The file imports Hobby but there are no references to it. The repo runs ESLint with the Next.js
TypeScript preset via eslint.config.mjs and exposes lint scripts via package.json.

app/main/_components/ProfileCard.tsx[1-6]
eslint.config.mjs[1-8]
package.json[5-14]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`Hobby` is imported but unused in `ProfileCard.tsx`.
### Issue Context
The repo is configured to run ESLint with Next.js TypeScript presets.
### Fix Focus Areas
- app/main/_components/ProfileCard.tsx[1-6]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

이번 PR은 기존의 거대했던 ContactUserProfile 컴포넌트를 ProfileCardProfileSlider라는 두 개의 작고 응집도 높은 컴포넌트로 성공적으로 리팩토링했습니다. 이는 코드의 유지보수성과 가독성을 크게 향상시키는 좋은 변화입니다. 특히 ProfileCard에서 탭과 스와이프를 구분하는 UX 개선은 훌륭합니다.

다만, 웹 접근성 측면에서 몇 가지 개선이 필요합니다. 아이콘 버튼에 aria-label이 누락되었고, 이미지에 구체적이지 않은 alt 텍스트가 사용되었습니다. 또한, React의 key 사용 규칙과 Tailwind CSS 테마 색상 사용에 대한 베스트 프랙티스를 적용하여 코드 품질을 더욱 높일 수 있습니다. 관련하여 몇 가지 구체적인 제안을 남겼으니 확인 부탁드립니다.

Comment on lines +133 to +138
profile.hobbies.map((hobby, idx) => (
<Tag
key={idx}
text={typeof hobby === "string" ? hobby : hobby.name}
/>
))
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

React에서 리스트를 렌더링할 때 배열의 인덱스를 key로 사용하는 것은 안티패턴입니다. 리스트가 동적으로 변경(추가, 삭제, 재정렬)될 경우, state 관리와 성능에 예기치 않은 문제를 일으킬 수 있습니다. 데이터에 고유한 값이 있다면 그것을 key로 사용하고, 없다면 내용 자체를 사용하는 것이 더 안전합니다.

          profile.hobbies.map((hobby) => (
            <Tag
              key={typeof hobby === "string" ? hobby : hobby.name}
              text={typeof hobby === "string" ? hobby : hobby.name}
            />
          ))

Comment on lines +40 to +45
<Image
src={profile.profileImageUrl || "/default-profile.png"}
alt="Profile"
fill
className="object-cover"
/>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Broken default profile image 🐞 Bug ✓ Correctness

ProfileCard falls back to "/default-profile.png", but the project’s default profile asset is
"/profile/default-profile.svg", so users without profileImageUrl will hit a 404 and see a broken
image.
Agent Prompt
### Issue description
`ProfileCard` uses a non-existent fallback image path (`/default-profile.png`), which causes broken images when `profile.profileImageUrl` is missing.

### Issue Context
The codebase already uses `/profile/default-profile.svg` as the default profile image elsewhere.

### Fix Focus Areas
- app/main/_components/ProfileCard.tsx[38-45]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +40 to +45
<Image
src={profile.profileImageUrl || "/default-profile.png"}
alt="Profile"
fill
className="object-cover"
/>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

2. Invalid profileimageurl src 🐞 Bug ✓ Correctness

ProfileCard passes profile.profileImageUrl directly to next/image, but the signup flow persists
non-URL values (e.g., "default_<id>" or an S3 imageKey), so the rendered Image src will be
invalid/broken for real user data.
Agent Prompt
### Issue description
`ProfileCard` renders `profile.profileImageUrl` directly via `next/image`, but `profileImageUrl` is persisted as either `default_<id>` or as an S3 `imageKey` (not a valid public URL/path). This leads to broken profile images for real user profiles.

### Issue Context
- Signup flow sets `profileImageUrl` to `default_${selectedId}` for default images, or to `imageKey` returned by the presigned upload flow.
- `next.config.ts` currently has no `images` configuration.

### Fix Focus Areas
- app/main/_components/ProfileCard.tsx[38-45]
- app/profile-image/_components/TermsDrawer.tsx[104-125]
- hooks/useProfileSignUp.ts[27-57]
- next.config.ts[1-9]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@dasosann dasosann merged commit 2f78d68 into main Mar 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant