refactor(desktop): IME composition 가드 helper 추출 + 8곳 Enter 핸들러 통합 (빅뱅 Phase 5 Part 5)
Bug 10 fix(MeetingModePage 인라인 가드)를 isImeComposingEvent helper로 추출하고, 한글 위험도 있는 나머지 7개 Enter 핸들러에 일괄 적용. 총 8곳이 이제 동일 helper 경유. 신규: - apps/desktop/src/renderer/utils/keyboard.ts — isImeComposingEvent(e) JSDoc에 Bug 10 원리(Chromium이 IME 조합 중 Enter를 2번 발화) + 권장 사용 패턴 포함 적용 8곳: - pages/MeetingModePage.tsx:164 회의 메모 (기존 인라인 가드 4줄 교체) - pages/KnowledgeBasePage.tsx:84 RAG 쿼리 - pages/VoiceConversationPage.tsx:113 텍스트 채팅 - pages/CommandsPage.tsx:336 키워드 추가 (Enter+Esc) - components/meeting/MeetingChatPanel.tsx:111 미팅 챗 - components/meeting/EditableSegment.tsx:70 전사 세그먼트 편집 (Enter+Esc) - components/meeting/MeetingDetailTabs.tsx:242 미팅 타이틀 (인라인 arrow → 블록) - components/shared/HistoryEntryCard.tsx:64 태그 추가 (Enter+Esc) /simplify 패스 품질 리뷰: - Phase 3.3 CloudSyncService.pushOne 훅 8곳은 이미 fire-and-forget 1줄로 일관. 내부 try-catch가 에러 삼켜 로컬 write 차단 금지 철학 준수 → 수정 없음, 현 상태가 최적. 검증: - desktop tsc --noEmit EXIT=0 - Vite HMR로 dev 프로세스 자동 반영 (재기동 없음) - 한글 Enter 시연은 사용자 실측 대기 (VoiceConversationPage / MeetingDetailTabs 대표 2곳)
This commit is contained in:
parent
c0c6206cbe
commit
3b77be01bc
10 changed files with 86 additions and 4 deletions
|
|
@ -12,6 +12,7 @@ import PlayArrowIcon from '@mui/icons-material/PlayArrow'
|
|||
import LinkIcon from '@mui/icons-material/Link'
|
||||
import { MetalCard, PhosphorText, Led, ScreenPanel } from '@d3ro/ui/components/ds'
|
||||
import { PageHeader, EmptyStateCard } from '../components/shared'
|
||||
import { isImeComposingEvent } from '../utils/keyboard'
|
||||
import { d3roPalette, d3roFontMono, d3roTypo, d3roRadius } from '@d3ro/ui/theme'
|
||||
import { useI18n } from '@d3ro/i18n'
|
||||
import { TemplateSection } from '../components/TemplateSection'
|
||||
|
|
@ -334,6 +335,7 @@ function VoiceKeywordsSection({ instructions }: { instructions: CustomInstructio
|
|||
value={keywordInput}
|
||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => setKeywordInput(e.target.value)}
|
||||
onKeyDown={(e: React.KeyboardEvent) => {
|
||||
if (isImeComposingEvent(e)) return
|
||||
if (e.key === 'Enter') { e.preventDefault(); handleAddKeyword(rule.instructionId, rule.keywords) }
|
||||
if (e.key === 'Escape') { setEditingRule(null); setKeywordInput('') }
|
||||
}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue