Skip to content

Feat/matching importatnt#55

Merged
dasosann merged 5 commits intomainfrom
feat/matching-importatnt
Apr 17, 2026
Merged

Feat/matching importatnt#55
dasosann merged 5 commits intomainfrom
feat/matching-importatnt

Conversation

@dasosann
Copy link
Copy Markdown
Contributor

@dasosann dasosann commented Apr 16, 2026

PR Type

Enhancement


Description

  • 매칭 API 호출 및 타입 정의 추가

  • 중요 옵션 선택 UI를 드래그 앤 드롭 기반으로 재설계

  • 선택 완료 시 체크 애니메이션 및 취소 기능 구현

  • 매칭 옵션 카드 컴포넌트 신규 생성


Diagram Walkthrough

flowchart LR
  A["useMatching Hook"] -- "POST /api/matching" --> B["API Response"]
  B --> C["MatchingResult"]
  D["ImportantOptionDrawer"] -- "Drag & Drop" --> E["MatchingOptionCard"]
  E -- "onSelect" --> F["MatchingImportantOptionSection"]
  F -- "selections" --> G["ScreenMatching"]
Loading

File Walkthrough

Relevant files
Enhancement
useMatching.ts
매칭 API 호출 훅 신규 생성                                                                               

hooks/useMatching.ts

  • 매칭 API 호출을 위한 postMatching 함수 구현
  • useMutation 기반 useMatching 훅 생성
  • 성공/실패 콜백에서 로그 출력
+36/-0   
matching.ts
매칭 응답 타입 및 API 응답 타입 정의                                                                   

lib/types/matching.ts

  • MatchingResult 인터페이스 추가 (매칭된 사용자 정보)
  • ApiResponse 제네릭 인터페이스 추가
  • 프로필 타입 임포트 확장 (Gender, MBTI, SocialType 등)
+23/-1   
ImportantOptionDrawer.tsx
드래그 앤 드롭 기반 옵션 선택 UI 전면 개편                                                             

app/matching/_components/ImportantOptionDrawer.tsx

  • 드래그 앤 드롭 기능 구현 (포인터 이벤트 기반)
  • 타이핑 애니메이션 컴포넌트 추가
  • 드롭 존 UI 및 선택 상태 시각화 개선
  • 선택 취소 버튼 및 NEXT 버튼 추가
  • 드래그 중인 요소를 Portal로 렌더링
+288/-30
MatchingImportantOptionSection.tsx
선택 완료 애니메이션 및 취소 기능 추가                                                                     

app/matching/_components/MatchingImportantOptionSection.tsx

  • 선택 완료 시 체크 아이콘 애니메이션 추가
  • 선택 취소 기능 구현
  • selections prop 추가로 선택된 옵션 값 표시
  • 트리거 요소를 div로 변경하여 상호작용성 개선
+75/-29 
MatchingOptionCard.tsx
드래그 가능한 옵션 카드 컴포넌트 신규 생성                                                                 

app/matching/_components/MatchingOptionCard.tsx

  • 드래그 가능한 옵션 카드 컴포넌트 신규 생성
  • 포인터 이벤트 핸들러 지원
  • 드래그 핸들 아이콘(햄버거 메뉴) 표시
  • 선택 상태에 따른 스타일 변경
+55/-0   
MatchingSameMajorSection.tsx
선택 완료 애니메이션 및 취소 기능 추가                                                                     

app/matching/_components/MatchingSameMajorSection.tsx

  • 선택 완료 시 체크 아이콘 애니메이션 추가
  • 선택 취소 기능 구현
  • 토글 로직을 클릭 기반으로 변경
  • 트리거 요소를 div로 변경
+78/-19 
ScreenMatching.tsx
매칭 화면에 선택 값 전달 로직 추가                                                                         

app/matching/_components/ScreenMatching.tsx

  • MatchingImportantOptionSectionselections prop 전달
  • 선택된 MBTI, 나이, 관심사, 연락빈도 값을 매핑
+6/-0     


✨ 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 qodo-code-review bot added the enhancement New feature or request label Apr 16, 2026
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

이번 풀요청은 매칭 옵션 선택을 위한 드래그 앤 드롭 인터페이스와 관련 UI 컴포넌트들을 추가하고, 매칭 실행을 위한 useMatching 훅을 도입했습니다. 리뷰 결과, 클라이언트 사이드 훅을 사용하는 파일에서 누락된 "use client" 지시어 추가가 필요하며, 버튼 태그를 div로 변경하면서 발생한 키보드 접근성 문제를 해결해야 합니다. 또한, 드래그 중 발생하는 성능 저하를 방지하기 위한 최적화와 프로젝트 스타일 가이드에 따른 Server Actions 전환 및 정적 데이터 추출 등의 개선 사항이 제안되었습니다.

Comment thread app/matching/_components/ImportantOptionDrawer.tsx
Comment thread app/matching/_components/MatchingImportantOptionSection.tsx Outdated
Comment thread app/matching/_components/MatchingSameMajorSection.tsx Outdated
Comment thread app/matching/_components/ImportantOptionDrawer.tsx Outdated
Comment thread app/matching/_components/ImportantOptionDrawer.tsx Outdated
Comment thread hooks/useMatching.ts Outdated
@dasosann
Copy link
Copy Markdown
Contributor Author

@gemini-code-assist review

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

이번 풀 리퀘스트는 매칭 시스템의 사용자 경험을 개선하기 위해 드래그 앤 드롭 방식의 옵션 선택 기능과 타이핑 애니메이션, 선택 피드백 UI를 도입하고, 서버 액션을 통한 실제 API 연동을 구현했습니다. 또한 여러 컴포넌트에서 상수를 외부로 분리하여 렌더링 성능을 최적화했습니다. 코드 리뷰에서는 파일 크기 관리를 위한 컴포넌트 분리, 미사용 임포트 제거, 반복되는 애니메이션 로직의 커스텀 훅 추출, 그리고 직관적인 UX를 위한 아이콘 변경 등을 제안했습니다.

Comment on lines +31 to 57
function TypingText({
text,
speed = 30,
onComplete,
}: {
text: string;
speed?: number;
onComplete?: () => void;
}) {
const [displayedText, setDisplayedText] = React.useState("");

React.useEffect(() => {
setDisplayedText("");
let i = 0;
const timer = setInterval(() => {
setDisplayedText(text.slice(0, i + 1));
i++;
if (i >= text.length) {
clearInterval(timer);
onComplete?.();
}
}, speed);
return () => clearInterval(timer);
}, [text, speed, onComplete]);

return <>{displayedText}</>;
}
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

TypingText 컴포넌트는 범용적으로 재사용될 가능성이 높은 UI 컴포넌트입니다. 현재 파일의 크기가 200줄을 초과하고 있으므로, 관심사 분리와 재사용성 향상을 위해 이 컴포넌트를 별도의 파일(예: components/common/TypingText.tsx)로 분리하여 관리하는 것을 권장합니다.

References
  1. 컴포넌트 파일이 200줄을 초과하면 더 작은 서브 컴포넌트로 분리할 것을 권장합니다. (link)
  2. Pure functions and reusable logic should be extracted into common utility files or separate components to improve reusability and separate concerns.

Comment thread app/matching/_components/MatchingOptionCard.tsx Outdated
Comment on lines +25 to +30
if (selectedOption !== prevSelected) {
setPrevSelected(selectedOption);
if (selectedOption) {
setShowCheck(true);
}
}
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

props 변경에 따라 상태를 동기화하기 위해 렌더링 도중 setPrevSelected를 호출하는 패턴은 React에서 권장됩니다. 특히 UI 애니메이션을 위한 상태는 JSX에서 명시적으로 사용되지 않더라도 필수적인 것으로 간주됩니다. 다만, 이 로직이 여러 섹션에서 반복되고 있으므로 재사용성과 관심사 분리를 위해 커스텀 훅으로 추출하는 것을 고려해 보세요.

References
  1. State variables used for controlling UI animations are considered necessary even if their usage isn't immediately obvious from the JSX structure.
  2. Logic should be extracted into common utilities or hooks to improve reusability and separate concerns.

Comment thread app/matching/_components/MatchingImportantOptionSection.tsx
@dasosann dasosann merged commit 5722af8 into main Apr 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant