Conversation
개요이 풀 리퀘스트는 루틴 작성 화면과 제보 화면에 글자수 제한 기능을 추가하고, 제보 제출 시 로딩 UI의 최소 대기시간을 조정합니다. UI에는 실시간 글자 수 표시 기능이 추가되었습니다. 변경 사항
예상 코드 리뷰 소요 시간🎯 2 (Simple) | ⏱️ ~12분 토끼의 노래
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. 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. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
presentation/src/main/java/com/threegap/bitnagil/presentation/report/ReportScreen.kt (1)
264-281:⚠️ Potential issue | 🟠 Major제목 필드에서
singleLine제거 후keyboardOptions누락으로 Done 동작 미작동 가능성
singleLine = true가 제거되면서 TextField가 멀티라인이 되었는데,keyboardOptions에imeAction = ImeAction.Done이 명시되어 있지 않습니다. 이 경우 키보드에 Done 버튼 대신 Enter(줄바꿈) 버튼이 표시되어, Line 268-271의KeyboardActions(onDone = { ... })콜백이 호출되지 않을 수 있습니다.상세 제보 내용 필드(Line 308-309)에는
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Done)이 설정되어 있으므로, 제목 필드에도 동일하게 추가해야 합니다.🐛 수정 제안
BitnagilTextField( value = uiState.reportTitle, onValueChange = onReportTitleChange, + keyboardOptions = KeyboardOptions( + imeAction = ImeAction.Done, + ), keyboardActions = KeyboardActions( onDone = { focusManager.clearFocus() onShowReportCategoryBottomSheet() }, ),🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@presentation/src/main/java/com/threegap/bitnagil/presentation/report/ReportScreen.kt` around lines 264 - 281, The title field BitnagilTextField is now multiline but missing keyboardOptions so the ImeAction.Done won't appear and KeyboardActions.onDone may not fire; update the BitnagilTextField invocation (the one using value = uiState.reportTitle and onValueChange = onReportTitleChange) to include keyboardOptions = KeyboardOptions(imeAction = ImeAction.Done) so the keyboard shows a Done button that triggers the existing KeyboardActions (which calls focusManager.clearFocus() and onShowReportCategoryBottomSheet()).
🧹 Nitpick comments (2)
presentation/src/main/java/com/threegap/bitnagil/presentation/report/ReportViewModel.kt (1)
37-49:updateReportTitle/updateReportContent에도 동일한 truncation 권장
WriteRoutineViewModel.setRoutineName과 동일한 패턴으로, 붙여넣기 시 입력이 무시되는 문제가 있습니다.title.take(MAX_TITLE_LENGTH)/content.take(MAX_CONTENT_LENGTH)로 잘라서 반영하는 것이 일관되고 사용자 친화적입니다.♻️ 제안
fun updateReportTitle(title: String) { intent { - if (title.length > ReportState.MAX_TITLE_LENGTH) return@intent - reduce { state.copy(reportTitle = title) } + reduce { state.copy(reportTitle = title.take(ReportState.MAX_TITLE_LENGTH)) } } } fun updateReportContent(content: String) { intent { - if (content.length > ReportState.MAX_CONTENT_LENGTH) return@intent - reduce { state.copy(reportContent = content) } + reduce { state.copy(reportContent = content.take(ReportState.MAX_CONTENT_LENGTH)) } } }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@presentation/src/main/java/com/threegap/bitnagil/presentation/report/ReportViewModel.kt` around lines 37 - 49, updateReportTitle and updateReportContent currently abandon pasted input if it's too long; change them to truncate instead of returning early by applying title.take(ReportState.MAX_TITLE_LENGTH) and content.take(ReportState.MAX_CONTENT_LENGTH) before calling reduce so the ViewModel always updates state (use state.copy(reportTitle = truncatedTitle) and state.copy(reportContent = truncatedContent) inside the existing intent/reduce blocks).presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/WriteRoutineViewModel.kt (1)
160-167: 입력값 잘림(truncation) 대신 무시(drop) 처리 시 붙여넣기 UX 문제 가능성현재
name.length > MAX_ROUTINE_NAME_LENGTH일 때 입력 전체를 무시합니다. 사용자가 긴 텍스트를 붙여넣기하면 아무 변화가 없어 혼란을 줄 수 있습니다.name.take(MAX_ROUTINE_NAME_LENGTH)로 잘라서 반영하는 방식이 UX 측면에서 더 자연스럽습니다.♻️ 제안
fun setRoutineName(name: String) = intent { - if (name.length > WriteRoutineState.MAX_ROUTINE_NAME_LENGTH) return@intent + val trimmedName = name.take(WriteRoutineState.MAX_ROUTINE_NAME_LENGTH) reduce { state.copy( - routineName = name, + routineName = trimmedName, ) } }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/WriteRoutineViewModel.kt` around lines 160 - 167, The setRoutineName intent currently ignores the entire input when name.length > WriteRoutineState.MAX_ROUTINE_NAME_LENGTH which breaks paste UX; change it to truncate the input instead of returning by using name.take(WriteRoutineState.MAX_ROUTINE_NAME_LENGTH) (or similar) so the reduce call always updates state.routineName with either the full name or the truncated substring; update the logic in setRoutineName to compute the effectiveName and call state.copy(routineName = effectiveName).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In
`@presentation/src/main/java/com/threegap/bitnagil/presentation/report/ReportScreen.kt`:
- Around line 264-281: The title field BitnagilTextField is now multiline but
missing keyboardOptions so the ImeAction.Done won't appear and
KeyboardActions.onDone may not fire; update the BitnagilTextField invocation
(the one using value = uiState.reportTitle and onValueChange =
onReportTitleChange) to include keyboardOptions = KeyboardOptions(imeAction =
ImeAction.Done) so the keyboard shows a Done button that triggers the existing
KeyboardActions (which calls focusManager.clearFocus() and
onShowReportCategoryBottomSheet()).
---
Nitpick comments:
In
`@presentation/src/main/java/com/threegap/bitnagil/presentation/report/ReportViewModel.kt`:
- Around line 37-49: updateReportTitle and updateReportContent currently abandon
pasted input if it's too long; change them to truncate instead of returning
early by applying title.take(ReportState.MAX_TITLE_LENGTH) and
content.take(ReportState.MAX_CONTENT_LENGTH) before calling reduce so the
ViewModel always updates state (use state.copy(reportTitle = truncatedTitle) and
state.copy(reportContent = truncatedContent) inside the existing intent/reduce
blocks).
In
`@presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/WriteRoutineViewModel.kt`:
- Around line 160-167: The setRoutineName intent currently ignores the entire
input when name.length > WriteRoutineState.MAX_ROUTINE_NAME_LENGTH which breaks
paste UX; change it to truncate the input instead of returning by using
name.take(WriteRoutineState.MAX_ROUTINE_NAME_LENGTH) (or similar) so the reduce
call always updates state.routineName with either the full name or the truncated
substring; update the logic in setRoutineName to compute the effectiveName and
call state.copy(routineName = effectiveName).
wjdrjs00
left a comment
There was a problem hiding this comment.
가로가 짧은 기기도 고려를 해야하군요..🤮 고생하셨숩니다~!
[ PR Content ]
Related issue
Screenshot 📸
Work Description
To Reviewers 📢
Summary by CodeRabbit
릴리스 노트
새 기능
버그 수정