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
|
|
@ -14,6 +14,7 @@ import { MetalCard, Led } from '@d3ro/ui/components/ds'
|
|||
import { d3roPalette, d3roFontMono, d3roTypo, d3roRadius } from '@d3ro/ui/theme'
|
||||
import { useI18n } from '@d3ro/i18n'
|
||||
import { formatDuration } from '../../utils/formatters'
|
||||
import { isImeComposingEvent } from '../../utils/keyboard'
|
||||
import type { HistoryEntry, MemoTag, MeetingSummaryResult } from '@d3ro/core/types'
|
||||
|
||||
interface HistoryEntryCardProps {
|
||||
|
|
@ -62,6 +63,7 @@ export function HistoryEntryCard({ entry, onCopy, onDelete, showTags = false, on
|
|||
}, [entry.id])
|
||||
|
||||
const handleTagKeyDown = useCallback((e: React.KeyboardEvent) => {
|
||||
if (isImeComposingEvent(e)) return
|
||||
if (e.key === 'Enter') { e.preventDefault(); handleAddTag() }
|
||||
if (e.key === 'Escape') { setShowTagInput(false); setTagInput('') }
|
||||
}, [handleAddTag])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue