Skip to content

Conversation

@PeraSite
Copy link
Member

@PeraSite PeraSite commented Oct 4, 2025

Summary

  • 서버에서 최초 닉네임을 설정해줄 때 'user-XXXX' 9글자 닉네임을 지정해줍니다.
  • UserInfoActivity의 닉네임 입력 칸의 maxLength가 8로 설정되어 있어, 'user-XXX' 8글자로 잘립니다.
  • 그러나 현재 로직에서는 서버에서 받은 9글자 닉네임을 기준으로 마지막 글자에 커서를 두어서 IndexOutOfBoundsException가 발생합니다.
  • 서버쪽에서도 해결해야 할 문제지만, 우선 서버에서 수신한 닉네임을 기준으로 커서를 이동시키게 수정했습니다.

Describe your changes

image

binding.etChNickname.setText(it.nickname) 이전 이후를 로깅해보았는데, maxLength로 인해 user-251까지만 넣어지는 것을 확인했습니다.
이전에는 앱을 키면 무조건 닉네임을 설정해주세요 라는 토스트와 함께 크래시가 발생했습니다.

https://console.firebase.google.com/u/0/project/eat-ssu-2023/crashlytics/app/android:com.eatssu.android/issues/e9b00d61b337c9f23b655b09f8a7a8c6?time=7d&types=crash&sessionEventKey=68E0B91A010500014FC2F75EBC31E3FE_2135689816230416376

Issue

To reviewers

@PeraSite PeraSite self-assigned this Oct 4, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @PeraSite, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 사용자 최초 닉네임 설정 과정에서 발생하는 IndexOutOfBoundsException을 수정합니다. 서버에서 제공하는 기본 닉네임의 길이가 클라이언트의 입력 필드 최대 길이보다 길어 커서 위치 설정 시 오류가 발생하던 문제를, 클라이언트 측에서 커서 위치를 안전하게 제한하도록 변경하여 해결했습니다. 이는 사용자 경험을 개선하고 애플리케이션의 안정성을 높입니다.

Highlights

  • 버그 수정: 최초 닉네임 설정 시 발생하는 IndexOutOfBoundsException 오류를 해결했습니다.
  • 원인 분석: 서버에서 9글자 닉네임('user-XXXX')을 제공하지만, 클라이언트의 닉네임 입력 필드 maxLength가 8로 설정되어 있어, 9글자 닉네임을 기준으로 커서를 이동시키려 할 때 예외가 발생했습니다.
  • 해결 방안: 서버에서 수신한 닉네임의 길이에 관계없이, 커서 위치를 최대 8글자로 제한하도록 수정하여 오류를 방지했습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

이 PR은 최초 닉네임 설정 시 발생하는 IndexOutOfBoundsException을 해결합니다. 서버에서 내려주는 9글자 닉네임이 EditTextmaxLength인 8을 초과하여 발생하는 문제였습니다. coerceAtMost(8)을 사용하여 커서 위치를 제한하는 방식으로 문제를 해결하셨습니다. 올바른 수정이지만, 코드의 유지보수성을 높이기 위한 제안을 리뷰에 남겼습니다.

…nfo/UserInfoActivity.kt

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Copy link
Member

@HI-JIN2 HI-JIN2 left a comment

Choose a reason for hiding this comment

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

빠른 대응 감사합니다 🙇‍♀️
해당 부분 담당하신 @kangyuri1114 님도 확인하시면 좋을 것 같아요!

기본 닉네임이 8자가 넘는다는건 인지하지 못했네요... 이건 규정 자체를 바꾸던, 기본 닉네임을 빠르게 바꾸던 해야할 것 같어요

@PeraSite
Copy link
Member Author

PeraSite commented Oct 5, 2025

확인했습니다. 오늘 진행할 86차 회의록에 닉네임을 어떻게 할 것인지 아젠다 올려놓아서 확실하게 결정하면 될 것 같아요!

@PeraSite PeraSite merged commit e4def19 into develop Oct 5, 2025
1 check passed
@PeraSite PeraSite deleted the fix/name-length branch October 5, 2025 05:47
@kangyuri1114
Copy link
Member

빠른대응 감사합니다! 확인했어요!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

최초 닉네임 설정 표시 시에 크래시

4 participants