fix: 채팅 메시지 발행 시 명세에 따라 routieSpaceId 필드 추가#1117
Conversation
|
@coderabbitai 리뷰 부탁해 |
|
🧠 Learnings used✅ Actions performedReview triggered.
|
📝 WalkthroughWalkthrough
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@frontend/src/domains/chat/hooks/useChat.ts`:
- Line 91: The ChatSendRequest type is missing the routieSpaceId field while
useChat.ts calls send({ type: 'CHAT', routieSpaceId: routieSpaceUuid, tempId,
content }); — update the ChatSendRequest interface (in the API types) to include
routieSpaceId: string (or the correct UUID type) and any optionality if
applicable, then ensure the send(...) call still conforms to the updated
ChatSendRequest signature (verify in the send function/type usage that
routieSpaceId is accepted).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 4594681c-4865-43de-869a-3cdc6a5401a6
📒 Files selected for processing (1)
frontend/src/domains/chat/hooks/useChat.ts
| } | ||
|
|
||
| const isSent = send({ type: 'CHAT', tempId, content }); | ||
| const isSent = send({ type: 'CHAT', routieSpaceId: routieSpaceUuid, tempId, content }); |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# CHAT 발행 payload와 ChatSendRequest 타입 동기화 여부 점검
rg -n --type ts -C2 "interface ChatSendRequest|routieSpaceId|type:\s*'CHAT'" frontend/src/domains/chat
rg -n --type ts -C2 "send\(\{\s*type:\s*'CHAT'" frontend/src/domains/chatRepository: woowacourse-teams/2025-routie
Length of output: 1537
ChatSendRequest 타입 정의에 routieSpaceId 필드를 추가하세요
Line 91에서 routieSpaceId: routieSpaceUuid를 전송하지만, ChatSendRequest 인터페이스( frontend/src/domains/chat/types/api.types.ts )에는 이 필드가 정의되어 있지 않습니다. 타입 정의와 실제 전송 스키마를 일치시켜야 합니다.
제안 변경
diff --git a/frontend/src/domains/chat/types/api.types.ts b/frontend/src/domains/chat/types/api.types.ts
interface ChatSendRequest {
type: 'CHAT';
+ routieSpaceId: string;
tempId: string;
content: string;
}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@frontend/src/domains/chat/hooks/useChat.ts` at line 91, The ChatSendRequest
type is missing the routieSpaceId field while useChat.ts calls send({ type:
'CHAT', routieSpaceId: routieSpaceUuid, tempId, content }); — update the
ChatSendRequest interface (in the API types) to include routieSpaceId: string
(or the correct UUID type) and any optionality if applicable, then ensure the
send(...) call still conforms to the updated ChatSendRequest signature (verify
in the send function/type usage that routieSpaceId is accepted).
|
@coderabbitai 변경사항 확인 부탁해 |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 2989 🏁 Script executed: Length of output: 839
📋 변경사항 요약파일:
✅ 검토 결과
별도로 지적할 문제점은 없고, 변경사항이 간결하고 명확합니다. 👍 🧠 Learnings used |
As-Is
To-Be
Check List
Test Screenshot
(Optional) Additional Description
Closes #1112
Summary by CodeRabbit
버그 수정