Skip to content

[feat/api/chat/FLOW-35] 메시지 불러오기, 전송중, 전송, 참여 멤버 리슽 다이얼로그, 멘션 추가(각각, everyone) - #69

Merged
xeunnie merged 8 commits into
developfrom
feat/api/chat/FLOW-35
Jul 11, 2025
Merged

[feat/api/chat/FLOW-35] 메시지 불러오기, 전송중, 전송, 참여 멤버 리슽 다이얼로그, 멘션 추가(각각, everyone)#69
xeunnie merged 8 commits into
developfrom
feat/api/chat/FLOW-35

Conversation

@xeunnie

Copy link
Copy Markdown
Member

💡 PR 제목

✅ 요구사항

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

⭐ 시연

✅ 기능1

✅ 리뷰어가 알아야할 사항

✅ 체크리스트

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

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

netlifyBot commented Jul 11, 2025

Copy link
Copy Markdown

Deploy Preview for chatflow-project ready!

NameLink
🔨 Latest commitb1a9774
🔍 Latest deploy loghttps://app.netlify.com/projects/chatflow-project/deploys/68710d09921ccd0008dc07a2
😎 Deploy Previewhttps://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
Copy Markdown

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

@github-actions

Copy link
Copy Markdown

CI Status Report

검사 결과

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

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

CopilotAI left a comment

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.

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
FileDescription
src/view/pages/chat/components/message/ChatMessageItem.tsxAdded mentions prop, parseMentions helper, and revamped status indicator UI
src/view/pages/chat/components/layout/ChatView.tsxUpdated props to include categories, passed empty mentions array (placeholder)
src/view/pages/chat/components/layout/ChatMembersDialog.tsxNew component for displaying and searching channel members
src/view/pages/chat/components/layout/ChatInput.tsxRefactored input to support @-mention dropdown and mapping
src/view/pages/chat/components/layout/ChannelHeader.tsxIntegrated ChatMembersDialog and added channel icon display
src/view/pages/chat/ChatPage.tsxWired up mentions flow end-to-end, improved loading/error states
src/service/feature/chat/type/messages.tsIntroduced new Chat interface
src/service/feature/chat/api/chatAPI.tsAdjusted API return handling, added logging
src/service/feature/common/axios/axiosInstance.tsSwitched 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) => {

CopilotAIJul 11, 2025

Copy link

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
}) => {

CopilotAIJul 11, 2025

Copy link

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 threadsrc/view/pages/chat/components/layout/ChatView.tsx Outdated
Comment threadsrc/view/pages/chat/components/layout/ChatView.tsx Outdated
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

CopilotAIJul 11, 2025

Copy link

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.
Comment threadsrc/view/pages/chat/components/layout/ChatView.tsx Outdated
msg: ChatMessage;
isMine: boolean;
showMeta: boolean;
mentions: string[];

CopilotAIJul 11, 2025

Copy link

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.
Comment threadsrc/service/feature/chat/api/chatAPI.ts Outdated

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

CopilotAIJul 11, 2025

Copy link

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) => {

CopilotAIJul 11, 2025

Copy link

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
constshouldShowDateDivider=(currentMsg: ChatMessage,prevMsg?: ChatMessage)=>{
constshouldShowDateDivider=(currentMsg: Chat,prevMsg?: Chat)=>{

Copilot uses AI. Check for mistakes.
xeunnieand 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
Copy Markdown

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

1 similar comment
@github-actions

Copy link
Copy Markdown

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

xeunnieand 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
Copy Markdown

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

1 similar comment
@github-actions

Copy link
Copy Markdown

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

@github-actions

Copy link
Copy Markdown

CI Status Report

검사 결과

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

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

3 similar comments
@github-actions

Copy link
Copy Markdown

CI Status Report

검사 결과

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

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

@github-actions

Copy link
Copy Markdown

CI Status Report

검사 결과

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

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

@github-actions

Copy link
Copy Markdown

CI Status Report

검사 결과

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

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

@xeunnie
xeunnie merged commit 2a5e88d into developJul 11, 2025
4 of 5 checks passed
Sign up for freeto 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

@xeunnie