Skip to content

Conversation

@xeunnie
Copy link
Member

@xeunnie xeunnie commented Jul 11, 2025

💡 PR 제목

✅ 요구사항

  • 메시지 불러오기, 전송 중, 전송, 참여 멤버 리스트 다이얼로그 추가, 멘션 기능 추가

⭐ 시연

✅ 기능1

✅ 리뷰어가 알아야할 사항

✅ 체크리스트

  • 자신의 코드에 대한 리뷰를 진행했습니다
  • 실행 후 심각한 버그나 경고문이 없음을 확인했습니다
  • 이해하기 어려운 부분에 적절한 주석을 첨부했습니다
  • 요구사항 변경, 레이아웃 변경 등 변경사항을 문서에 반영했습니다

@xeunnie xeunnie added this to the API milestone Jul 11, 2025
@xeunnie xeunnie requested review from Copilot and dbswl701 July 11, 2025 13:02
@xeunnie xeunnie self-assigned this Jul 11, 2025
@xeunnie xeunnie added the API 백엔드 연결 label Jul 11, 2025
@netlify
Copy link

netlify bot commented Jul 11, 2025

Deploy Preview for chatflow-project ready!

Name Link
🔨 Latest commit b1a9774
🔍 Latest deploy log https://app.netlify.com/projects/chatflow-project/deploys/68710d09921ccd0008dc07a2
😎 Deploy Preview https://deploy-preview-69--chatflow-project.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link

🛠 PR 검사를 시작합니다. 잠시만 기다려 주세요!

@github-actions
Copy link

CI Status Report

검사 결과

  • Lint: ❌ failure
  • Format: ❌ failure
  • Build: ✅ success

❌ 일부 검사가 실패했습니다.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds messaging features including fetching message history, displaying send status indicators, a member list dialog, and support for @-mentions.

  • Enhanced ChatMessageItem to parse and highlight mentions and show pending/error status.
  • Added ChatMembersDialog and integrated it via the Users icon in ChannelHeader.
  • Refactored ChatInput to trigger and insert @-mentions, and updated ChatPage to handle mentions in outgoing messages.

Reviewed Changes

Copilot reviewed 19 out of 20 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
src/view/pages/chat/components/message/ChatMessageItem.tsx Added mentions prop, parseMentions helper, and revamped status indicator UI
src/view/pages/chat/components/layout/ChatView.tsx Updated props to include categories, passed empty mentions array (placeholder)
src/view/pages/chat/components/layout/ChatMembersDialog.tsx New component for displaying and searching channel members
src/view/pages/chat/components/layout/ChatInput.tsx Refactored input to support @-mention dropdown and mapping
src/view/pages/chat/components/layout/ChannelHeader.tsx Integrated ChatMembersDialog and added channel icon display
src/view/pages/chat/ChatPage.tsx Wired up mentions flow end-to-end, improved loading/error states
src/service/feature/chat/type/messages.ts Introduced new Chat interface
src/service/feature/chat/api/chatAPI.ts Adjusted API return handling, added logging
src/service/feature/common/axios/axiosInstance.ts Switched base domain to HTTP URL
Comments suppressed due to low confidence (2)

src/service/feature/chat/type/messages.ts:1

  • The Chat interface doesn't include a mentions field. You may want to add mentions?: string[]; to align with the schema and component props.
export interface Chat {

src/view/pages/chat/components/message/ChatMessageItem.tsx:118

  • There appears to be an extra closing tag, which can break the JSX structure. Please remove the redundant closing tag.
    </div>


export const ChatMessageItem = ({ msg, isMine, showMeta }: Props) => {
const parseMentions = (text: string, mentions: string[]) => {
return text.split(/(\@[^\s]+)/g).map((part, index) => {
Copy link

Copilot AI Jul 11, 2025

Choose a reason for hiding this comment

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

[nitpick] The parseMentions function returns a mix of React elements and plain strings without keys for string parts, which can cause key warnings. Consider wrapping string parts in a with a key.

Copilot uses AI. Check for mistakes.
messages: Chat[];
myId: string;
categories: CategoryView
}) => {
Copy link

Copilot AI Jul 11, 2025

Choose a reason for hiding this comment

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

The categories prop is declared in the type but not destructured from the component's parameters, so it will always be undefined. Include categories in the destructuring pattern.

Copilot uses AI. Check for mistakes.
Comment on lines 5 to 10
import {CategoryView} from "@service/feature/channel/types/channel.ts";

export const ChatView = ({messages = [], myId }: {
messages: ChatMessage[];
messages: Chat[];
myId: string;
categories: CategoryView
Copy link

Copilot AI Jul 11, 2025

Choose a reason for hiding this comment

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

The CategoryView import isn't used in this file. Consider removing it or using it in the component.

Copilot uses AI. Check for mistakes.
msg: ChatMessage;
isMine: boolean;
showMeta: boolean;
mentions: string[];
Copy link

Copilot AI Jul 11, 2025

Choose a reason for hiding this comment

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

The mentions prop is defined as an array of usernames, but ChatPage currently populates msg.mentions with IDs. Consider aligning the prop type or passing usernames so parseMentions can match correctly.

Copilot uses AI. Check for mistakes.

const API_CONFIG = {
BASE_DOMAIN: 'https://flowchat.shop:30200',
BASE_DOMAIN: 'http://flowchat.shop:30100',
Copy link

Copilot AI Jul 11, 2025

Choose a reason for hiding this comment

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

Using HTTP for the base API domain may expose data in transit. Consider switching to HTTPS for production endpoints.

Suggested change
BASE_DOMAIN: 'http://flowchat.shop:30100',
BASE_DOMAIN: process.env.API_BASE_URL || 'http://localhost:30100',

Copilot uses AI. Check for mistakes.
const messageList = Array.isArray(messages) ? messages : [];
console.log("messageList", messageList);

const shouldShowDateDivider = (currentMsg: ChatMessage, prevMsg?: ChatMessage) => {
Copy link

Copilot AI Jul 11, 2025

Choose a reason for hiding this comment

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

The shouldShowDateDivider callback refers to ChatMessage but your ChatView is consuming the Chat type. Update the parameter types to use Chat.

Suggested change
const shouldShowDateDivider = (currentMsg: ChatMessage, prevMsg?: ChatMessage) => {
const shouldShowDateDivider = (currentMsg: Chat, prevMsg?: Chat) => {

Copilot uses AI. Check for mistakes.
xeunnie and others added 2 commits July 11, 2025 22:08
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link

🛠 PR 검사를 시작합니다. 잠시만 기다려 주세요!

1 similar comment
@github-actions
Copy link

🛠 PR 검사를 시작합니다. 잠시만 기다려 주세요!

xeunnie and others added 2 commits July 11, 2025 22:09
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link

🛠 PR 검사를 시작합니다. 잠시만 기다려 주세요!

1 similar comment
@github-actions
Copy link

🛠 PR 검사를 시작합니다. 잠시만 기다려 주세요!

@github-actions
Copy link

CI Status Report

검사 결과

  • Lint: ❌ failure
  • Format: ❌ failure
  • Build: ✅ success

❌ 일부 검사가 실패했습니다.

3 similar comments
@github-actions
Copy link

CI Status Report

검사 결과

  • Lint: ❌ failure
  • Format: ❌ failure
  • Build: ✅ success

❌ 일부 검사가 실패했습니다.

@github-actions
Copy link

CI Status Report

검사 결과

  • Lint: ❌ failure
  • Format: ❌ failure
  • Build: ✅ success

❌ 일부 검사가 실패했습니다.

@github-actions
Copy link

CI Status Report

검사 결과

  • Lint: ❌ failure
  • Format: ❌ failure
  • Build: ✅ success

❌ 일부 검사가 실패했습니다.

@xeunnie xeunnie merged commit 2a5e88d into develop Jul 11, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API 백엔드 연결

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants