Skip to content

Fix/mentoring#49

Merged
koreahghg merged 6 commits intomainfrom
fix/mentoring
Dec 29, 2025
Merged

Fix/mentoring#49
koreahghg merged 6 commits intomainfrom
fix/mentoring

Conversation

@koreahghg
Copy link
Collaborator

💡 배경 및 개요

PR을 하게 된 문제상황, 배경 및 개요에 대해서 작성해주세요!

퍼블리싱의 경우 스크린샷/동영상도 추가해주면 좋아요!

Resolves: #{이슈번호}

📃 작업내용

PR에서 한 작업을 작성해주세요!

🙋‍♂️ 리뷰노트

구현 시에 고민이었던 점들 혹은 특정 부분에 대한 의도가 있었다면 PR 리뷰의 이해를 돕기 위해 서술해주세요!

또한 리뷰어에게 특정 부분에 대한 집중 혹은 코멘트 혹은 질문을 요청하는 경우에 작성하면 좋아요!

e.g. 작업을 끝내야할 시간이 얼마 없어 확장성보다는 동작을 위주로 만들었어요! 감안하고 리뷰해주세요!

✅ PR 체크리스트

템플릿 체크리스트 말고도 추가적으로 필요한 체크리스트는 추가해주세요!

  • 이 작업으로 인해 변경이 필요한 문서가 변경되었나요? (e.g. .env, 노션, README)
  • 이 작업을 하고나서 공유해야할 팀원들에게 공유되었나요? (e.g. "API 개발 완료됐어요", "환경값 추가되었어요")
  • 작업한 코드가 정상적으로 동작하나요?
  • Merge 대상 브랜치가 올바른가요?
  • PR과 관련 없는 작업이 있지는 않나요?

🎸 기타

@vercel
Copy link

vercel bot commented Dec 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
cklob-gami Ready Ready Preview, Comment Dec 29, 2025 1:53pm

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @koreahghg, 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 연결 설정, 실시간 채팅 기능, 그리고 멘토링 페이지의 데이터 로딩 방식에 대한 여러 개선 사항을 포함합니다. 특히, 개발 환경에서의 API 엔드포인트 유연성을 높이고, WebSocket 연결의 안정성을 강화하며, 사용자 경험을 위한 채팅 메시지 유효성 검사를 추가하고, 멘토링 목록 조회 로직을 최적화하여 사용자 맞춤형 정보를 제공하려는 목적을 가집니다.

Highlights

  • API 기본 URL 설정 개선: 개발 환경에서 VITE_API_BASE 환경 변수를 통해 API 기본 URL을 재정의할 수 있도록 하여 유연성을 높였습니다.
  • WebSocket 연결 로직 개선: useStomp 훅에서 WebSocket(SockJS) 연결 URL 생성 로직을 강화했습니다. baseURL이 비어있을 경우 window.location.origin을 사용하고, ws/wss 프로토콜을 http/https로 변환하며, reconnectDelay를 2초로 설정하여 재연결 시도를 완화했습니다.
  • 채팅 메시지 길이 제한 추가: ChatPage에서 전송되는 메시지의 최대 길이를 250자로 제한하는 유효성 검사를 추가했습니다.
  • 멘토링 페이지 데이터 로딩 최적화: MentoringPage에서 멘토 목록을 불러올 때, 현재 멤버의 generation 정보를 먼저 가져와 이를 멘토 목록 조회 파라미터로 활용하도록 변경했습니다. 멤버 정보 조회 실패 시에도 멘토 목록을 가져올 수 있도록 예외 처리를 추가했습니다.
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.

Copy link
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은 멘토링 기능과 웹소켓 연결 안정성을 개선하는 여러 수정 사항을 포함하고 있습니다. axios.ts에서 baseURL 설정을 환경 변수로 오버라이드할 수 있도록 변경하여 개발 편의성을 높였고, useStomp.ts에서는 웹소켓 URL 생성 로직과 Stomp 클라이언트 연동 방식을 개선하여 연결 안정성을 크게 향상시켰습니다. 또한 ChatPage.tsx에 메시지 길이 제한을 추가하고, MentoringPage.tsx에서는 사용자 기수에 맞는 멘토 목록을 불러오도록 데이터 페칭 로직을 변경하여 사용자 경험을 개선했습니다. 전반적으로 코드 품질과 안정성을 높이는 좋은 변경이며, 코드 가독성 및 유지보수성 향상을 위한 몇 가지 제안을 드립니다.

Comment on lines +409 to +413
if (message.length > 250) {
toast.error(
`메시지는 250자 이하로 작성해주세요. (현재 ${message.length}자)`
);
return;
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

메시지 최대 길이를 나타내는 숫자 250이 코드에 직접 사용되었습니다 (매직 넘버). 이 값을 상수로 정의하면 코드의 가독성과 유지보수성을 높일 수 있습니다. 예를 들어, 나중에 최대 길이를 변경해야 할 때 한 곳만 수정하면 됩니다. 이 상수는 handleSendMessage 함수 외부(예: 파일 최상단)에 선언하는 것이 더 좋습니다.

Suggested change
if (message.length > 250) {
toast.error(
`메시지는 250자 이하로 작성해주세요. (현재 ${message.length}자)`
);
return;
const MAX_MESSAGE_LENGTH = 250;
if (message.length > MAX_MESSAGE_LENGTH) {
toast.error(
`메시지는 ${MAX_MESSAGE_LENGTH}자 이하로 작성해주세요. (현재 ${message.length}자)`
);
return;
}

setCurrentMemberId(null);
}

const mentorParams: any = { page: 0, size: 100 };
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

mentorParamsany 타입을 사용하고 있습니다. 이는 타입 안정성을 저해할 수 있습니다. API 파라미터에 대한 명확한 타입을 명시하면 실수를 방지하고 코드의 명확성을 높일 수 있습니다. 파일 상단에 별도의 interface를 정의하여 사용하는 것을 더 권장합니다.

Suggested change
const mentorParams: any = { page: 0, size: 100 };
const mentorParams: { page: number; size: number; generation?: number } = { page: 0, size: 100 };

@koreahghg koreahghg merged commit dab199e into main Dec 29, 2025
3 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.

2 participants