Skip to content

Conversation

@rbqks529
Copy link
Contributor

@rbqks529 rbqks529 commented Oct 10, 2025

🚀 이슈번호

✏️ 변경사항

  • 키보드 내려가게 수정

📷 스크린샷

✍️ 사용법

🎸 기타

Summary by CodeRabbit

  • New Features
    • 6자리 코드 입력 UX 개선: 클럽 코드 및 이메일 인증 화면에서 마지막(6번째) 숫자 입력 시 키보드를 자동으로 닫아 입력 완료를 명확히 표시합니다. 0~4번째 입력 시 포커스 이동, 백스페이스 시 이전 칸 이동 등 기존 동작은 그대로 유지됩니다. 코드 입력 후 추가 탭 없이 다음 행동(확인·자동 진행 등)을 더 빠르고 편리하게 수행할 수 있습니다.

@rbqks529 rbqks529 self-assigned this Oct 10, 2025
@rbqks529 rbqks529 added OK Merge 완료된 PR REFACTOR 기능을 건드리지 않는 리팩토링 labels Oct 10, 2025
@coderabbitai
Copy link

coderabbitai bot commented Oct 10, 2025

Walkthrough

두 화면의 6자리 코드 입력 처리에 마지막 입력칸(인덱스 5)에서 숫자 입력 시 키보드를 숨기는 분기가 추가되었습니다. 인덱스 0–4에서는 기존대로 다음 칸으로 포커스를 이동하고 키보드를 표시합니다. 백스페이스 및 포커스 이동 로직은 기존과 동일합니다.

Changes

Cohort / File(s) Summary
6자리 코드 입력: 마지막 칸 입력 시 키보드 숨김
composeApp/src/commonMain/kotlin/org/whosin/client/presentation/auth/clubcode/ClubCodeInputScreen.kt, composeApp/src/commonMain/kotlin/org/whosin/client/presentation/auth/login/EmailVerificationScreen.kt
마지막 인덱스(5)에서 숫자 입력 시 hideKeyboard() 분기 추가. 인덱스 0–4는 기존 동작 유지(다음 칸 포커스 및 키보드 표시). 삭제/빈 입력 처리와 포커스 관리 로직은 변경 없음.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor User as 사용자
    participant UI as Code Input UI
    participant Focus as FocusManager
    participant KB as KeyboardController

    User->>UI: 숫자 입력
    alt 인덱스 0–4
        UI->>Focus: 다음 칸으로 이동
        UI->>KB: show()
        Note right of UI: 기존 흐름 유지
    else 인덱스 5 (마지막 칸)
        UI->>KB: hide()
        Note right of UI: 새 분기: 마지막 입력 후 키보드 숨김
    end

    User->>UI: 백스페이스/빈 입력
    UI->>Focus: 이전 칸으로 이동
    Note right of UI: 기존 삭제/포커스 이동 로직 유지
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

UI

Poem

여섯 빛 점들이 칸칸이 춤추네
마지막 한 점 톡— 키보드는 쉬어가네 😌
포커스는 고요히, 흐름은 그대로
살짝 닫은 문틈 사이, 확인의 숨
딱 맞춘 코드, 이제 출발! 🚀

Pre-merge checks and finishing touches

❌ 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%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed 제목 “[refactor]: 키보드 내려가게 수정”은 6자리 입력 마지막 상자 입력 시 키보드를 숨기는 주요 변경 사항을 간결하고 명확하게 요약하고 있어 팀원이 PR 기록을 빠르게 이해할 수 있습니다.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fc6a3bc and 028dbd6.

📒 Files selected for processing (2)
  • composeApp/src/commonMain/kotlin/org/whosin/client/presentation/auth/clubcode/ClubCodeInputScreen.kt (1 hunks)
  • composeApp/src/commonMain/kotlin/org/whosin/client/presentation/auth/login/EmailVerificationScreen.kt (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: ios-build
  • GitHub Check: android-build
🔇 Additional comments (1)
composeApp/src/commonMain/kotlin/org/whosin/client/presentation/auth/login/EmailVerificationScreen.kt (1)

137-139: 키보드 표시 동작 일관성 확인 필요

ClubCodeInputScreen.kt에서는 포커스 이동 시(다음/이전 입력칸)마다 keyboardController?.show()를 여러 곳에서 호출하는 반면, EmailVerificationScreen.kt에서는 초기 포커스 후 한 번만 호출되고 이후 입력칸 간 이동 시 호출되지 않습니다. 의도된 UX 차이인지 확인하고, 동일한 동작을 원한다면 포커스 이동 시에도 keyboardController?.show()를 추가하세요.

Comment on lines +164 to +166
else if (input.isNotEmpty() && index == 5) {
keyboardController?.hide()
}
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

마지막 자리 입력 시 키보드 자동 숨김 로직이 잘 구현되었습니다.

6번째 칸(index 5)에 숫자가 입력되면 키보드를 자동으로 내리는 로직이 정확합니다. 사용자가 모든 코드를 입력했을 때 키보드가 자동으로 사라지므로 UX가 개선됩니다.

코드 중복 제거를 고려해주세요.

이 로직이 EmailVerificationScreen.kt(lines 137-139)에도 동일하게 구현되어 있습니다. 두 화면의 6자리 코드 입력 처리 로직을 공통 컴포저블 또는 유틸리티 함수로 추출하면 유지보수가 더 쉬워집니다.

다음과 같이 공통 로직을 추출할 수 있습니다:

// 공통 파일에 추가
fun handleCodeInput(
    input: String,
    index: Int,
    code: Array<String>,
    focusRequesters: List<FocusRequester>,
    keyboardController: SoftwareKeyboardController?,
    onCodeUpdate: (Array<String>) -> Unit,
    onFocusIndexUpdate: (Int) -> Unit,
    onErrorClear: (() -> Unit)? = null
) {
    if (input.length <= 1 && input.all { it.isDigit() }) {
        val newCode = code.copyOf()
        newCode[index] = input
        onCodeUpdate(newCode)
        onErrorClear?.invoke()

        when {
            input.isNotEmpty() && index < 5 -> {
                onFocusIndexUpdate(index + 1)
                focusRequesters[index + 1].requestFocus()
                keyboardController?.show()
            }
            input.isNotEmpty() && index == 5 -> {
                keyboardController?.hide()
            }
            input.isEmpty() && index > 0 -> {
                onFocusIndexUpdate(index - 1)
                focusRequesters[index - 1].requestFocus()
                keyboardController?.show()
            }
        }
    }
}

그런 다음 두 화면에서 이 함수를 재사용할 수 있습니다.

🤖 Prompt for AI Agents
In
composeApp/src/commonMain/kotlin/org/whosin/client/presentation/auth/clubcode/ClubCodeInputScreen.kt
around lines 164-166 (and similarly in EmailVerificationScreen.kt lines
137-139), the keyboard-hide/focus-change logic is duplicated; extract this
shared behavior into a single utility/composable (e.g., handleCodeInput) placed
in a common package (shared UI utils) that accepts input, index, code array,
focusRequesters, keyboardController, onCodeUpdate, onFocusIndexUpdate, and
optional onErrorClear, implement the same branching (advance focus and show
keyboard, hide keyboard on last digit, move back on delete), then replace the
duplicated blocks in both screens with a call to that new function and update
imports and parameter wiring accordingly.

@rbqks529 rbqks529 merged commit 94efe6a into WhosInRoom:develop Oct 10, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OK Merge 완료된 PR REFACTOR 기능을 건드리지 않는 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant