feat(ios): Settings UI for main app — diacritics + default language#2
Merged
Conversation
Kotlin-based Android Input Method with: - Ukrainian ЙЦУКЕН + English QWERTY keyboard layouts - Translit mode (KMU 2010): type Latin → get Ukrainian Cyrillic - Language switch button (UK ↔ EN) - Symbols/numbers layout - Custom Canvas-drawn keyboard with haptic feedback - Settings activity with IME enable/switch guidance - Dark theme matching desktop Clavi aesthetics https://claude.ai/code/session_013HBuRCzHgBxWzX1S2hLw8W
…p (v0.2) Clipboard history strip (v0.2): - ClipboardHistory.kt: listens to ClipboardManager, stores up to 20 entries newest-first, deduplicates, seeds from current clipboard on start - ClaviKeyboardView: renders scrollable chip strip above keyboard rows; handles tap (insert), long-press (remove), clear (✕) button - ClaviIME: wires clipboard listener, OnStripListener callbacks, refreshes strip on onStartInputView CLAUDE.md: - Full project spec (from original) + new Mobile section: Android/iOS roadmap, smart diacritics spec, local market packs plan, clipboard history UX rationale, "speed over features" principle, "fix don't rewrite" text improvement guideline https://claude.ai/code/session_013HBuRCzHgBxWzX1S2hLw8W
- ClaviKeyboardView: long press chip (500ms) fires onClipLongPress to remove entry from history - Handler/Runnable pattern; cancelled on ACTION_UP/CANCEL - colors.xml: add strip_bg, strip_chip_bg, strip_chip_text https://claude.ai/code/session_013HBuRCzHgBxWzX1S2hLw8W
iOS (Swift, UIKit): - Custom Keyboard Extension scaffold - UK ЙЦУКЕН + EN QWERTY layouts - Translit mode (KMU 2010) — same engine as Android - Language switch UK ↔ EN - Clipboard history strip - Info.plist with RequestsOpenAccess=true for clipboard Android CI (GitHub Actions): - android.yml: builds debug + release APK on every push - Uploads APK as artifact (downloadable from Actions tab) - Caches Gradle for fast builds https://claude.ai/code/session_013HBuRCzHgBxWzX1S2hLw8W
Android: - DiacriticsEngine: frequency-ordered variants for PT, DE, NO, FR, ES, SV, FI, PL - ClaviKeyboardView: diacritics strip (teal bg) overrides clipboard strip when active - Tapping variant: deletes base letter, inserts diacritic (e.g. 'a' → 'ã') - ClaviIME.setDiacriticsLocale(): enable per-language diacritics - Diacritics clear on backspace, space, translit input iOS (Swift): - DiacriticsEngine.swift: mirrors Android logic exactly, same language tables UX: most-common variant highlighted in teal (leftmost = tap once), base letter shown last in grey as fallback without diacritic. https://claude.ai/code/session_013HBuRCzHgBxWzX1S2hLw8W
Add TextFixEngine with local spell-check: double space, space before punctuation, missing space after sentence, Ukrainian/English typos, repeated characters. Analysis triggers after space key, result shown as green fix strip above keyboard. Tap to apply, tap ✕ to dismiss. Fix settings.gradle.kts dependencyResolutionManagement (Gradle Kotlin DSL). https://claude.ai/code/session_013HBuRCzHgBxWzX1S2hLw8W
Use explicit this.textSize inside apply{} blocks to disambiguate from
outer-scope val textSize variables in drawStrip and drawDiacriticsStrip.
https://claude.ai/code/session_013HBuRCzHgBxWzX1S2hLw8W
Add language dropdown (off / pt / de / no / fr / es / sv / fi / pl) saved to SharedPreferences. ClaviIME reads the preference on keyboard open and activates the smart diacritics strip accordingly. https://claude.ai/code/session_013HBuRCzHgBxWzX1S2hLw8W
Add contributor instructions for all major AI coding tools: - AGENTS.md (OpenAI Codex / general) - .cursor/rules/project.mdc + android.mdc (Cursor) - .windsurfrules (Windsurf) - .github/copilot-instructions.md (GitHub Copilot) - .clinerules (Cline / OpenClaw) All cover: project architecture, hard rules (no Russian, no cloud), Android strip system, translit engine, TextFixEngine contract, build commands, and known gotchas. Also add default language preference (UK/EN toggle) to SettingsActivity, read in ClaviIME.onCreateInputView via SharedPreferences. https://claude.ai/code/session_013HBuRCzHgBxWzX1S2hLw8W
- TextFixEngine.swift: mirror of Kotlin version — double space, space-before-punct, missing-space-after-sent, UK/EN typo dicts, repeated chars. analyze() returns Fix(original, fixed, description). - ClaviKeyboardView: add fix strip (green) + diacritics strip (teal) with same priority as Android: fix > diacritics > clipboard. - KeyboardViewController: wire TextFix (triggers on space), diacritics (triggers on base letter), loadPreferences() reads diacritics_locale + default_language from shared UserDefaults. https://claude.ai/code/session_013HBuRCzHgBxWzX1S2hLw8W
K'iche' (QUC) keyboard — ALMG standard orthography: - Row 1: QWERTY, row 2: with apostrophe key for glottalization - Row 3: ch/tz/xh as single keys + z x b n m - Language cycle: UK → EN → Q' → UK (no translit in QUC mode) - Settings: default language now includes K'iche' option Haptic feedback toggle in Settings → stored in SharedPreferences, read by ClaviKeyboardView.hapticEnabled on keyboard open. TextFixEngine: expanded from 20 to 70+ typos: - Ukrainian: missing apostrophe (пам'ять, комп'ютер, etc.), translit artifacts - English: contractions (don't, can't, I'm...), i-before-e, double-letter confusion, 30+ classic misspellings, mixed Cyrillic/Latin key typos https://claude.ai/code/session_013HBuRCzHgBxWzX1S2hLw8W
SettingsViewController with dark theme (#263238) matching Android: - Section Setup: instructions + button to open iOS Settings - Section Diacritics Language: picker (off/pt/de/no/fr/es/sv/fi/pl) saved to shared UserDefaults (group.com.clavi.keyboard) - Section Default Language: Ukrainian / English toggle https://claude.ai/code/session_013HBuRCzHgBxWzX1S2hLw8W
kunichik
pushed a commit
that referenced
this pull request
Apr 10, 2026
…ps fix - TranslationEngine (Android/iOS): 2-tier translation — ML Kit/Apple Translation (sentence-level, ~30MB on-demand) with bundled TSV word-dictionary fallback (~500 EN↔UK word pairs, zero download) - ClaviKeyboardView: blue translation strip (fix > translation > diacritics > clipboard priority); tap to replace typed text - ClaviIME/KeyboardViewController: trigger translation after space/ enter; password field detection (hides clipboard + disables translit) - SettingsActivity/SettingsViewController: source + target language pickers for translation; saves to shared prefs - TextFixEngine: fixAccidentalCaps() — detects "ПРивіт" → "Привіт" pattern (2 leading caps + lowercase body) - CLAUDE.md: update Hard Rule #2 to allow optional E2E-encrypted sync account (zero-knowledge, local-only by default, no keystrokes) https://claude.ai/code/session_013HBuRCzHgBxWzX1S2hLw8W
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.
No description provided.