feat: 역점역(점자→한글) 기능 구현 및 점자 입력 키보드 추가 - #1
Merged
Conversation
## Rust 디코더 - `libs/braillify/src/decoder.rs` 신규 작성 - 한국 점자 → 한글 상태 머신 디코더 (`Start / GotCho / GotJung`) - 약자(을·억·언·얼·연·열·영·옥·온·옹·운·울·은·인) 디코딩 - 2바이트 특수 약자(성·정·청·것) 디코딩 - 가나다마바사자카타파하 초성 단독 약자 디코딩 - Unicode TIndex 종성 값 정확히 반영 (ㄹ=8, ㅇ=21 등) - 7개 단위 테스트 전체 통과 - `libs/braillify/src/lib.rs`: `pub fn decode()` 공개 함수 추가 ## WASM 바인딩 - `packages/node/src/lib.rs`: `decodeFromUnicode()` JS 함수 노출 ## 모바일 앱 UI - `apps/mobile/src/lib/translate.ts` - `translateReverse()` 구현 — `decodeFromUnicode` WASM 연결 - `apps/mobile/src/pages/TranslatorPage.tsx` - 정점역 / 역점역 방향 토글 추가 - 역점역 모드에서 `BrailleInput` 컴포넌트로 전환 - `apps/mobile/src/components/BrailleInput.tsx` 신규 작성 - 직접 입력/붙여넣기 텍스트 필드 (점자 유니코드) - 도트 키보드: `EditableBrailleCell` 재사용, 셀 단위 점 토글 - 두 입력 방식 실시간 동기화 (`masksToString` / `parseToCells`) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request introduces reverse translation (Braille to Korean) capabilities, including a new BrailleInput component for the mobile app and a Rust-based Korean braille decoder. Feedback on these changes highlights a critical issue where tense consonants (double consonants) are not correctly decoded, which can be resolved by implementing a double-consonant parsing helper and adding corresponding unit tests. Additionally, the reviewer recommended mapping regular spaces and newlines to braille spaces during pasting to preserve word boundaries, and replacing array indices with stable keys in the React component to avoid rendering bugs.
Nohgh
reviewed
May 31, 2026
PR 리뷰 피드백 반영 (gemini-code-assist Critical). 된소리표 ⠠(32) 뒤의 바이트 패턴이 두 가지임을 확인: - ㅏ 모음: 된소리표 + 약자/공유 바이트 (까=[32,43], 싸=[32,7]) - 기타 모음: 된소리표 + 초성 바이트 + 별도 중성 (꺼=[32,8,14], 쏘=[32,32,37]) try_choseong_with_double() 함수 추가: 43|8 → ㄲ(1) / 10 → ㄸ(4) / 24 → ㅃ(8) 7|32 → ㅆ(10) / 40 → ㅉ(13) Stage::Start, Stage::GotJung 두 곳에서 try_choseong → try_choseong_with_double 교체. 된소리 테스트 8개 추가 (ㅏ 모음 5종 + ㅏ 외 모음 3종 + 단어 2종). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PR 리뷰 피드백 반영 (gemini-code-assist High Priority).
붙여넣기 시 일반 공백(' ')과 줄바꿈('\n')이 무시되어
단어 경계가 사라지는 문제 수정.
→ 두 문자 모두 0(⠀ U+2800 점자 공백)으로 매핑하여 단어 경계 보존.
PR 리뷰 피드백 반영 (gemini-code-assist Medium Priority). 단음절 테스트만으로는 놓칠 수 있는 케이스를 보완: - 껐어요: 된소리 + 종성 + 후속 음절 - 아까: 단어 중간에 된소리 - 기쁘다: ㅃ(된소리ㅂ) 포함 단어
PR 리뷰 피드백 반영 (gemini-code-assist Medium Priority). 배열 인덱스를 key로 쓰면 셀 삭제 시 React가 잘못된 컴포넌트를 재사용하는 버그가 생길 수 있음. counter useRef로 단조 증가 ID를 생성하고 cellIds state에 저장. - 셀 추가/공백/삭제 시 ID 배열도 함께 업데이트 - 텍스트 붙여넣기로 전체 교체 시 모든 셀에 새 ID 발급 - 방향 전환 등 외부 초기화(cells.length===0) 시 useEffect로 동기화
리뷰어(Nohgh) 피드백 반영.
기존: direction(정점역/역점역) + mode(일반/수학) 두 개의 토글
변경: PageMode('general'|'math'|'reverse') 단일 상태로 통합
→ [일반] [수학] [역점역] 한 줄 토글로 3가지 기능이 명확하게 표시됨
- direction/mode 두 상태 제거, pageMode 하나로 대체
- 수학 점역 기능 유지 확인
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rust 디코더
libs/braillify/src/decoder.rs신규 작성Start / GotCho / GotJung)libs/braillify/src/lib.rs:pub fn decode()공개 함수 추가WASM 바인딩
packages/node/src/lib.rs:decodeFromUnicode()JS 함수 노출모바일 앱 UI
apps/mobile/src/lib/translate.tstranslateReverse()구현 —decodeFromUnicodeWASM 연결apps/mobile/src/pages/TranslatorPage.tsxBrailleInput컴포넌트로 전환apps/mobile/src/components/BrailleInput.tsx신규 작성EditableBrailleCell재사용, 셀 단위 점 토글masksToString/parseToCells)테스트 방법
cargo test -p braillify decoder— 7개 단위 테스트 통과 확인⠈⠎⠐⠕붙여넣기 → "거리" 출력 확인미구현 범위
#...) 디코딩