Skip to content

fix: 한손 모아키 ㅣ/ㅡ 위로 스와이프 입력 수정 및 관련 버그 수정#8

Merged
verlane merged 4 commits into
mainfrom
fix/2-one-hand-moaki-i-eu-up-swipe-input
May 15, 2026
Merged

fix: 한손 모아키 ㅣ/ㅡ 위로 스와이프 입력 수정 및 관련 버그 수정#8
verlane merged 4 commits into
mainfrom
fix/2-one-hand-moaki-i-eu-up-swipe-input

Conversation

@verlane

@verlane verlane commented May 12, 2026

Copy link
Copy Markdown
Owner

Summary

한손 모아키에서 모음키(ㅣ/ㅡ)를 위로 스와이프할 때 이중 아래아(ᆢ)가 입력되던 버그를 수정하고, 가로 모드 두벌식 단모음 입력 방식 설정 및 추천단어 바 UI 개선을 함께 포함합니다.

Closes #2

Changes

Bug Fixes

  • 모아키 모음키 위로 스와이프 시 이중 아래아(ᆢ) 대신 단일 아래아(ㆍ)가 입력되도록 수정 (CrossKeyTouchListener)
  • 추천단어 바 텍스트 색상을 테마 기반으로 적용
  • 추천단어 바에서 자동치환 단어의 trailing space로 인한 마진 불균일 수정

Features

  • 가로 모드에서 두벌식 단모음 입력 방식 선택 지원 (LandscapeKoLayout, SettingsPreferences)

Files Changed

파일 변경 유형
CrossKeyTouchListener.kt Modified — 위로 스와이프 모음 로직 수정
CrossKeyTouchListenerTest.kt Added — 관련 단위 테스트 추가
LandscapeKoLayout.kt Added — 가로 모드 두벌식 단모음 레이아웃
SettingsPreferences.kt Modified — 가로 모드 입력 방식 설정 추가
SettingsFragment.kt Modified — 설정 UI 연동
SuggestionBarView.kt Modified — 텍스트 색상·마진 수정
OpenMoaView.kt Modified — 가로 모드 레이아웃 연동
OpenMoaIME.kt Modified — 관련 처리 업데이트
strings.xml Modified — 설정 문자열 추가
preferences_main.xml Modified — 설정 항목 추가
app/build.gradle Modified — 버전 업데이트

Testing

  • CrossKeyTouchListenerTest 단위 테스트 추가 및 통과 확인
  • 실기기(Android)에서 한손 모아키 스와이프 동작 수동 검증
  • 가로 모드 두벌식 단모음 입력 방식 전환 동작 확인

Related Issues

Closes #2

Summary by CodeRabbit

Release Notes

  • New Features

    • Korean landscape layout settings now offer granular customization options for different input preferences.
    • Suggestion bar appearance improved with intelligent color matching to keyboard skin theme.
  • Bug Fixes

    • Corrected character mapping in keyboard functionality.

Review Change Stack

verlane added 4 commits May 12, 2026 17:01
- OpenMoaView: moeumKey 위쪽 제스처(keyList[0]) 값을 ᆢ → ㆍ로 수정
- CrossKeyTouchListener: resolveKeyFromGesture 순수 함수 분리, require(size==4) 가드 추가
- CrossKeyTouchListenerTest: 방향별 구별 가능한 testKeyList 도입 및 경계값 테스트 추가
- dimTextColor() 추가: HSV 명도를 88%로 낮춰 키 텍스트보다 약간 어둡게 표시
- setSuggestions/showSelectionActions에서 색상을 한 번만 계산해 각 뷰에 전달
  (이전: buildWordView/buildActionView 호출마다 SharedPreferences 재조회)
- applyColors() 루프에서 기존 TextView 업데이트 시 dimmed currentTextColor 사용
- applyColors() 자체도 currentTextColor에 dimTextColor 적용값 저장하도록 수정
- LandscapeKoLayout enum 신설 (NONE/QWERTY/QWERTY_SIMPLE)
- 기존 boolean landscape_qwerty 설정을 enum으로 마이그레이션
- resolveKoLayout()에서 단모음 여부 전달하도록 수정
- 설정 화면: SwitchPreference → ListPreference (3-옵션)
- 설정 타이틀: '가로 모드 입력 방식', NONE 라벨: '세로와 동일(기본)'
- '쿼티' 표현 제거
buildWordView에서 word.trim()으로 표시해 자동치환 expansion의
trailing space가 시각적 간격 차이로 보이던 문제 해결.
입력 콜백엔 원본 word(trailing space 포함)를 유지해 자동치환 동작 보존.
@verlane verlane linked an issue May 12, 2026 that may be closed by this pull request
@coderabbitai

coderabbitai Bot commented May 12, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR updates the landscape Korean input layout preference from a boolean to an enum-backed system with backward-compatible migration, refactors gesture direction detection into a reusable helper, fixes the moeum key character, and refactors suggestion bar color rendering to use skin-based styling.

Changes

Landscape Korean Layout Migration

Layer / File(s) Summary
LandscapeKoLayout enum contract
app/src/main/kotlin/dev/bsb/moakeyvim/config/LandscapeKoLayout.kt
Enum defines three layout options (NONE, QWERTY, QWERTY_SIMPLE) with computed isQwerty and isSimple boolean properties, plus a fromString() factory for preference parsing.
SettingsPreferences storage and migration layer
app/src/main/kotlin/dev/bsb/moakeyvim/settings/SettingsPreferences.kt
New KEY_LANDSCAPE_KO_LAYOUT constant and getLandscapeKoLayout(context) getter read the enum preference or migrate the legacy boolean to enum; getLandscapeQwerty(context) is deprecated and now delegates to the enum's isQwerty property.
SettingsFragment and preferences UI wiring
app/src/main/kotlin/dev/bsb/moakeyvim/settings/SettingsFragment.kt, app/src/main/res/xml/preferences_main.xml
New landscape_ko_layout ListPreference wired to enum values in settings; legacy landscape_qwerty is removed from boolean key parsing during JSON import.
OpenMoaIME usage integration
app/src/main/kotlin/dev/bsb/moakeyvim/OpenMoaIME.kt
resolveKoLayout() reads the full enum object and extracts both isQwerty and isSimple flags instead of the deprecated boolean getter.
String resources for landscape layout preference
app/src/main/res/values/strings.xml
Adds settings_landscape_ko_layout_title and settings_landscape_ko_layout_none strings; removes obsolete settings_landscape_qwerty_description.

Gesture Resolution Refactoring and Moeum Key Fix

Layer / File(s) Summary
CrossKeyTouchListener gesture resolution extraction
app/src/main/kotlin/dev/bsb/moakeyvim/view/keytouchlistener/CrossKeyTouchListener.kt
New resolveKeyFromGesture() helper encapsulates angle-based direction detection (using atan2) and threshold validation; resolveKey() now delegates to this shared logic instead of duplicating computation.
Moeum key character fix in moakey mode
app/src/main/kotlin/dev/bsb/moakeyvim/view/keyboardview/OpenMoaView.kt
Changes moakey-mode moeum key character from "ᆢ" to "ㆍ", fixing incorrect character input when swiping the moeum key.
Gesture resolution unit tests
app/src/test/kotlin/dev/bsb/moakeyvim/view/keytouchlistener/CrossKeyTouchListenerTest.kt
New test suite validates resolveKeyFromGesture() behavior: threshold boundary conditions, directional swipe detection (up/right/down/left), center-key selection, and moeum key swipe resolution to "ㆍ" instead of "ᆢ".

Suggestion Bar Color Rendering Refactoring

Layer / File(s) Summary
Skin-based color rendering and dimming
app/src/main/kotlin/dev/bsb/moakeyvim/view/suggestion/SuggestionBarView.kt
setSuggestions() and showSelectionActions() now compute dimmed skin-derived foreground colors passed to word and action views; applyColors() uniformly applies currentTextColor to all TextView and tintList to all ImageButton children; new dimTextColor() helper darkens colors via HSV value scaling.

Version Update

Layer / File(s) Summary
Application version bump
app/build.gradle
versionName updated from 1.0 to 1.0.12.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 A moeum key hops left and right,
Gestures refactored, colors shine bright!
Layout enums bring order and grace,
Migration logic finds its place.
Version bumped, the compat holds true! 🎉

🚥 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 The title accurately summarizes the main change: fixing the moakey ㅣ/ㅡ upward swipe input bug and related fixes, which is the primary objective reflected across the code changes.
Linked Issues check ✅ Passed The pull request comprehensively addresses issue #2 by fixing the CrossKeyTouchListener swipe detection logic, adding proper boundary validation, and changing the upward swipe character from ᆢ to ㆍ with corresponding test coverage.
Out of Scope Changes check ✅ Passed All code changes are directly related to the issue requirements: swipe fix implementation, landscape layout settings refactoring, suggestion bar UI improvements, and version/resource updates are all coherent with the stated objectives.

✏️ 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/2-one-hand-moaki-i-eu-up-swipe-input

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

@verlane verlane linked an issue May 12, 2026 that may be closed by this pull request

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
app/src/main/kotlin/dev/bsb/moakeyvim/settings/SettingsFragment.kt (1)

423-431: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Add KEY_LANDSCAPE_QWERTY to BOOLEAN_KEYS set to prevent ClassCastException during import.

The import logic at lines 423-431 stores untyped keys via optString(), falling through the else block for any key not in BOOLEAN_KEYS or INT_KEYS. Since KEY_LANDSCAPE_QWERTY is in ALLOWED_KEYS but missing from BOOLEAN_KEYS, imported JSON with "landscape_qwerty": true/false gets stored as a String. Later, SettingsPreferences.getBoolean(KEY_LANDSCAPE_QWERTY, false) will throw ClassCastException when attempting to read the String value as a boolean.

Suggested fix
         private val BOOLEAN_KEYS = setOf(
             SettingsPreferences.KEY_KEY_PREVIEW,
             SettingsPreferences.KEY_AUTO_SPACE_PERIOD,
             SettingsPreferences.KEY_AUTO_CAPITALIZE_ENGLISH,
             SettingsPreferences.KEY_HOTSTRING_ENABLED,
             SettingsPreferences.KEY_WORD_SUGGESTION_ENABLED,
             SettingsPreferences.KEY_KOREAN_WORD_SUGGESTION_ENABLED,
             SettingsPreferences.KEY_CLIPBOARD_ENABLED,
             SettingsPreferences.KEY_FLOATING_INDICATOR_ENABLED,
             SettingsPreferences.KEY_OVERLAY_PERMISSION_NOTIFIED,
             SettingsPreferences.KEY_HW_CAPSLOCK_TO_CTRL,
             SettingsPreferences.KEY_HW_TAB_VIM_MODE,
+            SettingsPreferences.KEY_LANDSCAPE_QWERTY,
         )
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/src/main/kotlin/dev/bsb/moakeyvim/settings/SettingsFragment.kt` around
lines 423 - 431, The import code treats keys not in BOOLEAN_KEYS or INT_KEYS as
strings, causing a ClassCastException for KEY_LANDSCAPE_QWERTY; update the
BOOLEAN_KEYS set to include KEY_LANDSCAPE_QWERTY so the when branch uses
settingsObj.optBoolean(key) and stores a Boolean in settingsEdits (ensure you
modify the BOOLEAN_KEYS declaration that contains the set of boolean keys and
not ALLOWED_KEYS or INT_KEYS).
🧹 Nitpick comments (1)
app/src/main/kotlin/dev/bsb/moakeyvim/view/suggestion/SuggestionBarView.kt (1)

125-129: 💤 Low value

Consider extracting the repeated skin-color pattern.

The pattern of fetching the skin, getting the foreground color, and dimming it appears in both setSuggestions() (lines 126-127) and showSelectionActions() (lines 178-179). While this works correctly, extracting it to a helper method could improve maintainability.

♻️ Optional refactor

Add a helper method:

private fun getDimmedForegroundColor(): Int {
    val skin = SettingsPreferences.getKeyboardSkin(context)
    return dimTextColor(SkinApplier.fgColor(context, skin))
}

Then use it in both places:

-        val skin = SettingsPreferences.getKeyboardSkin(context)
-        val wordColor = dimTextColor(SkinApplier.fgColor(context, skin))
+        val wordColor = getDimmedForegroundColor()
         words.forEach { word -> container.addView(buildWordView(word, word in hotstringExpansions, wordColor)) }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/src/main/kotlin/dev/bsb/moakeyvim/view/suggestion/SuggestionBarView.kt`
around lines 125 - 129, Extract the repeated skin/color logic used in
setSuggestions() and showSelectionActions() into a small helper method (e.g.,
getDimmedForegroundColor()) that calls
SettingsPreferences.getKeyboardSkin(context), resolves
SkinApplier.fgColor(context, skin) and returns dimTextColor(...) so both
setSuggestions() and showSelectionActions() call this helper instead of
duplicating the three-step sequence; update calls to use
getDimmedForegroundColor() and keep method visibility private inside
SuggestionBarView.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/src/main/kotlin/dev/bsb/moakeyvim/settings/SettingsFragment.kt`:
- Around line 127-128: The current call to
pref<ListPreference>(SettingsPreferences.KEY_LANDSCAPE_KO_LAYOUT)?.setupEnum(...,
LandscapeKoLayout.NONE) forces a default of NONE and can overwrite legacy
landscape_qwerty before migration; change it to preserve any existing/migrated
value by removing the hard-default (do not pass LandscapeKoLayout.NONE) and
instead pass null or the current stored value retrieved from SettingsPreferences
(or run migration first) so setupEnum uses the existing preference; update the
call site (pref<ListPreference>(SettingsPreferences.KEY_LANDSCAPE_KO_LAYOUT) and
setupEnum) to avoid forcing NONE.

In
`@app/src/test/kotlin/dev/bsb/moakeyvim/view/keytouchlistener/CrossKeyTouchListenerTest.kt`:
- Line 71: The test in CrossKeyTouchListenerTest.kt uses Kotlin's
assert(result.key != "ᆢ") which is ignored without -ea; replace it with a JUnit
assertion such as assertNotEquals("ᆢ", result.key) (or assertTrue(result.key !=
"ᆢ")) to ensure the check always runs; update the assertion call in the test
method (referencing result.key) using the existing JUnit imports.

---

Outside diff comments:
In `@app/src/main/kotlin/dev/bsb/moakeyvim/settings/SettingsFragment.kt`:
- Around line 423-431: The import code treats keys not in BOOLEAN_KEYS or
INT_KEYS as strings, causing a ClassCastException for KEY_LANDSCAPE_QWERTY;
update the BOOLEAN_KEYS set to include KEY_LANDSCAPE_QWERTY so the when branch
uses settingsObj.optBoolean(key) and stores a Boolean in settingsEdits (ensure
you modify the BOOLEAN_KEYS declaration that contains the set of boolean keys
and not ALLOWED_KEYS or INT_KEYS).

---

Nitpick comments:
In `@app/src/main/kotlin/dev/bsb/moakeyvim/view/suggestion/SuggestionBarView.kt`:
- Around line 125-129: Extract the repeated skin/color logic used in
setSuggestions() and showSelectionActions() into a small helper method (e.g.,
getDimmedForegroundColor()) that calls
SettingsPreferences.getKeyboardSkin(context), resolves
SkinApplier.fgColor(context, skin) and returns dimTextColor(...) so both
setSuggestions() and showSelectionActions() call this helper instead of
duplicating the three-step sequence; update calls to use
getDimmedForegroundColor() and keep method visibility private inside
SuggestionBarView.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9954cdb9-1e5a-4003-9f74-cf065cdb5a9c

📥 Commits

Reviewing files that changed from the base of the PR and between 894c29e and 7e19caf.

📒 Files selected for processing (11)
  • app/build.gradle
  • app/src/main/kotlin/dev/bsb/moakeyvim/OpenMoaIME.kt
  • app/src/main/kotlin/dev/bsb/moakeyvim/config/LandscapeKoLayout.kt
  • app/src/main/kotlin/dev/bsb/moakeyvim/settings/SettingsFragment.kt
  • app/src/main/kotlin/dev/bsb/moakeyvim/settings/SettingsPreferences.kt
  • app/src/main/kotlin/dev/bsb/moakeyvim/view/keyboardview/OpenMoaView.kt
  • app/src/main/kotlin/dev/bsb/moakeyvim/view/keytouchlistener/CrossKeyTouchListener.kt
  • app/src/main/kotlin/dev/bsb/moakeyvim/view/suggestion/SuggestionBarView.kt
  • app/src/main/res/values/strings.xml
  • app/src/main/res/xml/preferences_main.xml
  • app/src/test/kotlin/dev/bsb/moakeyvim/view/keytouchlistener/CrossKeyTouchListenerTest.kt

Comment on lines +127 to +128
pref<ListPreference>(SettingsPreferences.KEY_LANDSCAPE_KO_LAYOUT)
?.setupEnum(LandscapeKoLayout.values(), { it.labelResId }, LandscapeKoLayout.NONE)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Preserve migrated legacy value instead of hard-defaulting to NONE.

Line 127~128 currently initializes landscape_ko_layout to LandscapeKoLayout.NONE when unset, which can overwrite users’ legacy landscape_qwerty=true before migration logic is applied.

Suggested fix
-        pref<ListPreference>(SettingsPreferences.KEY_LANDSCAPE_KO_LAYOUT)
-            ?.setupEnum(LandscapeKoLayout.values(), { it.labelResId }, LandscapeKoLayout.NONE)
+        pref<ListPreference>(SettingsPreferences.KEY_LANDSCAPE_KO_LAYOUT)
+            ?.setupEnum(
+                LandscapeKoLayout.values(),
+                { it.labelResId },
+                SettingsPreferences.getLandscapeKoLayout(requireContext())
+            )
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
pref<ListPreference>(SettingsPreferences.KEY_LANDSCAPE_KO_LAYOUT)
?.setupEnum(LandscapeKoLayout.values(), { it.labelResId }, LandscapeKoLayout.NONE)
pref<ListPreference>(SettingsPreferences.KEY_LANDSCAPE_KO_LAYOUT)
?.setupEnum(
LandscapeKoLayout.values(),
{ it.labelResId },
SettingsPreferences.getLandscapeKoLayout(requireContext())
)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/src/main/kotlin/dev/bsb/moakeyvim/settings/SettingsFragment.kt` around
lines 127 - 128, The current call to
pref<ListPreference>(SettingsPreferences.KEY_LANDSCAPE_KO_LAYOUT)?.setupEnum(...,
LandscapeKoLayout.NONE) forces a default of NONE and can overwrite legacy
landscape_qwerty before migration; change it to preserve any existing/migrated
value by removing the hard-default (do not pass LandscapeKoLayout.NONE) and
instead pass null or the current stored value retrieved from SettingsPreferences
(or run migration first) so setupEnum uses the existing preference; update the
call site (pref<ListPreference>(SettingsPreferences.KEY_LANDSCAPE_KO_LAYOUT) and
setupEnum) to avoid forcing NONE.

fun `모아키 모음키 위로 스와이프는 아래아 단일 반환 - 이중 아래아 아님`() {
val result = resolveKeyFromGesture(0f, 100f, 0f, 0f, threshold, moeumKeyList())
assertEquals("ㆍ", result.key)
assert(result.key != "ᆢ") { "위로 스와이프에 아래아 이중(ᆢ)이 반환되면 안 됨" }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify whether JVM assertions are enabled for tests and find Kotlin assert usage in test sources.
rg -n --iglob '*gradle*' 'jvmArgs|enableAssertions|-ea'
rg -n --iglob '*Test.kt' '\bassert\s*\('

Repository: verlane/moakey-vim

Length of output: 866


🏁 Script executed:

#!/bin/bash
# Find all gradle configuration files
find . -name "build.gradle*" -o -name "settings.gradle*" | head -20

# Check for gradle wrapper properties that might affect JVM args
cat gradle/wrapper/gradle-wrapper.properties 2>/dev/null || echo "No gradle wrapper properties found"

# Search more broadly for test task configuration and JVM argument settings
rg -U 'test\s*\{|jvmArgs|java\s*\{' --type kotlin --type gradle -A 5 | head -50

Repository: verlane/moakey-vim

Length of output: 365


🏁 Script executed:

#!/bin/bash
# Check the main build.gradle and app/build.gradle for test configuration
echo "=== ./build.gradle ==="
cat ./build.gradle

echo -e "\n=== ./app/build.gradle ==="
cat ./app/build.gradle

# Also check if JUnit is in dependencies
echo -e "\n=== Checking for JUnit in dependencies ==="
rg 'junit|jUnit' build.gradle app/build.gradle

Repository: verlane/moakey-vim

Length of output: 2009


🏁 Script executed:

#!/bin/bash
# Check the test file to understand context and verify assert usage
cat -n app/src/test/kotlin/dev/bsb/moakeyvim/view/keytouchlistener/CrossKeyTouchListenerTest.kt | sed -n '65,80p'

# Check what JUnit imports are used in the test
head -30 app/src/test/kotlin/dev/bsb/moakeyvim/view/keytouchlistener/CrossKeyTouchListenerTest.kt

Repository: verlane/moakey-vim

Length of output: 1169


Replace Kotlin assert with JUnit assertion.

Line 71 uses Kotlin's assert(...) which does not execute unless JVM is started with -ea flag. The gradle configuration has no such flag enabled, so this check will silently pass without validation. Use JUnit's assertTrue(result.key != "ᆢ") or assertNotEquals("ᆢ", result.key) instead, which are already imported in the file.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@app/src/test/kotlin/dev/bsb/moakeyvim/view/keytouchlistener/CrossKeyTouchListenerTest.kt`
at line 71, The test in CrossKeyTouchListenerTest.kt uses Kotlin's
assert(result.key != "ᆢ") which is ignored without -ea; replace it with a JUnit
assertion such as assertNotEquals("ᆢ", result.key) (or assertTrue(result.key !=
"ᆢ")) to ensure the check always runs; update the assertion call in the test
method (referencing result.key) using the existing JUnit imports.

@verlane verlane merged commit e793661 into main May 15, 2026
2 checks passed
@verlane verlane deleted the fix/2-one-hand-moaki-i-eu-up-swipe-input branch May 15, 2026 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant