Conversation
Walkthrough
Changes
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9081bd0fa4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| Row( | ||
| verticalAlignment = Alignment.CenterVertically, | ||
| horizontalArrangement = Arrangement.End, | ||
| modifier = Modifier | ||
| .padding(18.dp) | ||
| .fillMaxWidth() | ||
| .wrapContentHeight() | ||
| modifier = modifier |
There was a problem hiding this comment.
Restore full-width defaults in shared toggle component
By changing ToggleButtonWithLabel to use a plain modifier default, the component no longer applies its previous fillMaxWidth/padding behavior for existing call sites that don’t pass a modifier (for example, FolderEditScreen). In those screens, Arrangement.End stops working as intended because the row now wraps content and is centered by the parent column, causing an unintended layout regression outside the QA-targeted screen.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@presentation/src/main/java/daily/dayo/presentation/view/Switch.kt`:
- Around line 24-30: The Switch composable's default Modifier is an empty
Modifier which breaks existing callers that rely on the original layout (e.g.,
FolderEditScreen); update the default parameter in the Switch function (the
modifier parameter in Switch) to preserve the previous layout by setting it to
the combination of padding(18.dp), fillMaxWidth() and wrapContentHeight(), or
alternatively keep default empty but update all call sites (like
FolderEditScreen) to pass the original Modifier; change the default in Switch to
the original layout modifiers so callers that don't pass a modifier maintain the
prior appearance.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 9362ebb2-00f7-4d7f-9d86-70fefc6d76de
📒 Files selected for processing (3)
presentation/src/main/java/daily/dayo/presentation/screen/folder/FolderCreateScreen.ktpresentation/src/main/java/daily/dayo/presentation/view/Switch.ktpresentation/src/main/java/daily/dayo/presentation/view/TextField.kt
| onToggleChanged: (Boolean) -> Unit, | ||
| modifier: Modifier = Modifier | ||
| ) { | ||
| Row( | ||
| verticalAlignment = Alignment.CenterVertically, | ||
| horizontalArrangement = Arrangement.End, | ||
| modifier = Modifier | ||
| .padding(18.dp) | ||
| .fillMaxWidth() | ||
| .wrapContentHeight() | ||
| modifier = modifier |
There was a problem hiding this comment.
기존 호출부의 토글 레이아웃이 깨질 수 있습니다.
modifier 기본값이 빈 Modifier가 되면서 FolderEditScreen.kt:158-166처럼 modifier를 넘기지 않는 호출부는 기존의 padding(18.dp), fillMaxWidth(), wrapContentHeight() 동작을 잃습니다. 새 화면만 조정하려면 기본값은 기존 레이아웃을 유지하거나, modifier 없는 호출부를 함께 업데이트해 주세요.
🛠️ 기존 기본 레이아웃을 보존하는 수정안
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
+import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
+import androidx.compose.foundation.layout.wrapContentHeight fun ToggleButtonWithLabel(
label: String,
isToggled: Boolean,
onToggleChanged: (Boolean) -> Unit,
- modifier: Modifier = Modifier
+ modifier: Modifier = Modifier
+ .padding(18.dp)
+ .fillMaxWidth()
+ .wrapContentHeight()
) {📝 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.
| onToggleChanged: (Boolean) -> Unit, | |
| modifier: Modifier = Modifier | |
| ) { | |
| Row( | |
| verticalAlignment = Alignment.CenterVertically, | |
| horizontalArrangement = Arrangement.End, | |
| modifier = Modifier | |
| .padding(18.dp) | |
| .fillMaxWidth() | |
| .wrapContentHeight() | |
| modifier = modifier | |
| onToggleChanged: (Boolean) -> Unit, | |
| modifier: Modifier = Modifier | |
| .padding(18.dp) | |
| .fillMaxWidth() | |
| .wrapContentHeight() | |
| ) { | |
| Row( | |
| verticalAlignment = Alignment.CenterVertically, | |
| horizontalArrangement = Arrangement.End, | |
| modifier = modifier |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@presentation/src/main/java/daily/dayo/presentation/view/Switch.kt` around
lines 24 - 30, The Switch composable's default Modifier is an empty Modifier
which breaks existing callers that rely on the original layout (e.g.,
FolderEditScreen); update the default parameter in the Switch function (the
modifier parameter in Switch) to preserve the previous layout by setting it to
the combination of padding(18.dp), fillMaxWidth() and wrapContentHeight(), or
alternatively keep default empty but update all call sites (like
FolderEditScreen) to pass the original Modifier; change the default in Switch to
the original layout modifiers so callers that don't pass a modifier maintain the
prior appearance.
작업 내용
참고
모듈별 요약 및 위험 평가
1. 기능적 영향 및 사용자 대면 동작 변경
FolderCreateScreen (폴더 생성 화면)
18.dp에서20.dp로 증가시켜 QA 명세와 일치하도록 조정.fillMaxWidth().align(Alignment.End)modifier를 추가하여 토글 버튼이 우측 정렬되고 전체 너비를 차지하도록 변경텍스트필드 라벨 색상 변경
Gray4_C5CAD2(밝은 회색)에서Gray3_9FA5AE(더 어두운 회색)로 변경ToggleButtonWithLabel 컴포넌트 리팩토링
Switch.kt의 ToggleButtonWithLabel이 선택적modifier파라미터를 추가하여 호출자가 레이아웃을 제어 가능하도록 변경padding(18.dp),fillMaxWidth(),wrapContentHeight())는 제거2. 위험 지점
하위호환성 위험 (중간 수준)
FolderEditScreen.kt에서 ToggleButtonWithLabel을 호출할 때 modifier 파라미터를 전달하지 않음Modifier = Modifier를 사용하므로 컴파일은 통과하지만, 레이아웃이 예상과 다를 수 있음색상 일관성 위험 (낮음)
WriteFolderNewScreen 불일치
3. 필수 검증 및 후속 테스트
UI 레이아웃 검증 (필수)
FolderCreateScreen:
FolderEditScreen:
텍스트필드 색상 검증 (필수)
통합 테스트
회귀 테스트