Conversation
|
Caution Review failedThe pull request is closed. """ Walkthrough이 변경 사항은 "내정보" 페이지(마이페이지) 및 관련 기능(프로필 편집, 반응, 저장 등)의 전체 UI와 상태 관리(ViewModel 포함), 공통 UI 컴포넌트, 목업 데이터 클래스, 문자열 리소스, 테마 색상, 의존성 추가, IDE 설정 무시 규칙 등을 포함하여 대규모로 추가 및 개선합니다. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant MyPageScreen
participant ViewModel
participant UIComponent
User->>MyPageScreen: 화면 진입
MyPageScreen->>ViewModel: 저장된 피드/책 목록 요청
ViewModel-->>MyPageScreen: StateFlow로 데이터 제공
MyPageScreen->>UIComponent: 데이터 전달(FeedContent/BookContent 등)
UIComponent-->>User: 피드/책 목록 렌더링
User->>UIComponent: 북마크/좋아요 등 인터랙션
UIComponent->>ViewModel: toggleBookmark/toggleLike 호출
ViewModel-->>UIComponent: 변경된 StateFlow 반영
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (9)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 12
🧹 Nitpick comments (19)
app/src/main/java/com/texthip/thip/ui/common/modal/DialogPopup.kt (1)
48-48: Column 구문이 개선되었습니다.불필요한 파라미터 없이 깔끔하게 정리되었습니다.
app/src/main/java/com/texthip/thip/ui/common/buttons/ToggleSwitchButton.kt (1)
27-27: 주석 처리된 코드를 제거해주세요.더 이상 사용하지 않는 코드는 제거하는 것이 좋습니다.
- //var isChecked by remember { mutableStateOf(true) }app/src/main/java/com/texthip/thip/ui/myPage/mock/FeedItem.kt (1)
1-1: 패키지 위치 검토를 권장합니다.이 데이터 클래스가
mock패키지에 있는 것이 적절한지 검토해보세요. 실제 데이터 모델이라면model또는data패키지에 위치하는 것이 더 적절할 수 있습니다.app/src/main/java/com/texthip/thip/ui/navigator/MainNavHost.kt (1)
18-24: 네비게이션 파라미터 전달이 올바르게 구현되었습니다.MyPageScreen에 필요한 nickname과 badgeText 파라미터가 적절히 전달되고 있습니다. 현재는 테스트용 하드코딩된 값을 사용하고 있는데, 향후 실제 사용자 데이터로 교체가 필요할 것입니다.
app/src/main/java/com/texthip/thip/ui/common/buttons/MenuItemButton.kt (1)
67-67: 오른쪽 아이콘의 유연성 개선 제안현재 오른쪽 아이콘이
R.drawable.ic_chevron으로 하드코딩되어 있습니다. 더 유연한 컴포넌트로 만들기 위해 오른쪽 아이콘도 매개변수로 받는 것을 고려해보세요.fun MenuItemButton( text: String, icon: Painter? = null, contentColor: Color, backgroundColor: Color, hasRightIcon: Boolean = false, + rightIcon: Painter? = null, modifier: Modifier = Modifier, onClick: () -> Unit = {}, ) { // ... if (hasRightIcon) { Icon( - painter = painterResource(R.drawable.ic_chevron), + painter = rightIcon ?: painterResource(R.drawable.ic_chevron), contentDescription = null, tint = contentColor, ) }app/src/main/java/com/texthip/thip/ui/myPage/screen/ReactionsScreen.kt (1)
33-46: 하드코딩된 모킹 데이터 개선 필요반응 목록이 하드코딩되어 있고 반복적인 더미 데이터가 포함되어 있습니다. 실제 ViewModel과 연동할 준비가 될 때까지는 더 의미 있는 테스트 데이터를 사용하는 것을 고려해보세요.
app/src/main/java/com/texthip/thip/ui/myPage/screen/EditProfileScreen.kt (2)
138-138: 변수 명명 규칙 개선
RoleItem변수명이 타입명과 동일하여 혼란을 줄 수 있습니다. Kotlin 컨벤션에 따라 변수명은 소문자로 시작해야 합니다.-roleCards.forEachIndexed { index, RoleItem -> +roleCards.forEachIndexed { index, roleItem -> RoleCard( - genre = RoleItem.genre, - role = RoleItem.role, - imageResId = RoleItem.imageResId, + genre = roleItem.genre, + role = roleItem.role, + imageResId = roleItem.imageResId, genreColor = White, - roleColor = RoleItem.roleColor, + roleColor = roleItem.roleColor, selected = selectedIndex == index, onClick = { selectedIndex = index } )
102-105: BaseInputTextField 개선 계획 확인TODO 주석에서 언급된 텍스트 카운트, 아이콘 설정, 제한 설정 기능들이 중요한 UX 개선사항입니다. 이러한 기능들의 구현 일정을 확인하고 우선순위를 정하는 것을 권장합니다.
이러한 기능들을 구현하는 개선된 텍스트 필드 컴포넌트를 작성하는데 도움이 필요하시면 알려주세요.
app/src/main/java/com/texthip/thip/ui/myPage/component/RoleCard.kt (1)
3-3: 사용하지 않는 import 제거 권장
android.R.attr.contentDescription이 코드에서 사용되지 않으므로 제거하는 것이 좋습니다.app/src/main/java/com/texthip/thip/ui/myPage/component/SavedFeedCard.kt (1)
3-3: 사용하지 않는 import 제거 권장
android.R.attr.contentDescription이 코드에서 사용되지 않으므로 제거해야 합니다.app/src/main/java/com/texthip/thip/ui/myPage/screen/NotificationScreen.kt (1)
60-60: 주석 처리된 코드 제거사용하지 않는 주석 처리된 코드는 제거하는 것이 좋습니다.
-// Spacer(modifier = Modifier.height(37.dp))app/src/main/java/com/texthip/thip/ui/myPage/screen/MyPageScreen.kt (2)
85-85: 메뉴 항목 클릭 핸들러 구현 필요대부분의 메뉴 항목들의
onClick이 비어있습니다. 실제 화면 네비게이션 로직을 구현해야 합니다.네비게이션 로직 구현에 도움이 필요하시면 말씀해 주세요.
Also applies to: 95-95, 119-119, 129-129, 139-139, 149-149
174-174: TODO 주석 해결 필요로그아웃 로직이 TODO로 남아있습니다. 실제 로그아웃 기능을 구현하거나 별도의 이슈로 추적하는 것을 권장합니다.
app/src/main/java/com/texthip/thip/ui/myPage/viewmodel/SavedFeedViewModel.kt (2)
10-87: 목 데이터의 품질 및 일관성 개선 필요하드코딩된 목 데이터에서 다음과 같은 문제점들이 발견됩니다:
- 테스트용으로 보이는 반복적인 텍스트 ("진짜최공" 반복)
- 일부 아이템만
imageUrl을 가지고 있어 일관성 부족- 모든 아이템이 동일한 사용자명("user"), 역할("학생"), 좋아요/댓글 수를 가져 다양성 부족
실제 사용 시나리오를 더 잘 반영하는 현실적인 목 데이터로 개선하는 것을 권장합니다.
FeedItem( id = 1, user_profile_image = R.drawable.character_art, - user_name = "user", + user_name = "김독서", user_role = "학생", - book_title = "라랄ㄹ라라", - auth_name = "야야야", + book_title = "데미안", + auth_name = "헤르만 헤세", time_ago = 15, - content = "진짜최공진짜최공진차최공진짜최공진짜최공진차최공진짜최공진짜최공진차최공진짜최공진짜최공진차최공진짜최공진짜최공진차최공진짜최공진짜최공진차최공진짜최공진짜최공진차최공", + content = "이 책을 읽고 나서 자아 성찰에 대해 많은 생각을 하게 되었습니다. 특히 싱클레어와 데미안의 관계가 인상적이었어요.", like_count = 25, comment_count = 4, is_liked = false, is_saved = true ),
96-100: toggleLike와 toggleBookmark 함수의 중복 코드두 함수가 거의 동일한 패턴을 가지고 있어 DRY 원칙 위반이 우려됩니다.
공통 로직을 추출하여 중복을 제거할 수 있습니다:
+private fun updateFeedItem(id: Int, updateFn: (FeedItem) -> FeedItem) { + _feeds.value = _feeds.value.map { + if (it.id == id) updateFn(it) else it + } +} fun toggleBookmark(id: Int) { - _feeds.value = _feeds.value.map { - if (it.id == id) it.copy(is_saved = !it.is_saved) else it - } + updateFeedItem(id) { it.copy(is_saved = !it.is_saved) } } fun toggleLike(id: Int) { - _feeds.value = _feeds.value.map { - if (it.id == id) it.copy(is_liked = !it.is_liked) else it - } + updateFeedItem(id) { it.copy(is_liked = !it.is_liked) } }app/src/main/java/com/texthip/thip/ui/myPage/screen/SavedScreen.kt (4)
47-47: 하드코딩된 문자열을 string 리소스로 이동 권장탭 제목이 하드코딩되어 있어 다국어 지원에 제약이 있습니다.
-val tabs = listOf("피드", "책") +val tabs = listOf(stringResource(R.string.feed), stringResource(R.string.book))
55-55: 빈 onLeftClick 콜백 처리뒤로가기 버튼의 클릭 처리가 비어있어 사용자 경험에 문제가 있을 수 있습니다.
네비게이션 처리를 위한 콜백 구현이 필요합니까? 구현을 도와드릴 수 있습니다.
64-104: 탭 인디케이터 스타일링 개선 가능현재 탭 구현은 기능적으로는 문제없지만, 코드 구조와 스타일링 측면에서 개선 여지가 있습니다.
탭 인디케이터 구현을 더 간결하게 만들 수 있습니다:
Box(modifier = Modifier.width(160.dp).padding(start = 20.dp)) { TabRow( selectedTabIndex = selectedTabIndex, containerColor = Color.Transparent, contentColor = White, + modifier = Modifier.width(120.dp), indicator = { tabPositions -> - val tabPosition = tabPositions[selectedTabIndex] - Box( modifier = Modifier - .tabIndicatorOffset(tabPosition) + .tabIndicatorOffset(tabPositions[selectedTabIndex]) .width(48.dp) .height(2.dp) .align(Alignment.BottomCenter) .clip(RoundedCornerShape(1.5.dp)) .background(White) ) },
122-123: Null 안전성 개선 필요Optional 필드에 대한 null 체크는 있지만, 더 명확한 처리가 가능합니다.
-val bookImagePainter = feed.imageUrl?.let { painterResource(it) } -val profileImagePainter = feed.user_profile_image?.let { painterResource(it) } +val bookImagePainter = feed.imageUrl?.let { + runCatching { painterResource(it) }.getOrNull() +} +val profileImagePainter = feed.user_profile_image?.let { + runCatching { painterResource(it) }.getOrNull() +}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (5)
app/src/main/res/drawable/character_art.pngis excluded by!**/*.pngapp/src/main/res/drawable/character_humanities.pngis excluded by!**/*.pngapp/src/main/res/drawable/character_literature.pngis excluded by!**/*.pngapp/src/main/res/drawable/character_science.pngis excluded by!**/*.pngapp/src/main/res/drawable/character_sociology.pngis excluded by!**/*.png
📒 Files selected for processing (29)
.gitignore(1 hunks).idea/deploymentTargetSelector.xml(0 hunks)app/build.gradle.kts(1 hunks)app/src/main/java/com/texthip/thip/ui/common/buttons/MenuItemButton.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/common/buttons/ToggleSwitchButton.kt(2 hunks)app/src/main/java/com/texthip/thip/ui/common/cards/CardAlarm.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/common/header/AuthorHeader.kt(4 hunks)app/src/main/java/com/texthip/thip/ui/common/header/ProfileBar.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/common/modal/DialogPopup.kt(2 hunks)app/src/main/java/com/texthip/thip/ui/common/modal/Toast.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/component/RoleCard.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/component/SavedFeedCard.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/mock/BookItem.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/mock/FeedItem.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/mock/ReactionItem.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/mock/RoleItem.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/screen/DeleteAccountCompleteScreen.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/screen/DeleteAccountScreen.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/screen/EditProfileScreen.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/screen/MyPageScreen.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/screen/NotificationScreen.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/screen/ReactionsScreen.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/screen/SavedScreen.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/viewmodel/SavedBookViewModel.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/viewmodel/SavedFeedViewModel.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/navigator/MainNavHost.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/theme/Color.kt(1 hunks)app/src/main/res/values/strings.xml(1 hunks)gradle/libs.versions.toml(2 hunks)
💤 Files with no reviewable changes (1)
- .idea/deploymentTargetSelector.xml
🧰 Additional context used
🧬 Code Graph Analysis (7)
app/src/main/java/com/texthip/thip/ui/navigator/MainNavHost.kt (1)
app/src/main/java/com/texthip/thip/ui/myPage/screen/MyPageScreen.kt (1)
MyPageScreen(34-181)
app/src/main/java/com/texthip/thip/ui/common/modal/DialogPopup.kt (1)
app/src/main/java/com/texthip/thip/ui/common/buttons/ActionMediumButton.kt (1)
ActionMediumButton(30-75)
app/src/main/java/com/texthip/thip/ui/myPage/screen/DeleteAccountCompleteScreen.kt (1)
app/src/main/java/com/texthip/thip/ui/common/topappbar/DefaultTopAppBar.kt (1)
DefaultTopAppBar(19-62)
app/src/main/java/com/texthip/thip/ui/common/header/AuthorHeader.kt (1)
app/src/main/java/com/texthip/thip/ui/common/buttons/OutlinedButton.kt (1)
OutlinedButton(30-72)
app/src/main/java/com/texthip/thip/ui/myPage/screen/EditProfileScreen.kt (3)
app/src/main/java/com/texthip/thip/ui/common/topappbar/InputTopAppBar.kt (1)
InputTopAppBar(23-68)app/src/main/java/com/texthip/thip/ui/common/forms/FormTextFieldDefault.kt (1)
BaseInputTextField(27-73)app/src/main/java/com/texthip/thip/ui/myPage/component/RoleCard.kt (1)
RoleCard(39-102)
app/src/main/java/com/texthip/thip/ui/myPage/screen/NotificationScreen.kt (3)
app/src/main/java/com/texthip/thip/ui/common/modal/Toast.kt (1)
Toast(23-57)app/src/main/java/com/texthip/thip/ui/common/topappbar/InputTopAppBar.kt (1)
InputTopAppBar(23-68)app/src/main/java/com/texthip/thip/ui/common/buttons/ToggleSwitchButton.kt (1)
ToggleSwitchButton(22-47)
app/src/main/java/com/texthip/thip/ui/myPage/screen/DeleteAccountScreen.kt (3)
app/src/main/java/com/texthip/thip/ui/common/topappbar/DefaultTopAppBar.kt (1)
DefaultTopAppBar(19-62)app/src/main/java/com/texthip/thip/ui/common/buttons/CheckboxButton.kt (1)
CheckboxButton(19-38)app/src/main/java/com/texthip/thip/ui/common/modal/DialogPopup.kt (1)
DialogPopup(26-84)
🔇 Additional comments (27)
.gitignore (1)
16-16: IDE 설정 파일 무시 규칙 추가 확인 완료
.idea/deploymentTargetSelector.xml을 무시하도록 추가한 변경 사항이 적절합니다. 기존에 개별.idea/*파일들을 선택적으로 무시하던 패턴과도 일관성을 유지합니다.app/src/main/java/com/texthip/thip/ui/common/header/ProfileBar.kt (1)
46-46: ProfileBar 사용처 검증 완료: 영향 범위는 SavedFeedCard와 프리뷰로 제한됩니다
- ast-grep 결과
• ProfileBar 호출은 ProfileBar.kt 내부 프리뷰(2건)와
• SavedFeedCard 컴포넌트(1건)에만 사용- horizontal padding 제거는 SavedFeedCard 레이아웃 조정을 위한 의도된 변경
- 그 외 다른 화면에서는 ProfileBar를 사용하지 않아 추가적인 레이아웃 이슈 없음
변경사항 승인합니다.
app/src/main/java/com/texthip/thip/ui/myPage/mock/ReactionItem.kt (1)
3-8: 잘 설계된 데이터 클래스입니다.반응 알림에 필요한 핵심 속성들이 명확하게 정의되어 있고, ReactionsScreen에서의 활용도가 높을 것으로 예상됩니다. 속성명도 직관적이어서 코드 가독성이 좋습니다.
app/src/main/java/com/texthip/thip/ui/common/modal/DialogPopup.kt (1)
71-71: onClick 핸들러 연결이 올바르게 구현되었습니다.외부에서 전달받은 onCancel과 onConfirm 콜백이 각각 "아니요"와 "예" 버튼에 연결되어 다이얼로그가 제대로 작동할 것입니다. MyPageScreen에서의 로그아웃 확인 기능과 잘 연동될것으로 보입니다.
Also applies to: 78-78
app/src/main/java/com/texthip/thip/ui/myPage/mock/BookItem.kt (1)
3-10: 책 정보 모델링이 적절하게 구현되었습니다.필수 속성들(id, title, author, publisher)과 선택적 속성(imageUrl), 그리고 상태 관리용 속성(isSaved)이 잘 균형있게 설계되었습니다. SavedBookViewModel에서의 북마크 토글 기능과도 잘 연동될 것으로 보입니다.
app/src/main/java/com/texthip/thip/ui/myPage/mock/RoleItem.kt (1)
5-10: 역할 선택을 위한 데이터 모델이 잘 설계되었습니다.장르, 역할명, 이미지 리소스, 색상 정보가 포함되어 RoleCard 컴포넌트에서 시각적으로 풍부한 역할 선택 UI를 구현할 수 있을 것입니다. Color import도 적절하게 포함되었습니다.
app/src/main/java/com/texthip/thip/ui/common/buttons/ToggleSwitchButton.kt (2)
23-31: 상태 관리 패턴 개선이 잘 되었습니다!컴포넌트를 stateful에서 stateless로 리팩토링한 것은 훌륭한 개선입니다. 이렇게 하면 재사용성과 테스트 가능성이 향상되고, 부모 컴포넌트에서 상태를 제어할 수 있게 됩니다.
52-62: Preview 구현이 올바릅니다.새로운 controlled component 패턴을 올바르게 보여주는 Preview입니다. 상태를 외부에서 관리하고 콜백을 통해 업데이트하는 방식이 잘 구현되었습니다.
app/src/main/java/com/texthip/thip/ui/common/modal/Toast.kt (2)
23-57: Toast 컴포넌트 구현이 우수합니다!테마 시스템을 일관되게 사용하고, 적절한 스타일링과 레이아웃을 가진 잘 구현된 컴포넌트입니다. 메시지와 날짜를 깔끔하게 배치하고, 매개변수 설계도 명확합니다.
59-67: Preview 구현이 적절합니다.실제 사용 케이스를 잘 보여주는 Preview입니다. 하드코딩된 날짜 형식도 Preview용으로는 적절합니다.
gradle/libs.versions.toml (2)
31-32: 의존성 추가가 적절합니다.새로운 UI 컴포넌트들을 지원하기 위한 라이브러리 추가가 올바르게 구성되었습니다.
12-12: Foundation 라이브러리 베타 버전 사용 검토 필요
- 파일: gradle/libs.versions.toml
- 라인: 12
- 현재 설정: foundation = "1.9.0-beta01"
Maven Central 조회 스크립트 실행 시 파싱 오류(parse error)가 발생해 최신 안정 버전을 자동으로 확인하지 못했습니다. 프로덕션 안정성을 위해 직접 최신 안정 버전을 확인하고 베타 대신 적용을 고려해주세요.
app/build.gradle.kts (1)
53-54: 의존성 추가가 올바르게 구성되었습니다.새로운 UI 컴포넌트들과 ViewModel 통합을 지원하기 위한 의존성이 적절히 추가되었습니다. version catalog와도 일관성이 있습니다.
app/src/main/java/com/texthip/thip/ui/common/cards/CardAlarm.kt (1)
27-28: Import 추가가 적절합니다.shadow와 Color import는 UI 개선을 위한 표준적인 Compose 라이브러리 import입니다.
app/src/main/res/values/strings.xml (1)
52-107: 마이페이지 관련 문자열 리소스가 체계적으로 잘 추가되었습니다.프로필 편집, 알림 설정, 회원 탈퇴, 고객센터 등 마이페이지의 모든 기능에 필요한 한국어 문자열이 적절히 정의되어 있습니다.
app/src/main/java/com/texthip/thip/ui/myPage/viewmodel/SavedBookViewModel.kt (1)
86-90: 북마크 토글 기능이 올바르게 구현되었습니다.불변성을 유지하면서 상태를 업데이트하는 적절한 패턴을 사용하고 있습니다.
app/src/main/java/com/texthip/thip/ui/common/header/AuthorHeader.kt (1)
40-40: 매개변수 변경에 대한 명확한 의도 확인 필요
onSubscribeClick: () -> Unit매개변수가buttonText: String으로 변경되었는데, 이로 인해 버튼의 클릭 기능이 완전히 제거되었습니다. 이것이 의도된 변경인지 확인이 필요합니다.app/src/main/java/com/texthip/thip/ui/common/buttons/MenuItemButton.kt (1)
28-74: 전반적으로 잘 구현된 재사용 가능한 컴포넌트
MenuItemButton컴포넌트는 적절한 매개변수 구조와 Compose 모범 사례를 따르고 있습니다. 레이아웃과 스타일링이 일관성 있게 적용되었습니다.app/src/main/java/com/texthip/thip/ui/myPage/screen/DeleteAccountCompleteScreen.kt (2)
36-41: 뒤로 가기 버튼 동작 확인 필요
DefaultTopAppBar의onLeftClick이 빈 람다로 설정되어 있어 사용자가 이 화면에서 뒤로 갈 수 없습니다. 계정 삭제 완료 화면의 특성상 의도된 것일 수 있지만, 사용자 경험을 고려하여 확인이 필요합니다.
69-97: 캐릭터 이미지 레이아웃 구현 양호네 개의 캐릭터 이미지가
SpaceBetween배치로 균등하게 배치되어 시각적으로 균형잡힌 레이아웃을 만들고 있습니다. 일관된 크기(80.dp)와 적절한 spacing이 적용되었습니다.app/src/main/java/com/texthip/thip/ui/myPage/screen/EditProfileScreen.kt (1)
133-149: 역할 선택 로직 잘 구현됨
FlowRow를 사용한 역할 카드 레이아웃과 단일 선택 로직이 잘 구현되었습니다.selectedIndex상태 관리와rememberSaveable을 통한 상태 보존도 적절합니다.app/src/main/java/com/texthip/thip/ui/myPage/component/RoleCard.kt (1)
39-102: 잘 구현된 역할 카드 컴포넌트선택 상태에 따른 시각적 피드백, 그라데이션 배경 처리, 클릭 핸들링이 모두 적절히 구현되어 있습니다.
app/src/main/java/com/texthip/thip/ui/myPage/component/SavedFeedCard.kt (1)
50-127: 기능적으로 잘 구현된 피드 카드 컴포넌트조건부 이미지 렌더링, 좋아요/북마크 상태 관리, 클릭 핸들링이 모두 적절히 구현되어 있습니다.
app/src/main/java/com/texthip/thip/ui/myPage/screen/DeleteAccountScreen.kt (1)
33-161: 잘 구현된 계정 삭제 화면체크박스 동의 후 버튼 활성화, 확인 다이얼로그 표시, 적절한 상태 관리 등 사용자 경험을 잘 고려한 구현입니다. 색상 변경과 클릭 비활성화 로직도 올바르게 처리되어 있습니다.
app/src/main/java/com/texthip/thip/ui/myPage/screen/NotificationScreen.kt (1)
32-113: 토글 기능과 토스트 메시지가 잘 구현됨토글 상태 관리, LaunchedEffect를 사용한 자동 사라짐, 토스트 메시지 표시 로직이 모두 적절하게 구현되어 있습니다.
app/src/main/java/com/texthip/thip/ui/myPage/screen/MyPageScreen.kt (1)
35-181: 잘 구조화된 마이페이지 화면Scaffold를 사용한 레이아웃, 섹션별 구분, 일관된 컴포넌트 사용, 적절한 스페이싱 등이 모두 우수하게 구현되어 있습니다. 로그아웃 다이얼로그 처리도 적절합니다.
app/src/main/java/com/texthip/thip/ui/myPage/screen/SavedScreen.kt (1)
117-142: FeedContent 구현이 잘 되어 있음StateFlow를 적절히 관찰하고 있으며, key를 사용한 LazyColumn 최적화도 잘 적용되어 있습니다.
| private fun loadMockBooks() { | ||
| bookList = listOf( | ||
| BookItem( | ||
| id = 1, | ||
| title = "이기적 유전자", | ||
| author = "리처드 도킨스", | ||
| publisher = "을유문화사", | ||
| imageUrl = null, | ||
| isSaved = true | ||
| ), | ||
| BookItem( | ||
| id = 2, | ||
| title = "이기적 유전자", | ||
| author = "리처드 도킨스", | ||
| publisher = "을유문화사", | ||
| imageUrl = null, | ||
| isSaved = true | ||
| ), | ||
| BookItem( | ||
| id = 3, | ||
| title = "이기적 유전자", | ||
| author = "리처드 도킨스", | ||
| publisher = "을유문화사", | ||
| imageUrl = null, | ||
| isSaved = true | ||
| ), | ||
| BookItem( | ||
| id = 4, | ||
| title = "이기적 유전자", | ||
| author = "리처드 도킨스", | ||
| publisher = "을유문화사", | ||
| imageUrl = null, | ||
| isSaved = true | ||
| ), | ||
| BookItem( | ||
| id = 5, | ||
| title = "이기적 유전자", | ||
| author = "리처드 도킨스", | ||
| publisher = "을유문화사", | ||
| imageUrl = null, | ||
| isSaved = true | ||
| ), | ||
| BookItem( | ||
| id = 6, | ||
| title = "이기적 유전자", | ||
| author = "리처드 도킨스", | ||
| publisher = "을유문화사", | ||
| imageUrl = null, | ||
| isSaved = true | ||
| ), | ||
| BookItem( | ||
| id = 7, | ||
| title = "이기적 유전자", | ||
| author = "리처드 도킨스", | ||
| publisher = "을유문화사", | ||
| imageUrl = null, | ||
| isSaved = true | ||
| ), | ||
| BookItem( | ||
| id = 8, | ||
| title = "이기적 유전자", | ||
| author = "리처드 도킨스", | ||
| publisher = "을유문화사", | ||
| imageUrl = null, | ||
| isSaved = true | ||
| ) | ||
| ) | ||
| } |
There was a problem hiding this comment.
🛠️ Refactor suggestion
목 데이터의 다양성을 개선해주세요.
모든 8개의 책이 동일한 제목, 저자, 출판사를 가지고 있어 UI 테스트와 기능 검증이 어렵습니다.
다음과 같이 다양한 책 데이터로 수정하는 것을 권장합니다:
private fun loadMockBooks() {
bookList = listOf(
BookItem(
id = 1,
title = "이기적 유전자",
author = "리처드 도킨스",
publisher = "을유문화사",
imageUrl = null,
isSaved = true
),
BookItem(
id = 2,
- title = "이기적 유전자",
- author = "리처드 도킨스",
- publisher = "을유문화사",
+ title = "사피엔스",
+ author = "유발 하라리",
+ publisher = "김영사",
imageUrl = null,
isSaved = true
),
// ... 나머지 책들도 다양하게 수정
)
}🤖 Prompt for AI Agents
In app/src/main/java/com/texthip/thip/ui/myPage/viewmodel/SavedBookViewModel.kt
between lines 17 and 84, the loadMockBooks function currently creates a list of
8 BookItem objects with identical title, author, and publisher values, which
limits the usefulness of UI testing and feature validation. To fix this, update
the mock data to include diverse book entries with different titles, authors,
and publishers for each BookItem, ensuring better coverage and realism in tests.
| OptionChipButton( | ||
| text = stringResource(R.string.likes), | ||
| isFilled = true, | ||
| onClick = { | ||
| } | ||
| ) | ||
| Spacer(modifier = Modifier.width(12.dp)) | ||
| OptionChipButton( | ||
| text = stringResource(R.string.comments), | ||
| isFilled = true, | ||
| onClick = { | ||
| } | ||
| ) |
There was a problem hiding this comment.
🛠️ Refactor suggestion
옵션 칩 버튼의 클릭 핸들러 미구현
OptionChipButton들의 onClick 핸들러가 비어있어 사용자가 버튼을 클릭해도 아무 반응이 없습니다. 필터링 기능을 구현할 때까지는 버튼을 비활성화하거나 임시 피드백을 제공하는 것을 고려해보세요.
OptionChipButton(
text = stringResource(R.string.likes),
- isFilled = true,
+ isFilled = isLikesSelected,
onClick = {
+ isLikesSelected = !isLikesSelected
+ // TODO: 필터링 로직 구현
}
)📝 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.
| OptionChipButton( | |
| text = stringResource(R.string.likes), | |
| isFilled = true, | |
| onClick = { | |
| } | |
| ) | |
| Spacer(modifier = Modifier.width(12.dp)) | |
| OptionChipButton( | |
| text = stringResource(R.string.comments), | |
| isFilled = true, | |
| onClick = { | |
| } | |
| ) | |
| OptionChipButton( | |
| text = stringResource(R.string.likes), | |
| isFilled = isLikesSelected, | |
| onClick = { | |
| isLikesSelected = !isLikesSelected | |
| // TODO: 필터링 로직 구현 | |
| } | |
| ) | |
| Spacer(modifier = Modifier.width(12.dp)) | |
| OptionChipButton( | |
| text = stringResource(R.string.comments), | |
| isFilled = true, | |
| onClick = { | |
| } | |
| ) |
🤖 Prompt for AI Agents
In app/src/main/java/com/texthip/thip/ui/myPage/screen/ReactionsScreen.kt
between lines 65 and 77, the onClick handlers for the OptionChipButton
components are empty, so clicking the buttons has no effect. To fix this, either
disable the buttons until filtering functionality is implemented or add
temporary feedback such as a toast message or log statement in the onClick
handlers to indicate the button was pressed.
| message = stringResource( | ||
| if (message == "push_on") R.string.push_on else R.string.push_off | ||
| ), | ||
| date = "2025년 6월 29일 22시 30분", |
There was a problem hiding this comment.
🛠️ Refactor suggestion
하드코딩된 날짜 문자열 개선 필요
날짜가 하드코딩되어 있습니다. 실제 현재 시간을 사용하거나 현지화된 문자열 리소스를 사용하는 것이 좋습니다.
- date = "2025년 6월 29일 22시 30분",
+ date = SimpleDateFormat("yyyy년 MM월 dd일 HH시 mm분", Locale.getDefault()).format(Date()),또는 문자열 리소스를 사용하여 현지화를 지원할 수 있습니다.
🤖 Prompt for AI Agents
In app/src/main/java/com/texthip/thip/ui/myPage/screen/NotificationScreen.kt at
line 57, the date string is hardcoded. Replace this hardcoded date with a
dynamically generated date using the current system time formatted
appropriately, or use a localized string resource to support
internationalization and proper date formatting.
| fun toggleBookmark(id: Int) { | ||
| _feeds.value = _feeds.value.map { | ||
| if (it.id == id) it.copy(is_saved = !it.is_saved) else it | ||
| } | ||
| } |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
상태 업데이트 로직 검증 필요
현재 구현은 정상적으로 작동하지만, 대용량 리스트나 빈번한 업데이트 시 성능 문제가 발생할 수 있습니다. 또한 아이템을 찾지 못하는 경우에 대한 처리가 없습니다.
다음 스크립트로 ID가 존재하지 않는 경우의 처리를 확인해보세요:
🏁 Script executed:
#!/bin/bash
# ID 존재 여부 검증을 위한 패턴 검색
ast-grep --pattern 'fun toggleBookmark(id: Int) {
$$$
}'Length of output: 1174
toggleBookmark 메서드 성능 최적화 및 ID 미존재 예외 처리 필요
현재 toggleBookmark(id: Int) 구현은 매 호출마다 전체 리스트를 map 변환하므로 대용량 데이터나 빈번한 업데이트 시 성능 저하가 발생할 수 있고, 전달된 id가 리스트에 없을 경우 아무 동작도 하지 않아 에러 추적이 어렵습니다.
검토 대상 위치:
- app/src/main/java/com/texthip/thip/ui/myPage/viewmodel/SavedFeedViewModel.kt (90–94행)
- app/src/main/java/com/texthip/thip/ui/myPage/viewmodel/SavedBookViewModel.kt (86–90행)
제안:
indexOfFirst또는firstOrNull으로 대상 아이템 인덱스를 찾아 일치하는 항목만 복사해 대체하도록 변경- 아이템 미발견 시 로그 기록 또는 사용자에게 예외 알림 처리 추가
- RecyclerView 연동 시
ListAdapter와DiffUtil활용해 변경분만 반영
예시 수정안:
- fun toggleBookmark(id: Int) {
- _feeds.value = _feeds.value.map {
- if (it.id == id) it.copy(is_saved = !it.is_saved) else it
- }
- }
+ fun toggleBookmark(id: Int) {
+ val current = _feeds.value
+ val idx = current.indexOfFirst { it.id == id }
+ if (idx == -1) {
+ Log.w(TAG, "toggleBookmark: id=$id 항목을 찾을 수 없습니다.")
+ return
+ }
+ val updated = current.toMutableList().apply {
+ this[idx] = this[idx].copy(is_saved = !this[idx].is_saved)
+ }
+ _feeds.value = updated
+ }📝 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.
| fun toggleBookmark(id: Int) { | |
| _feeds.value = _feeds.value.map { | |
| if (it.id == id) it.copy(is_saved = !it.is_saved) else it | |
| } | |
| } | |
| fun toggleBookmark(id: Int) { | |
| val current = _feeds.value | |
| val idx = current.indexOfFirst { it.id == id } | |
| if (idx == -1) { | |
| Log.w(TAG, "toggleBookmark: id=$id 항목을 찾을 수 없습니다.") | |
| return | |
| } | |
| val updated = current.toMutableList().apply { | |
| this[idx] = this[idx].copy(is_saved = !this[idx].is_saved) | |
| } | |
| _feeds.value = updated | |
| } |
🤖 Prompt for AI Agents
In app/src/main/java/com/texthip/thip/ui/myPage/viewmodel/SavedFeedViewModel.kt
lines 90 to 94, optimize toggleBookmark by locating the target item index using
indexOfFirst or firstOrNull instead of mapping the entire list, then update only
the matched item to improve performance. Add handling for the case when the id
is not found by logging a warning or notifying the user to aid error tracking.
Also, ensure integration with RecyclerView uses ListAdapter and DiffUtil to
apply only the changed item updates efficiently.
app/src/main/java/com/texthip/thip/ui/myPage/screen/SavedScreen.kt
Outdated
Show resolved
Hide resolved
|
리뷰 코멘트로 ChipButton 관련 설명이 있던데 제가 이해를 잘못하고 버튼을 수정한거여서 이전 원본으로 되돌리면 될거 같아요 |
| ) | ||
|
|
||
|
|
||
| FlowRow( |
There was a problem hiding this comment.
flowrow 가 가로방향으로 나열하는데 공간 부족시 자동으로 줄바꿈을 해주더라구용 VerticalGrid로도 구현하려고 해봤는데, 간격 조정이나 정렬 같은 부분에서도 FlowRow 가 더 나은 것 같아서 이렇게 구현했습니다! 특히 마지막 줄이 아이템이 하나라서, 이부분 간격이 좀 어색해서 찾아본 방법이었습니닷
| import com.texthip.thip.ui.theme.White | ||
|
|
||
| @Composable | ||
| fun SavedFeedCard( |
There was a problem hiding this comment.
혹시 이거 dataclass 하나로 해서 파라미터로 받기는 어려울까요? FeedItem 데이터 아이템이 있는거 같기는 한데 서버에서 어떤식으로 데이터를 줄지를 몰라서 어떤게 더 좋을지는 얘기 해보면 좋을듯 합니다
There was a problem hiding this comment.
헉 맞네요 FeedItem을 파라미터로 한방에 받는걸로 수정하겠습니닷
| fun NotificationScreen() { | ||
| var isChecked by rememberSaveable { mutableStateOf(true) } | ||
| var toastMessage by rememberSaveable { mutableStateOf<String?>(null) } | ||
|
|
There was a problem hiding this comment.
2초 동안 토스트 메세시가 뜨고 사라지는 용도가 맞나요?
There was a problem hiding this comment.
넵 2초인지는 피그마 상에서 확인이 안 되어서,, 나중에 여쭤보고 픽스하려고 합니닷
| Box( | ||
| modifier = Modifier | ||
| .fillMaxWidth() | ||
| .zIndex(1f) |
There was a problem hiding this comment.
테스트할때 코드문제가 없는데 자꾸 토스트 메세지가 안보이길래 이유를 찾아보다가,, topBar 가 scaffold에 위치하면서 가장 상위로? 렌더링된다는 사실을 알아냈습니닷,, 그래서 TopBar에 가려져서 안보이더라구요?
zIndex(1f)는 레이어를 맨 위로 띄우기 위해 적용한것입니당
There was a problem hiding this comment.
한 파일안에 여러개 함수는 분리하는게 좋을거 같아요 (한 파일안에 있는게 맞나?)
There was a problem hiding this comment.
ㅋㅎㅋㅋㅋ 넵 한 파일 맞숩니다.. 스크린에서 탭 안에 들어가는 내용 (피드 컨텐트, 책 컨텐트) 이라서 귀차나서 그냥 한 스크린 파일 안에 넣엇는데 분리하겠습니당 🐵
Nico1eKim
left a comment
There was a problem hiding this comment.
수고하셨습니둥둥다링 ~
기본적으로 데이터를 받는 컴포넌트들에서 데이터를 개별적으로 받게끔 한거같은데 그렇게 말고 데이터 통으로 받고 컴포넌트 안에서 하나씩 빼서 쓰는게 유지보수 측면에서 훨씬 좋을거같아용
app/src/main/java/com/texthip/thip/ui/myPage/component/RoleCard.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/texthip/thip/ui/myPage/screen/DeleteAccountScreen.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/texthip/thip/ui/myPage/screen/SavedScreen.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/texthip/thip/ui/myPage/screen/SavedScreen.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/texthip/thip/ui/myPage/screen/SavedScreen.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (6)
app/src/main/java/com/texthip/thip/ui/myPage/component/BookContent.kt (1)
16-28: 효율적인 목록 구현이지만 이미지 처리 개선이 필요합니다.LazyColumn과 key 매개변수를 사용한 효율적인 목록 구현이 훌륭합니다. 하지만 현재 모든 책의 imageRes가 null로 설정되어 있습니다.
CardBookList 컴포넌트에서 기본 이미지를 제공하므로 동작에는 문제없지만, 실제 책 이미지를 표시하면 사용자 경험이 향상될 것입니다.
향후 책 이미지를 지원하도록 개선하는 것을 고려해보세요:
CardBookList( title = book.title, author = book.author, - imageRes = null, + imageRes = book.imageRes ?: R.drawable.bookcover_sample, publisher = book.publisher, isBookmarked = book.isSaved, onBookmarkClick = { viewModel.toggleBookmark(book.id) } )app/src/main/java/com/texthip/thip/ui/myPage/component/FeedContent.kt (2)
12-30: UI 상태 처리 개선 제안현재 구현에는 로딩 상태, 에러 상태, 빈 상태에 대한 처리가 없습니다. 사용자 경험 향상을 위해 이러한 상태들을 고려해보세요.
예시 구현:
@Composable fun FeedContent(viewModel: SavedFeedViewModel = viewModel()) { val feedList by viewModel.feeds.collectAsState() + val isLoading by viewModel.isLoading.collectAsState() + val error by viewModel.error.collectAsState() + when { + isLoading -> { + // 로딩 인디케이터 표시 + } + error != null -> { + // 에러 상태 표시 + } + feedList.isEmpty() -> { + // 빈 상태 표시 + } + else -> { LazyColumn { items(feedList, key = { it.id }) { feed -> // 기존 코드... } } + } + } }
13-13: viewModel 매개변수 기본값 재고기본
viewModel()사용은 테스트나 의존성 주입 측면에서 유연성이 부족할 수 있습니다. Hilt 등의 DI 프레임워크를 사용하거나 상위 컴포저블에서 전달받는 것을 고려해보세요.app/src/main/java/com/texthip/thip/ui/myPage/screen/MyPageScreen.kt (3)
76-94: My Activity 메뉴 아이템들의 onClick 핸들러 구현 필요저장된 항목과 반응 메뉴의 onClick 핸들러가 빈 상태입니다. 해당 화면들로의 네비게이션 로직 구현이 필요합니다.
네비게이션 구현을 도와드릴 수 있습니다. 다음과 같은 형태로 구현하시겠습니까?
onClick = { + navController?.navigate("saved_screen") }
110-160: 메뉴 아이템들의 네비게이션 로직 구현 필요알림 설정, 가이드, 고객센터, 계정 삭제 메뉴들의 onClick 핸들러가 빈 상태입니다. 각각의 해당 화면으로 네비게이션하는 로직이 필요합니다.
로그아웃 메뉴의 시각적 구분(빨간색)과 다이얼로그 연동은 잘 구현되었습니다.
162-176: 로그아웃 다이얼로그 구현 완료, 로그아웃 로직 구현 필요다이얼로그 UI와 상태 관리는 잘 구현되었습니다. onConfirm 핸들러의 TODO 코멘트에 따라 실제 로그아웃 로직 구현이 필요합니다.
로그아웃 로직 구현을 도와드릴 수 있습니다. 일반적으로 다음과 같은 처리가 필요합니다:
- 사용자 세션 정보 삭제
- 로컬 저장소 정리
- 로그인 화면으로 네비게이션
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (14)
app/src/main/java/com/texthip/thip/ui/common/modal/ToastWithDate.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/component/BookContent.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/component/FeedContent.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/component/RoleCard.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/component/SavedFeedCard.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/screen/DeleteAccountCompleteScreen.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/screen/DeleteAccountScreen.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/screen/EditProfileScreen.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/screen/MyPageScreen.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/screen/NotificationScreen.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/screen/ReactionsScreen.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/screen/SavedScreen.kt(1 hunks)app/src/main/res/drawable/ic_heart_filled.xml(1 hunks)app/src/main/res/values/strings.xml(1 hunks)
✅ Files skipped from review due to trivial changes (2)
- app/src/main/res/drawable/ic_heart_filled.xml
- app/src/main/java/com/texthip/thip/ui/common/modal/ToastWithDate.kt
🚧 Files skipped from review as they are similar to previous changes (9)
- app/src/main/java/com/texthip/thip/ui/myPage/screen/ReactionsScreen.kt
- app/src/main/java/com/texthip/thip/ui/myPage/screen/DeleteAccountCompleteScreen.kt
- app/src/main/java/com/texthip/thip/ui/myPage/screen/DeleteAccountScreen.kt
- app/src/main/java/com/texthip/thip/ui/myPage/component/RoleCard.kt
- app/src/main/res/values/strings.xml
- app/src/main/java/com/texthip/thip/ui/myPage/screen/NotificationScreen.kt
- app/src/main/java/com/texthip/thip/ui/myPage/component/SavedFeedCard.kt
- app/src/main/java/com/texthip/thip/ui/myPage/screen/EditProfileScreen.kt
- app/src/main/java/com/texthip/thip/ui/myPage/screen/SavedScreen.kt
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: rbqks529
PR: THIP-TextHip/THIP-Android#30
File: app/src/main/java/com/texthip/thip/ui/myPage/groupPage/GroupPageScreen.kt:34-37
Timestamp: 2025-07-01T07:19:01.216Z
Learning: GroupPageScreen의 MyPageViewModel은 임시 ViewModel로, 현재는 프로토타입 단계이므로 오류 처리 등의 추가 기능은 나중에 구현 예정입니다.
app/src/main/java/com/texthip/thip/ui/myPage/screen/MyPageScreen.kt (1)
Learnt from: rbqks529
PR: THIP-TextHip/THIP-Android#30
File: app/src/main/java/com/texthip/thip/ui/myPage/groupPage/GroupPageScreen.kt:34-37
Timestamp: 2025-07-01T07:19:01.216Z
Learning: GroupPageScreen의 MyPageViewModel은 임시 ViewModel로, 현재는 프로토타입 단계이므로 오류 처리 등의 추가 기능은 나중에 구현 예정입니다.
🧬 Code Graph Analysis (3)
app/src/main/java/com/texthip/thip/ui/myPage/component/FeedContent.kt (1)
app/src/main/java/com/texthip/thip/ui/myPage/component/SavedFeedCard.kt (1)
SavedFeedCard(34-121)
app/src/main/java/com/texthip/thip/ui/myPage/component/BookContent.kt (1)
app/src/main/java/com/texthip/thip/ui/common/cards/CardBookList.kt (1)
CardBookList(37-103)
app/src/main/java/com/texthip/thip/ui/myPage/screen/MyPageScreen.kt (4)
app/src/main/java/com/texthip/thip/ui/common/topappbar/LeftNameTopAppBar.kt (1)
LeftNameTopAppBar(24-71)app/src/main/java/com/texthip/thip/ui/common/header/AuthorHeader.kt (1)
AuthorHeader(34-90)app/src/main/java/com/texthip/thip/ui/common/buttons/MenuItemButton.kt (1)
MenuItemButton(28-74)app/src/main/java/com/texthip/thip/ui/common/modal/DialogPopup.kt (1)
DialogPopup(26-84)
🔇 Additional comments (4)
app/src/main/java/com/texthip/thip/ui/myPage/component/BookContent.kt (2)
1-11: 임포트 구조가 깔끔하고 적절합니다.필요한 Compose 및 ViewModel 관련 라이브러리들이 올바르게 임포트되어 있고, 패키지 구조도 적절합니다.
12-15: 상태 관리가 올바르게 구현되었습니다.SavedBookViewModel을 기본 매개변수로 받고 collectAsState()를 사용하여 반응형 상태 관리를 구현한 것이 좋습니다.
app/src/main/java/com/texthip/thip/ui/myPage/screen/MyPageScreen.kt (2)
33-37: navController 파라미터 사용 확인 필요navController가 옵셔널 파라미터로 선언되어 있지만 현재 함수 내에서 사용되지 않고 있습니다. 메뉴 아이템들의 onClick 핸들러 구현 시 필요할 것으로 보이니, 향후 구현 계획을 확인해주세요.
181-188: 프리뷰 함수 구현 우수디자인 시각화를 위한 프리뷰 함수가 적절히 구현되었습니다. 샘플 데이터와 private 접근 제한자 사용이 좋습니다.
| val bookImagePainter = feed.imageUrl?.let { painterResource(it) } | ||
| val profileImagePainter = feed.userProfileImage?.let { painterResource(it) } |
There was a problem hiding this comment.
painterResource 사용 오류 수정 필요
painterResource는 드로어블 리소스 ID(Int)를 기대하지만, imageUrl과 userProfileImage는 URL 문자열일 가능성이 높습니다. 이는 런타임 크래시를 발생시킬 수 있습니다.
URL 이미지를 로드하려면 Coil 같은 이미지 로딩 라이브러리를 사용해야 합니다.
다음과 같이 수정하세요:
- val bookImagePainter = feed.imageUrl?.let { painterResource(it) }
- val profileImagePainter = feed.userProfileImage?.let { painterResource(it) }
+ val bookImagePainter = feed.imageUrl?.let { rememberAsyncImagePainter(it) }
+ val profileImagePainter = feed.userProfileImage?.let { rememberAsyncImagePainter(it) }그리고 필요한 임포트를 추가하세요:
+import coil.compose.rememberAsyncImagePainter🤖 Prompt for AI Agents
In app/src/main/java/com/texthip/thip/ui/myPage/component/FeedContent.kt around
lines 18 to 19, the code incorrectly uses painterResource to load images from
URL strings, which expects drawable resource IDs and causes runtime crashes.
Replace painterResource with an image loading library like Coil's
rememberImagePainter to load images from URLs properly. Also, add the necessary
Coil imports to support this change.
| AuthorHeader( | ||
| profileImage = null, | ||
| nickname = nickname, | ||
| badgeText = badgeText, | ||
| buttonText = stringResource(R.string.edit) | ||
| ) |
There was a problem hiding this comment.
AuthorHeader의 편집 버튼 클릭 핸들러 누락
AuthorHeader의 편집 버튼에 대한 onButtonClick 핸들러가 설정되지 않았습니다. 프로필 편집 화면으로의 네비게이션이 필요할 것으로 보입니다.
다음과 같이 수정하는 것을 제안합니다:
AuthorHeader(
profileImage = null,
nickname = nickname,
badgeText = badgeText,
- buttonText = stringResource(R.string.edit)
+ buttonText = stringResource(R.string.edit),
+ onButtonClick = {
+ // TODO: 프로필 편집 화면으로 네비게이션
+ }
)📝 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.
| AuthorHeader( | |
| profileImage = null, | |
| nickname = nickname, | |
| badgeText = badgeText, | |
| buttonText = stringResource(R.string.edit) | |
| ) | |
| AuthorHeader( | |
| profileImage = null, | |
| nickname = nickname, | |
| badgeText = badgeText, | |
| buttonText = stringResource(R.string.edit), | |
| onButtonClick = { | |
| // TODO: 프로필 편집 화면으로 네비게이션 | |
| } | |
| ) |
🤖 Prompt for AI Agents
In app/src/main/java/com/texthip/thip/ui/myPage/screen/MyPageScreen.kt around
lines 55 to 60, the AuthorHeader composable is missing the onButtonClick handler
for the edit button. Add an onButtonClick parameter to AuthorHeader that
triggers navigation to the profile edit screen when the edit button is clicked.
There was a problem hiding this comment.
Actionable comments posted: 7
🧹 Nitpick comments (7)
app/src/main/java/com/texthip/thip/ui/myPage/SavedScreen.kt (1)
58-76: 탭 레이아웃의 고정 너비 사용에 대한 검토 필요현재 TabRow와 각 Tab에 고정된 너비 값(160dp, 60dp)을 사용하고 있습니다. 이는 다양한 화면 크기나 언어별 텍스트 길이 차이에 대응하기 어려울 수 있습니다.
더 유연한 레이아웃을 위해 다음과 같이 개선할 수 있습니다:
- Box(modifier = Modifier.width(160.dp).padding(start = 20.dp)) { + Box(modifier = Modifier.padding(start = 20.dp)) { TabRow( selectedTabIndex = selectedTabIndex, containerColor = Color.Transparent, contentColor = colors.White, indicator = { tabPositions -> val tabPosition = tabPositions[selectedTabIndex] Box( modifier = Modifier .tabIndicatorOffset(tabPosition) - .width(48.dp) + .fillMaxWidth() .height(2.dp)app/src/main/java/com/texthip/thip/ui/myPage/DeleteAccountScreen.kt (2)
44-46: 상태 관리 최적화 제안backgroundColor 변수를 매번 계산하는 대신, 더 효율적인 방법을 고려해볼 수 있습니다.
- val backgroundColor = if (isChecked) colors.Purple else colors.Grey02 + val backgroundColor by remember(isChecked) { + derivedStateOf { if (isChecked) colors.Purple else colors.Grey02 } + }
160-164: 회원탈퇴 로직 구현 필요TODO 주석에 표시된 대로 실제 회원탈퇴 로직이 구현되어야 합니다.
회원탈퇴 API 호출 및 네비게이션 로직 구현을 도와드릴까요? 일반적으로 다음과 같은 구조를 고려해야 합니다:
- API 호출 결과 처리
- 성공 시 로그아웃 및 초기 화면으로 이동
- 실패 시 에러 메시지 표시
app/src/main/java/com/texthip/thip/ui/myPage/EditProfileScreen.kt (1)
34-65: 역할 데이터 하드코딩 개선 제안현재 역할 데이터가 Composable 함수 내에 하드코딩되어 있습니다. 이를 별도의 데이터 소스로 분리하는 것이 좋습니다.
+// 별도 파일 또는 companion object로 분리 +private val defaultRoles = listOf( + RoleType.LITERATURE, + RoleType.SCIENCE_IT, + RoleType.SOCIAL_SCIENCE, + RoleType.ART, + RoleType.HUMANITIES +) @Composable fun EditProfileScreen() { var selectedIndex by rememberSaveable { mutableStateOf(-1) } - val roleCards = listOf( - RoleItem( - stringResource(R.string.literature), - stringResource(R.string.literary_person), - R.drawable.character_literature, - colors.NeonGreen - ), - // ... 다른 역할들 - ) + val roleCards = remember { defaultRoles.map { it.toRoleItem() } }app/src/main/java/com/texthip/thip/ui/myPage/ReactionsScreen.kt (2)
46-47: 미사용 상태 변수 제거isLikesSelected와 isCommentsSelected 상태 변수가 선언되어 있지만 사용되지 않고 있습니다.
- var isLikesSelected by remember { mutableStateOf(false) } - var isCommentsSelected by remember { mutableStateOf(false) }또는 필터링 기능을 구현하여 이 변수들을 활용하세요.
64-77: 필터링 기능 구현 필요OptionChipButton의 onClick 이벤트가 비어있어 필터링 기능이 작동하지 않습니다.
필터링 기능 구현을 도와드릴까요? 다음과 같은 구조를 제안합니다:
OptionChipButton( text = stringResource(R.string.likes), isFilled = isLikesSelected, onClick = { isLikesSelected = !isLikesSelected // 필터링 로직 적용 } )app/src/main/java/com/texthip/thip/ui/myPage/MyPageScreen.kt (1)
170-173: 로그아웃 로직 구현 필요TODO 주석이 있는 로그아웃 로직을 구현해야 합니다.
다음과 같은 로그아웃 구현을 제안합니다:
- 사용자 세션/토큰 삭제
- 로컬 데이터 초기화
- 로그인 화면으로 네비게이션
로그아웃 구현을 도와드릴까요? 새로운 이슈를 생성하시겠습니까?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (5)
app/src/main/res/drawable/character_art.pngis excluded by!**/*.pngapp/src/main/res/drawable/character_humanities.pngis excluded by!**/*.pngapp/src/main/res/drawable/character_literature.pngis excluded by!**/*.pngapp/src/main/res/drawable/character_science.pngis excluded by!**/*.pngapp/src/main/res/drawable/character_sociology.pngis excluded by!**/*.png
📒 Files selected for processing (32)
.gitignore(1 hunks).idea/deploymentTargetSelector.xml(1 hunks)app/build.gradle.kts(1 hunks)app/src/main/java/com/texthip/thip/ui/common/buttons/MenuItemButton.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/common/buttons/ToggleSwitchButton.kt(2 hunks)app/src/main/java/com/texthip/thip/ui/common/cards/CardAlarm.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/common/header/AuthorHeader.kt(4 hunks)app/src/main/java/com/texthip/thip/ui/common/header/ProfileBar.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/common/modal/DialogPopup.kt(2 hunks)app/src/main/java/com/texthip/thip/ui/common/modal/ToastWithDate.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/DeleteAccountCompleteScreen.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/DeleteAccountScreen.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/EditProfileScreen.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/MyPageScreen.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/NotificationScreen.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/ReactionsScreen.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/SavedScreen.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/component/BookContent.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/component/FeedContent.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/component/RoleCard.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/component/SavedFeedCard.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/mock/BookItem.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/mock/FeedItem.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/mock/ReactionItem.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/mock/RoleItem.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/viewmodel/SavedBookViewModel.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/myPage/viewmodel/SavedFeedViewModel.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/navigator/MainNavHost.kt(1 hunks)app/src/main/java/com/texthip/thip/ui/theme/Color.kt(3 hunks)app/src/main/res/drawable/ic_heart_filled.xml(1 hunks)app/src/main/res/values/strings.xml(1 hunks)gradle/libs.versions.toml(2 hunks)
✅ Files skipped from review due to trivial changes (4)
- app/src/main/java/com/texthip/thip/ui/common/cards/CardAlarm.kt
- app/src/main/java/com/texthip/thip/ui/myPage/mock/BookItem.kt
- app/src/main/java/com/texthip/thip/ui/myPage/DeleteAccountCompleteScreen.kt
- gradle/libs.versions.toml
🚧 Files skipped from review as they are similar to previous changes (21)
- .gitignore
- app/src/main/java/com/texthip/thip/ui/common/header/ProfileBar.kt
- app/src/main/res/drawable/ic_heart_filled.xml
- app/build.gradle.kts
- app/src/main/java/com/texthip/thip/ui/theme/Color.kt
- app/src/main/java/com/texthip/thip/ui/navigator/MainNavHost.kt
- app/src/main/java/com/texthip/thip/ui/myPage/mock/RoleItem.kt
- app/src/main/java/com/texthip/thip/ui/myPage/component/BookContent.kt
- app/src/main/java/com/texthip/thip/ui/myPage/component/FeedContent.kt
- app/src/main/java/com/texthip/thip/ui/myPage/mock/ReactionItem.kt
- app/src/main/java/com/texthip/thip/ui/common/modal/DialogPopup.kt
- app/src/main/java/com/texthip/thip/ui/common/buttons/ToggleSwitchButton.kt
- app/src/main/java/com/texthip/thip/ui/common/buttons/MenuItemButton.kt
- app/src/main/java/com/texthip/thip/ui/myPage/viewmodel/SavedBookViewModel.kt
- app/src/main/java/com/texthip/thip/ui/common/modal/ToastWithDate.kt
- app/src/main/java/com/texthip/thip/ui/myPage/component/RoleCard.kt
- app/src/main/java/com/texthip/thip/ui/common/header/AuthorHeader.kt
- app/src/main/java/com/texthip/thip/ui/myPage/mock/FeedItem.kt
- app/src/main/java/com/texthip/thip/ui/myPage/component/SavedFeedCard.kt
- app/src/main/java/com/texthip/thip/ui/myPage/viewmodel/SavedFeedViewModel.kt
- app/src/main/res/values/strings.xml
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: rbqks529
PR: THIP-TextHip/THIP-Android#30
File: app/src/main/java/com/texthip/thip/ui/myPage/groupPage/GroupPageScreen.kt:34-37
Timestamp: 2025-07-01T07:19:01.216Z
Learning: GroupPageScreen의 MyPageViewModel은 임시 ViewModel로, 현재는 프로토타입 단계이므로 오류 처리 등의 추가 기능은 나중에 구현 예정입니다.
app/src/main/java/com/texthip/thip/ui/myPage/SavedScreen.kt (1)
Learnt from: rbqks529
PR: THIP-TextHip/THIP-Android#30
File: app/src/main/java/com/texthip/thip/ui/common/cards/CardItemRoomSmall.kt:108-112
Timestamp: 2025-07-01T07:19:10.961Z
Learning: The user rbqks529 prefers to extract hardcoded UI strings to StringResource files (strings.xml) rather than keeping them inline in Compose components, which is a good practice for maintainability and localization in Android development.
app/src/main/java/com/texthip/thip/ui/myPage/EditProfileScreen.kt (1)
Learnt from: rbqks529
PR: THIP-TextHip/THIP-Android#30
File: app/src/main/java/com/texthip/thip/ui/common/cards/CardItemRoomSmall.kt:108-112
Timestamp: 2025-07-01T07:19:10.961Z
Learning: The user rbqks529 prefers to extract hardcoded UI strings to StringResource files (strings.xml) rather than keeping them inline in Compose components, which is a good practice for maintainability and localization in Android development.
app/src/main/java/com/texthip/thip/ui/myPage/DeleteAccountScreen.kt (1)
Learnt from: rbqks529
PR: THIP-TextHip/THIP-Android#30
File: app/src/main/java/com/texthip/thip/ui/common/cards/CardItemRoomSmall.kt:108-112
Timestamp: 2025-07-01T07:19:10.961Z
Learning: The user rbqks529 prefers to extract hardcoded UI strings to StringResource files (strings.xml) rather than keeping them inline in Compose components, which is a good practice for maintainability and localization in Android development.
app/src/main/java/com/texthip/thip/ui/myPage/MyPageScreen.kt (1)
Learnt from: rbqks529
PR: THIP-TextHip/THIP-Android#30
File: app/src/main/java/com/texthip/thip/ui/myPage/groupPage/GroupPageScreen.kt:34-37
Timestamp: 2025-07-01T07:19:01.216Z
Learning: GroupPageScreen의 MyPageViewModel은 임시 ViewModel로, 현재는 프로토타입 단계이므로 오류 처리 등의 추가 기능은 나중에 구현 예정입니다.
🧬 Code Graph Analysis (3)
app/src/main/java/com/texthip/thip/ui/myPage/DeleteAccountScreen.kt (3)
app/src/main/java/com/texthip/thip/ui/common/topappbar/DefaultTopAppBar.kt (1)
DefaultTopAppBar(23-66)app/src/main/java/com/texthip/thip/ui/common/buttons/CheckboxButton.kt (1)
CheckboxButton(19-38)app/src/main/java/com/texthip/thip/ui/common/modal/DialogPopup.kt (1)
DialogPopup(26-84)
app/src/main/java/com/texthip/thip/ui/myPage/NotificationScreen.kt (3)
app/src/main/java/com/texthip/thip/ui/common/modal/ToastWithDate.kt (1)
ToastWithDate(24-58)app/src/main/java/com/texthip/thip/ui/common/topappbar/InputTopAppBar.kt (1)
InputTopAppBar(25-69)app/src/main/java/com/texthip/thip/ui/common/buttons/ToggleSwitchButton.kt (1)
ToggleSwitchButton(22-47)
app/src/main/java/com/texthip/thip/ui/myPage/MyPageScreen.kt (4)
app/src/main/java/com/texthip/thip/ui/common/topappbar/LeftNameTopAppBar.kt (1)
LeftNameTopAppBar(26-73)app/src/main/java/com/texthip/thip/ui/common/header/AuthorHeader.kt (1)
AuthorHeader(34-90)app/src/main/java/com/texthip/thip/ui/common/buttons/MenuItemButton.kt (1)
MenuItemButton(28-74)app/src/main/java/com/texthip/thip/ui/common/modal/DialogPopup.kt (1)
DialogPopup(26-84)
🔇 Additional comments (8)
app/src/main/java/com/texthip/thip/ui/myPage/SavedScreen.kt (1)
98-102: 탭 컨텐츠 전환 로직 확인when 문을 사용한 탭 컨텐츠 전환 로직이 올바르게 구현되어 있습니다. FeedContent와 BookContent 컴포넌트가 적절히 호출되고 있습니다.
app/src/main/java/com/texthip/thip/ui/myPage/DeleteAccountScreen.kt (1)
105-115: 텍스트 스타일링 구현 검토buildAnnotatedString을 사용하여 텍스트 일부를 빨간색으로 강조하는 구현이 적절합니다. 경고 메시지를 효과적으로 표시하고 있습니다.
app/src/main/java/com/texthip/thip/ui/myPage/EditProfileScreen.kt (2)
129-139: 역할 선택 로직 구현 검토역할 카드 선택 로직이 올바르게 구현되어 있습니다. 단일 선택 모드로 작동하며, 선택된 인덱스가 적절히 관리되고 있습니다.
93-96: BaseInputTextField 컴포넌트 구현 위치 및 개선 계획 확인
TODO주석에 따라 BaseInputTextField 컴포넌트에 텍스트 카운트, 아이콘 표시, 입력 제한 기능 추가가 예정되어 있습니다.
현재 코드베이스에서 해당 컴포넌트 구현 파일 및 함수 정의를 찾지 못했으므로, 아래 사항을 수동으로 확인해 주세요:
- BaseInputTextField 컴포넌트가 정의된 .kt 파일 경로
@Composable fun BaseInputTextField(...)함수 선언 및 내부 구현- 텍스트 카운트, 아이콘 표시, 제한 기능 관련 파라미터 및 로직 존재 여부
- 개선 계획이 반영된 설계 문서나 이슈 트래커 링크(있을 경우)
확인 후 결과를 공유해 주시면 다음 단계에 반영하겠습니다.
app/src/main/java/com/texthip/thip/ui/myPage/NotificationScreen.kt (2)
36-41: 토스트 자동 해제 로직 검토LaunchedEffect를 사용한 토스트 자동 해제 구현이 적절합니다. 2초 후 자동으로 토스트가 사라지도록 잘 구현되어 있습니다.
97-103: 토글 스위치 상태 관리 검토ToggleSwitchButton의 상태 변경 및 토스트 메시지 연동이 올바르게 구현되어 있습니다. 사용자 피드백이 적절히 제공되고 있습니다.
app/src/main/java/com/texthip/thip/ui/myPage/MyPageScreen.kt (2)
34-34: 사용되지 않는 navController 파라미터
navController파라미터가 선언되었지만 함수 내에서 사용되지 않습니다. 메뉴 아이템 클릭 시 네비게이션이 필요할 것으로 보입니다.
181-188: Preview 구현이 적절합니다Preview 함수가 적절하게 구현되었습니다.
.idea/deploymentTargetSelector.xml
Outdated
| <SelectionState runConfigName="Thip.app"> | ||
| <option name="selectionMode" value="DROPDOWN" /> | ||
| <DropdownSelection timestamp="2025-05-31T10:07:48.311628Z"> | ||
| <Target type="DEFAULT_BOOT"> | ||
| <handle> | ||
| <DeviceId pluginId="LocalEmulator" identifier="path=C:\Users\정주연\.android\avd\Thip_Pixel_8a.avd" /> | ||
| </handle> | ||
| </Target> | ||
| </DropdownSelection> | ||
| <DialogSelection /> | ||
| </SelectionState> | ||
| <SelectionState runConfigName="THIP-Android.Thip.app"> | ||
| <option name="selectionMode" value="DROPDOWN" /> | ||
| <DropdownSelection timestamp="2025-05-31T10:59:15.906390500Z"> | ||
| <Target type="DEFAULT_BOOT"> | ||
| <handle> | ||
| <DeviceId pluginId="LocalEmulator" identifier="path=C:\Users\정주연\.android\avd\Thip_Pixel_8a.avd" /> | ||
| </handle> | ||
| </Target> | ||
| </DropdownSelection> | ||
| <DialogSelection /> | ||
| </SelectionState> |
There was a problem hiding this comment.
IDE 설정 파일과 사용자 PII가 VCS에 커밋되었습니다 – 즉시 제거하세요
.idea 디렉터리는 개인-환경 전용이며, 여기에는 C:\Users\정주연\...처럼 실명·경로가 포함돼 PII가 노출됩니다.
프로젝트-무관 정보가 레포에 남아 있으면
- 협업자 IDE 설정을 덮어쓰고
- 플랫폼별 경로로 CI/CD 오류를 일으키며
- 개인 정보를 공개합니다.
조치 권장:
# 파일 삭제 및 과거 기록에서도 제거
git rm --cached .idea/deploymentTargetSelector.xml
echo ".idea/" >> .gitignore # 이미 있다면 확인
git commit -m "Remove IDE config & ignore .idea"필요하면 git filter-repo/BFG로 히스토리에서 완전히 제거할 수 있도록 도와드리겠습니다.
🤖 Prompt for AI Agents
In .idea/deploymentTargetSelector.xml lines 5 to 26, the file contains personal
identifiable information (PII) such as user-specific paths and IDE settings that
should not be committed to version control. Remove this file from the repository
using 'git rm --cached .idea/deploymentTargetSelector.xml', add '.idea/' to the
.gitignore file if not already present to prevent future commits, and commit
these changes with a clear message. Optionally, use tools like git filter-repo
or BFG to purge this file from the repository history.
| val reactions = listOf( | ||
| ReactionItem("@user 1님의 피드 글","어쩌구 저쩌구 콘텐츠 내용입니다.어쩌구 저쩌구 콘텐츠 내용입니다.어쩌구 저쩌구 콘텐츠 내용입니다.", "2",true), | ||
| ReactionItem("@user 1님의 글", "어쩌구 저쩌구 콘텐츠 내용입니다.", "7", true), | ||
| ReactionItem("@user 3님의 기록", "어쩌구 저쩌구 콘텐츠 내용입니다.", "17", true), | ||
| ReactionItem("@user 1님의 글", "어쩌구 저쩌구 콘텐츠 내용입니다.", "7", true), | ||
| ReactionItem("@user 1님의 글", "어쩌구 저쩌구 콘텐츠 내용입니다.", "7", true), | ||
| ReactionItem("@user 1님의 글", "어쩌구 저쩌구 콘텐츠 내용입니다.", "7", true), | ||
| ReactionItem("@user 1님의 글", "어쩌구 저쩌구 콘텐츠 내용입니다.", "7", true), | ||
| ReactionItem("@user 1님의 글", "어쩌구 저쩌구 콘텐츠 내용입니다.", "7", true), | ||
| ReactionItem("@user 1님의 글", "어쩌구 저쩌구 콘텐츠 내용입니다.", "7", true), | ||
| ReactionItem("@user 1님의 글", "어쩌구 저쩌구 콘텐츠 내용입니다.", "7", true), | ||
| ReactionItem("@user 1님의 글", "어쩌구 저쩌구 콘텐츠 내용입니다.", "7", true), | ||
| ReactionItem("@user 1님의 글", "어쩌구 저쩌구 콘텐츠 내용입니다.", "7", true) | ||
| ) |
There was a problem hiding this comment.
🛠️ Refactor suggestion
하드코딩된 반응 데이터 개선
현재 반응 데이터가 하드코딩되어 있으며, 대부분이 중복된 내용입니다. TODO 주석에 언급된 대로 ViewModel로 교체가 필요합니다.
@Composable
-fun ReactionsScreen() {
- //추후 뷰모델로 수정 예정
- val reactions = listOf(
- ReactionItem("@user 1님의 피드 글","어쩌구 저쩌구 콘텐츠 내용입니다.어쩌구 저쩌구 콘텐츠 내용입니다.어쩌구 저쩌구 콘텐츠 내용입니다.", "2",true),
- // ... 중복된 데이터들
- )
+fun ReactionsScreen(
+ viewModel: ReactionsViewModel = hiltViewModel()
+) {
+ val reactions by viewModel.reactions.collectAsStateWithLifecycle()🤖 Prompt for AI Agents
In app/src/main/java/com/texthip/thip/ui/myPage/ReactionsScreen.kt around lines
32 to 45, the reaction data is hardcoded with many duplicate entries. Replace
this hardcoded list with a dynamic data source by moving the reaction data into
a ViewModel. Create a ViewModel that provides the reaction list and update the
UI to observe and display data from the ViewModel instead of using static
hardcoded values.
| message = stringResource( | ||
| if (message == "push_on") R.string.push_on else R.string.push_off | ||
| ), | ||
| date = "2025년 6월 29일 22시 30분", |
There was a problem hiding this comment.
하드코딩된 날짜 수정 필요
토스트 메시지에 하드코딩된 날짜가 사용되고 있습니다. 실제 현재 시간을 사용해야 합니다.
- date = "2025년 6월 29일 22시 30분",
+ date = SimpleDateFormat("yyyy년 MM월 dd일 HH시 mm분", Locale.KOREAN)
+ .format(Date()),또는 별도의 DateUtil 클래스를 만들어 사용하는 것을 권장합니다.
🤖 Prompt for AI Agents
In app/src/main/java/com/texthip/thip/ui/myPage/NotificationScreen.kt at line
56, replace the hardcoded date string with code that dynamically obtains the
current date and time. Use Kotlin's date/time APIs to get the current timestamp
formatted appropriately, or alternatively, create and use a DateUtil class to
provide the current formatted date string for the toast message.
| MenuItemButton( | ||
| text = stringResource(R.string.notification_settings), | ||
| icon = painterResource(R.drawable.ic_notice), | ||
| contentColor = colors.White, | ||
| backgroundColor = colors.DarkGrey02, | ||
| hasRightIcon = true, | ||
| modifier = Modifier.fillMaxWidth(), | ||
| onClick = {} | ||
| ) | ||
| Spacer(modifier = Modifier.height(16.dp)) | ||
| MenuItemButton( | ||
| text = stringResource(R.string.guide), | ||
| icon = painterResource(R.drawable.ic_guide), | ||
| contentColor = colors.White, | ||
| backgroundColor = colors.DarkGrey02, | ||
| hasRightIcon = true, | ||
| modifier = Modifier.fillMaxWidth(), | ||
| onClick = {} | ||
| ) | ||
| Spacer(modifier = Modifier.height(16.dp)) | ||
| MenuItemButton( | ||
| text = stringResource(R.string.customer_service), | ||
| icon = painterResource(R.drawable.ic_center), | ||
| contentColor = colors.White, | ||
| backgroundColor = colors.DarkGrey02, | ||
| hasRightIcon = true, | ||
| modifier = Modifier.fillMaxWidth(), | ||
| onClick = {} | ||
| ) | ||
| Spacer(modifier = Modifier.height(16.dp)) | ||
| MenuItemButton( | ||
| text = stringResource(R.string.delete_account), | ||
| icon = painterResource(R.drawable.ic_bye), | ||
| contentColor = colors.White, | ||
| backgroundColor = colors.DarkGrey02, | ||
| hasRightIcon = true, | ||
| modifier = Modifier.fillMaxWidth(), | ||
| onClick = {} | ||
| ) |
There was a problem hiding this comment.
메뉴 섹션 네비게이션 구현 필요
알림 설정, 가이드, 고객센터, 회원탈퇴 메뉴의 onClick 핸들러가 모두 비어있습니다.
각 메뉴에 대한 네비게이션을 구현해주세요:
onClick = {
- // 빈 핸들러
+ navController?.navigate("notification_settings") // 알림 설정
+ navController?.navigate("guide") // 가이드
+ navController?.navigate("customer_service") // 고객센터
+ navController?.navigate("delete_account") // 회원탈퇴
}Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In app/src/main/java/com/texthip/thip/ui/myPage/MyPageScreen.kt between lines
110 and 148, the onClick handlers for the MenuItemButton components
(notification settings, guide, customer service, delete account) are currently
empty. Implement navigation logic in each onClick handler to navigate to the
corresponding screens or perform the appropriate actions for each menu item. Use
the existing navigation framework or methods available in the project to handle
these navigations properly.
| LeftNameTopAppBar( | ||
| title = stringResource(R.string.my_page), | ||
| leftIcon = painterResource(R.drawable.ic_search), | ||
| rightIcon = painterResource(R.drawable.ic_plus) | ||
| ) | ||
| } |
There was a problem hiding this comment.
상단 앱바 아이콘 클릭 핸들러 누락
LeftNameTopAppBar의 검색 및 추가 아이콘에 클릭 핸들러가 연결되지 않았습니다.
LeftNameTopAppBar(
title = stringResource(R.string.my_page),
leftIcon = painterResource(R.drawable.ic_search),
- rightIcon = painterResource(R.drawable.ic_plus)
+ rightIcon = painterResource(R.drawable.ic_plus),
+ isLeftIconVisible = true,
+ isRightIconVisible = true,
+ onLeftClick = { /* TODO: 검색 화면으로 이동 */ },
+ onRightClick = { /* TODO: 추가 기능 구현 */ }
)🤖 Prompt for AI Agents
In app/src/main/java/com/texthip/thip/ui/myPage/MyPageScreen.kt around lines 42
to 47, the LeftNameTopAppBar component is missing click handlers for the search
and add icons. Add appropriate onClick lambda parameters or callbacks for the
leftIcon and rightIcon to handle user interactions when these icons are clicked.
| AuthorHeader( | ||
| profileImage = null, | ||
| nickname = nickname, | ||
| badgeText = badgeText, | ||
| buttonText = stringResource(R.string.edit) | ||
| ) |
There was a problem hiding this comment.
프로필 편집 버튼 클릭 핸들러 누락
AuthorHeader의 편집 버튼에 클릭 핸들러가 구현되지 않았습니다.
AuthorHeader(
profileImage = null,
nickname = nickname,
badgeText = badgeText,
- buttonText = stringResource(R.string.edit)
+ buttonText = stringResource(R.string.edit),
+ onButtonClick = {
+ // TODO: 프로필 편집 화면으로 이동
+ navController?.navigate("edit_profile")
+ }
)📝 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.
| AuthorHeader( | |
| profileImage = null, | |
| nickname = nickname, | |
| badgeText = badgeText, | |
| buttonText = stringResource(R.string.edit) | |
| ) | |
| AuthorHeader( | |
| profileImage = null, | |
| nickname = nickname, | |
| badgeText = badgeText, | |
| buttonText = stringResource(R.string.edit), | |
| onButtonClick = { | |
| // TODO: 프로필 편집 화면으로 이동 | |
| navController?.navigate("edit_profile") | |
| } | |
| ) |
🤖 Prompt for AI Agents
In app/src/main/java/com/texthip/thip/ui/myPage/MyPageScreen.kt around lines 55
to 60, the AuthorHeader composable is missing a click handler for the edit
button. Add an onClick or equivalent callback parameter to AuthorHeader and
implement a handler function that will be triggered when the edit button is
clicked, then pass this handler to the AuthorHeader composable to enable the
button's click functionality.
| MenuItemButton( | ||
| text = stringResource(R.string.saved), | ||
| icon = painterResource(R.drawable.ic_save), | ||
| contentColor = colors.White, | ||
| backgroundColor = colors.DarkGrey02, | ||
| hasRightIcon = true, | ||
| modifier = Modifier.fillMaxWidth(), | ||
| onClick = {} | ||
| ) | ||
| Spacer(modifier = Modifier.height(16.dp)) | ||
| MenuItemButton( | ||
| text = stringResource(R.string.reactions), | ||
| icon = painterResource(R.drawable.ic_heart), | ||
| contentColor = colors.White, | ||
| backgroundColor = colors.DarkGrey02, | ||
| hasRightIcon = true, | ||
| modifier = Modifier.fillMaxWidth(), | ||
| onClick = {} | ||
| ) |
There was a problem hiding this comment.
내 활동 메뉴 네비게이션 구현 필요
"저장" 및 "반응" 메뉴의 onClick 핸들러가 비어있습니다. PR 설명에 따르면 이러한 화면들이 구현되었으므로 네비게이션 연결이 필요합니다.
MenuItemButton(
text = stringResource(R.string.saved),
icon = painterResource(R.drawable.ic_save),
contentColor = colors.White,
backgroundColor = colors.DarkGrey02,
hasRightIcon = true,
modifier = Modifier.fillMaxWidth(),
- onClick = {}
+ onClick = {
+ navController?.navigate("saved")
+ }
)
Spacer(modifier = Modifier.height(16.dp))
MenuItemButton(
text = stringResource(R.string.reactions),
icon = painterResource(R.drawable.ic_heart),
contentColor = colors.White,
backgroundColor = colors.DarkGrey02,
hasRightIcon = true,
modifier = Modifier.fillMaxWidth(),
- onClick = {}
+ onClick = {
+ navController?.navigate("reactions")
+ }
)🤖 Prompt for AI Agents
In app/src/main/java/com/texthip/thip/ui/myPage/MyPageScreen.kt around lines 76
to 94, the onClick handlers for the "Saved" and "Reactions" MenuItemButton
components are empty. To fix this, implement the onClick callbacks to navigate
to the corresponding "Saved" and "Reactions" screens using the app's navigation
controller or framework. Replace the empty onClick lambdas with proper
navigation calls that direct users to the respective screens as described in the
PR.
➕ 이슈 링크
🔎 작업 내용
마이페이지 메인
고객센터 화면
회원탈퇴 화면
회원탈퇴 완료 화면
프로필 편집 화면
푸시알림 설정 화면
반응 화면
저장 화면
저장 피드/ 책 ViewModel
RoleCard 컴포넌트
SavedFeedCard 컴포넌트
Book, Feed, Reaction, Role Item
📸 스크린샷
MyPagescreen
bandicam.2025-07-01.05-01-30-719.mp4
EditProfileScreen
https://github.com/user-attachments/assets/64688331-a9c8-44b1-9d97-6001652df961

ReactionScreen
bandicam.2025-07-01.03-58-14-568.mp4
SavedScreen
bandicam.2025-07-01.05-22-15-272.mp4
NotificationScreen
bandicam.2025-07-01.06-03-53-741.mp4
CustomerCenterScreen
DeleteAccountScreen
bandicam.2025-07-01.05-04-09-740.mp4
DeleteAccountCompleteScreen
😢 해결하지 못한 과제
[] TASK
📢 리뷰어들에게
Summary by CodeRabbit
신규 기능
기능 개선 및 변경
버그 수정
문서 및 리소스
스타일 및 테마
라이브러리 및 의존성