-
Notifications
You must be signed in to change notification settings - Fork 1
[feat/api/chat/FLOW-35] 메시지 불러오기, 전송중, 전송, 참여 멤버 리슽 다이얼로그, 멘션 추가(각각, everyone) #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for chatflow-project ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
🛠 PR 검사를 시작합니다. 잠시만 기다려 주세요! |
CI Status Report검사 결과
❌ 일부 검사가 실패했습니다. |
There was a problem hiding this 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
ChatMessageItemto parse and highlight mentions and show pending/error status. - Added
ChatMembersDialogand integrated it via theUsersicon inChannelHeader. - Refactored
ChatInputto trigger and insert @-mentions, and updatedChatPageto 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
Chatinterface doesn't include amentionsfield. You may want to addmentions?: 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) => { |
Copilot
AI
Jul 11, 2025
There was a problem hiding this comment.
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.
| messages: Chat[]; | ||
| myId: string; | ||
| categories: CategoryView | ||
| }) => { |
Copilot
AI
Jul 11, 2025
There was a problem hiding this comment.
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.
| import {CategoryView} from "@service/feature/channel/types/channel.ts"; | ||
|
|
||
| export const ChatView = ({messages = [], myId }: { | ||
| messages: ChatMessage[]; | ||
| messages: Chat[]; | ||
| myId: string; | ||
| categories: CategoryView |
Copilot
AI
Jul 11, 2025
There was a problem hiding this comment.
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.
| msg: ChatMessage; | ||
| isMine: boolean; | ||
| showMeta: boolean; | ||
| mentions: string[]; |
Copilot
AI
Jul 11, 2025
There was a problem hiding this comment.
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.
|
|
||
| const API_CONFIG = { | ||
| BASE_DOMAIN: 'https://flowchat.shop:30200', | ||
| BASE_DOMAIN: 'http://flowchat.shop:30100', |
Copilot
AI
Jul 11, 2025
There was a problem hiding this comment.
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.
| BASE_DOMAIN: 'http://flowchat.shop:30100', | |
| BASE_DOMAIN: process.env.API_BASE_URL || 'http://localhost:30100', |
| const messageList = Array.isArray(messages) ? messages : []; | ||
| console.log("messageList", messageList); | ||
|
|
||
| const shouldShowDateDivider = (currentMsg: ChatMessage, prevMsg?: ChatMessage) => { |
Copilot
AI
Jul 11, 2025
There was a problem hiding this comment.
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.
| const shouldShowDateDivider = (currentMsg: ChatMessage, prevMsg?: ChatMessage) => { | |
| const shouldShowDateDivider = (currentMsg: Chat, prevMsg?: Chat) => { |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
🛠 PR 검사를 시작합니다. 잠시만 기다려 주세요! |
1 similar comment
|
🛠 PR 검사를 시작합니다. 잠시만 기다려 주세요! |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
🛠 PR 검사를 시작합니다. 잠시만 기다려 주세요! |
1 similar comment
|
🛠 PR 검사를 시작합니다. 잠시만 기다려 주세요! |
CI Status Report검사 결과
❌ 일부 검사가 실패했습니다. |
3 similar comments
CI Status Report검사 결과
❌ 일부 검사가 실패했습니다. |
CI Status Report검사 결과
❌ 일부 검사가 실패했습니다. |
CI Status Report검사 결과
❌ 일부 검사가 실패했습니다. |
💡 PR 제목
✅ 요구사항
⭐ 시연
✅ 기능1
✅ 리뷰어가 알아야할 사항
✅ 체크리스트