Skip to content

fix(chat): prevent IME enter duplicate send#14

Merged
seoJing merged 1 commit into
mainfrom
fix/map-card-deck-jitter
Jun 1, 2026
Merged

fix(chat): prevent IME enter duplicate send#14
seoJing merged 1 commit into
mainfrom
fix/map-card-deck-jitter

Conversation

@seoJing
Copy link
Copy Markdown
Member

@seoJing seoJing commented Jun 1, 2026

Summary by CodeRabbit

릴리스 노트

  • 버그 수정

    • 채팅 입력창에서 IME 입력 중 메시지 전송 오류 해결
    • Enter 키 전송 동작 정확성 개선
  • 테스트

    • 메시지 전송 키보드 동작에 대한 테스트 추가

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

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

Project Deployment Actions Updated (UTC)
frontend Ready Ready Preview, Comment Jun 1, 2026 3:43pm

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 1, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ed3eb73f-a3db-4660-a3dc-b561cb6cb9fb

📥 Commits

Reviewing files that changed from the base of the PR and between 368ff5e and d3af832.

📒 Files selected for processing (2)
  • src/features/chat/ui/ChatDetail.test.tsx
  • src/features/chat/ui/ChatDetail.tsx

📝 Walkthrough

概要

채팅 입력창의 메시지 전송 조건을 판단하는 shouldSubmitChatDraft 헬퍼 함수를 추출하여 정의하고, 키다운 핸들러에서 이를 사용하도록 리팩토링하며, IME 조합 및 레거시 키코드를 포함한 다양한 입력 시나리오를 테스트한다.

변경 사항

채팅 메시지 전송 조건 검증

레이어 / 파일 요약
shouldSubmitChatDraft 함수 정의 및 테스트
src/features/chat/ui/ChatDetail.tsx, src/features/chat/ui/ChatDetail.test.tsx
ChatSubmitKeyEvent 타입과 shouldSubmitChatDraft 함수를 추가하여 Enter 입력(Shift 제외, IME 조합/키코드 229 예외)을 검증하고, 한글 IME/레거시 keyCode/일반 Enter/Shift+Enter 시나리오를 Vitest로 검증한다.
핸들러 통합
src/features/chat/ui/ChatDetail.tsx
handleKeyDown의 인라인 조건식을 shouldSubmitChatDraft(event) 호출로 대체하여 전송 로직을 중앙화한다.

예상 코드 리뷰 노력

🎯 2 (Simple) | ⏱️ ~12 분

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목이 변경사항의 핵심을 명확히 반영하고 있습니다. IME 입력으로 인한 메시지 중복 전송 방지라는 주요 목표가 간결하고 구체적으로 표현되어 있습니다.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/map-card-deck-jitter

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@seoJing seoJing merged commit 493a5bd into main Jun 1, 2026
5 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.

1 participant