-
Notifications
You must be signed in to change notification settings - Fork 2
π :: (#810) ν νλ©΄ ꡬν #811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The head ref may contain hidden characters: "feature/810-\uD648-\uD654\uBA74-\uAD6C\uD604"
Conversation
- ν, μ μ², λ§μ΄νμ΄μ§ μμ΄μ½ μΆκ° (κΈ°λ³Έ/μ ν μν) - DmsIconμ μμ΄μ½ μμ μΆκ° π€ Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- ν νλ©΄μ© μμ΄ν λ²νΌ μ»΄ν¬λνΈ μΆκ° - μμ΄μ½, μ λͺ©, μ€λͺ νμ κΈ°λ₯ π€ Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- ViewModel λ² μ΄μ€ ν΄λμ€ λ¦¬ν©ν λ§ π€ Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- MyPage λ°μ΄ν° λͺ¨λΈ νλ μμ - StudentMapper λ‘μ§ μ λ°μ΄νΈ π€ Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- HomeScreen UI ꡬν - HomeViewModel λ‘μ§ κ΅¬ν - ν νλ©΄ μ»΄ν¬λνΈ μΆκ°: - HomeTopAppBar: μλ¨ μ±λ° - DmsPointContent: μλ²μ νμ - MealContent: κΈμ μ 보 - AnnouncementButton: 곡μ§μ¬ν λ²νΌ - Navigation 3 κΈ°λ° HomeRoute ꡬν π€ Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- ApplicationScreen UI ꡬν - Navigation 3 κΈ°λ° ApplicationRoute ꡬν π€ Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- MyPageScreen UI ꡬν - Navigation 3 κΈ°λ° MyPageRoute ꡬν π€ Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- BottomMenu sealed class ꡬν - ν, μ μ², λ§μ΄νμ΄μ§ λ©λ΄ μ μ - Navigation 3 NavKey κΈ°λ° λΌμ°νΈ μ€μ - BottomNavigationBar Composable ꡬν - νμ¬ νλ©΄ μνμ λ°λ₯Έ μ ν νμ - μμ΄μ½ λ° λΌλ²¨ μ λλ©μ΄μ μ μ© π€ Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- Navigation 3 κΈ°λ° λ©μΈ νλ©΄ λΌμ°ν μ€μ - HomeScreenNav, ApplicationScreenNav, MyPageScreenNav μΆκ° - λ°ν λ° μ‘°κ±΄λΆ νμ λ‘μ§ κ΅¬ν - λ‘κ·ΈμΈ/μ¨λ³΄λ© νλ©΄μμλ λ°ν λ° μ¨κΉ - λ©μΈ νλ©΄(ν/μ μ²/λ§μ΄νμ΄μ§)μμλ§ νμ - λ°ν λ° λ€λΉκ²μ΄μ λμ ꡬν - νλ©΄ μ ν μ λ°±μ€ν κ΄λ¦¬ - μ€λ³΅ ν΄λ¦ λ°©μ§ - SignInScreen λ€λΉκ²μ΄μ κ°μ π€ Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughAdds bottom navigation and related UI (BottomMenu, BottomNavigationBar), implements Home/Application/MyPage/Meal routes and Meal feature (UI, ViewModel, repository Result-wrapping), expands design system (components, icons, drawables), migrates org.threeten.bp β java.time across modules, and updates build & dev manifest. Changes
Sequence Diagram(s)mermaid UI->>VM: init / request meals(date) Estimated code review effortπ― 4 (Complex) | β±οΈ ~45 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touchesβ Failed checks (1 warning)
β Passed checks (2 passed)
β¨ Finishing touches
π§ͺ 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 |
Summary of ChangesHello @uson1004, 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μ μ ν리μΌμ΄μ
μ ν νλ©΄κ³Ό νλ¨ λ΄λΉκ²μ΄μ
λ°λ₯Ό λμ
νμ¬ μ¬μ©μ κ²½νμ ν΅μ¬μ μΈ λΆλΆμ ꡬμΆν©λλ€. ν, μ μ², λ§μ΄νμ΄μ§λ‘μ κΈ°λ³Έ λ΄λΉκ²μ΄μ
νλ¦μ μ€μ νκ³ , κΈμ μ 보λ₯Ό ν¨μ¨μ μΌλ‘ νμνλ κΈ°λ₯μ ꡬννμ΅λλ€. λν, λ κ±°μ λ μ§/μκ° λΌμ΄λΈλ¬λ¦¬λ₯Ό Highlights
π§ New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
ν νλ©΄ ꡬνμ λν PRμ κ²ν νμ΅λλ€. μ λ°μ μΌλ‘ μλ‘μ΄ κΈ°λ₯λ€μ΄ μ μΆκ°λμκ³ , java.timeμΌλ‘μ λ§μ΄κ·Έλ μ΄μ
κ³Ό κ°μ μ½λ κ°μ μμ
λ μ μ΄λ£¨μ΄μ‘μ΅λλ€. λͺ κ°μ§ λ€λΉκ²μ΄μ
λ‘μ§, μλ¬ μ²λ¦¬, UI μ»΄ν¬λνΈ κ΅¬νμμ λ°κ²¬λ μμ μ¬νλ€μ μ μνμ΅λλ€. νΉν MealRepositoryImplμ λ°μ΄ν° λ‘λ© λ‘μ§κ³Ό DmsAppμ λ€λΉκ²μ΄μ
κ΄λ ¨ LaunchedEffect λΆλΆμ νμΈν΄ μ£Όμλ©΄ μ’κ² μ΅λλ€. μΆκ°μ μΌλ‘, μ½λμ λͺ
νμ±μ λμ΄κΈ° μν λͺ κ°μ§ λ€μ΄λ° λ° μ€λ³΅ μ½λ μ κ±° μ μλ ν¬ν¨λμ΄ μμ΅λλ€.
data/src/main/java/team/aliens/dms/android/data/meal/repository/MealRepositoryImpl.kt
Show resolved
Hide resolved
feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/model/DmsPointCotent.kt
Outdated
Show resolved
Hide resolved
core/ui/src/dev/java/team/aliens/dms/android/core/ui/util/Localize.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 17
Note
Due to the large number of review comments, Critical severity comments were prioritized as inline comments.
Caution
Some comments are outside the diff and canβt be posted inline due to platform limitations.
β οΈ Outside diff range comments (2)
feature/src/prod/kotlin/team/aliens/dms/android/feature/main/home/HomeViewModel.kt (1)
69-69: Remove debug logging statements.Debug
printlnstatements should be removed before merging to production.π Proposed fix
private fun updateMeal() = viewModelScope.launch(Dispatchers.IO) { - println("LOGLOG1") val capturedDate = stateFlow.value.selectedDate runCatching { mealRepository.updateMeal(capturedDate) }.onSuccess { meal -> reduce( newState = stateFlow.value.copy( selectedDate = capturedDate, currentMeal = meal, ), ) postSideEffect(HomeSideEffect.MealUpdated) }.onFailure { postSideEffect(HomeSideEffect.MealUpdateFailed) - }.also { - println("LOGLOG ${it.isSuccess}") - } + } }Also applies to: 84-84
core/design-system/src/prod/java/team/aliens/dms/android/core/designsystem/foundation/DmsIcon.kt (1)
13-13: Typo:BlueLaunchshould beBlueLunch.Line 13 has
BlueLaunchbut the dev version correctly usesBlueLunch. This naming inconsistency could cause issues if code references the wrong name.
π Major comments (4)
feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/model/MealContent.kt-43-43 (1)
43-43: Avoid reusing the modifier parameter.The
modifierparameter is reused on the Canvas, which shadows the outer modifier parameter and could lead to unexpected layout behavior. This prevents the caller's modifier from being applied to the Canvas.π Proposed fix
Canvas( - modifier = modifier + modifier = Modifier .align(Alignment.TopCenter) .size(300.dp) .blur(feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/navigation/HomeRoute.kt-11-17 (1)
11-17: Multiple navigation callbacks are stubbed with empty implementations.Several navigation handlers (
onNavigateNotice,onNavigateNoticeDetail,onNavigatePointHistory) and theonShowSnackBarcallback are implemented as no-ops. This means features like navigating to notices, point history, and displaying snackbar messages won't work from the home screen.Do you want me to help identify where these callbacks should be properly wired, or should this be tracked as a TODO for future implementation?
data/src/main/java/team/aliens/dms/android/data/meal/repository/MealRepositoryImpl.kt-24-28 (1)
24-28: PotentialNullPointerExceptionif date not found in fetched meals.Using
!!on line 27 will throwNullPointerExceptionif the network response doesn't include a meal for the requested date. Consider using?: throw CannotFindMealException()for a more meaningful error.π Proposed fix
- }.find { it.date == date }!! + }.find { it.date == date } ?: throw CannotFindMealException()app/src/dev/kotlin/team/aliens/dms/android/app/DmsApp.kt-94-105 (1)
94-105: Logic error:removeAllafterclear()is a no-op.
backStack.clear()empties the list, making the subsequentremoveAll { ... }operate on an empty list and do nothing. The intent seems to be to remove only the main screens before adding the destination.π Proposed fix
onNavigate = { destination -> if (currentScreen != destination) { - // κΈ°μ‘΄ λ©μΈ νλ©΄λ€ μ κ±° - backStack.clear() backStack.removeAll { it is HomeScreenNav || it is ApplicationScreenNav || it is MyPageScreenNav } - // μ νλ©΄ μΆκ° backStack.add(destination) } }
π‘ Minor comments (10)
feature/src/dev/kotlin/team/aliens/dms/android/feature/main/application/navigation/ApplicationRoute.kt-4-4 (1)
4-4: Remove unused import.The
Serializableimport is not used in this file.π Proposed fix
import androidx.compose.runtime.Composable -import kotlinx.serialization.Serializable import team.aliens.dms.android.feature.main.application.ui.Applicationshared/date/src/main/java/team/aliens/dms/android/shared/date/Extensions.kt-3-7 (1)
3-7: Remove ThreeTenBP dependency to complete the migration.The code migration to
java.timeis completeβExtensions.ktproperly imports onlyjava.time.*classes,ExtensionsTest.ktprovides test coverage, and the extension functions are consistently used across the codebase (SignUpResponse.kt,MealMapper.kt). However, the ThreeTenBP dependency remains declared inshared/date/build.gradle.kts(implementation(libs.threetenbp)). Remove this unused dependency to fully complete the migration.feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/model/MealContent.kt-69-69 (1)
69-69: Hardcoded button text should be localized.The button text "μ€λμ κΈμ νμΈνκΈ°" is hardcoded in Korean. Consider extracting this to string resources.
feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/model/MealContent.kt-54-54 (1)
54-54: Hardcoded text should be localized.The text "κΈμ" is hardcoded in Korean. Consider extracting this to string resources to support internationalization.
π Suggested approach
Extract to
strings.xml:<string name="meal_label">κΈμ</string>Then reference it:
Text( - text = "κΈμ", + text = stringResource(R.string.meal_label), style = DmsTheme.typography.bodyB, color = DmsTheme.colorScheme.inverseSurface, )Committable suggestion skipped: line range outside the PR's diff.
core/ui/src/dev/java/team/aliens/dms/android/core/ui/util/Localize.kt-5-13 (1)
5-13: Fix the function name typo.The function name
toLocate()appears to be a typo and should likely betoLocale()to properly convey that it's converting to a localized representation.π Proposed fix
-fun DayOfWeek.toLocate(): String = when (this) { +fun DayOfWeek.toLocale(): String = when (this) { DayOfWeek.MONDAY -> "μμμΌ" DayOfWeek.TUESDAY -> "νμμΌ" DayOfWeek.WEDNESDAY -> "μμμΌ" DayOfWeek.THURSDAY -> "λͺ©μμΌ" DayOfWeek.FRIDAY -> "κΈμμΌ" DayOfWeek.SATURDAY -> "ν μμΌ" DayOfWeek.SUNDAY -> "μΌμμΌ" }feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/model/DmsPointCotent.kt-1-1 (1)
1-1: Typo in filename: "Cotent" should be "Content".The file is named
DmsPointCotent.ktbut should beDmsPointContent.ktfor consistency with the composable function nameDmsPointContent.feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/model/DmsPointCotent.kt-82-98 (1)
82-98: Unused parameter:iconBackgroundColoris never applied.The
iconBackgroundColorparameter is accepted but never used in thePointItemcomposable. TheImageon lines 95-98 doesn't apply any background. Either remove the parameter or apply it as a background to the icon.π Proposed fix to apply the background
- Image( - painter = painterResource(icon), - contentDescription = null, - ) + Box( + modifier = Modifier + .size(32.dp) + .background(color = iconBackgroundColor, shape = CircleShape), + contentAlignment = Alignment.Center, + ) { + Image( + painter = painterResource(icon), + contentDescription = null, + ) + }app/src/dev/kotlin/team/aliens/dms/android/app/DmsApp.kt-151-155 (1)
151-155: UseremoveLastOrNull()for safer back navigation.
removeLast()throwsNoSuchElementExceptionif the backStack is empty. For consistency with line 116 and defensive coding, useremoveLastOrNull().π Proposed fix
entry<MealScreenNav> { MealRoute( - onNavigateBack = { backStack.removeLast() } + onNavigateBack = { backStack.removeLastOrNull() } ) }feature/src/dev/kotlin/team/aliens/dms/android/feature/meal/viewmodel/MealViewModel.kt-27-35 (1)
27-35: Missing error handling for meal fetch failure.
fetchMealonly handlesonSuccess. If the network request fails, the UI will display stale or default data with no feedback to the user.π Consider handling failures
viewModelScope.launch(Dispatchers.IO) { mealRepository.fetchMeal(date = selectedDate) .onSuccess { successfulMeal -> setState { it.copy(meal = successfulMeal) } } + .onFailure { throwable -> + // Handle error - e.g., update state with error flag or use side effect + } }feature/src/dev/kotlin/team/aliens/dms/android/feature/meal/ui/MealScreen.kt-248-251 (1)
248-251: Typo:img_launchshould beimg_lunchto match naming convention.The LUNCH meal type references
R.drawable.img_launch, which breaks the semantic naming pattern established by other meal types (BREAKFAST:img_morning, DINNER:img_dinner). The drawable resource exists but is incorrectly namedβrename it toimg_lunch.pngand update the reference for consistency.
π§Ή Nitpick comments (24)
feature/src/prod/kotlin/team/aliens/dms/android/feature/outing/OutingStatusScreen.kt (1)
43-51: Minor: Reorganize imports for consistency.The
PaddingDefaultsimport at line 45 is inserted between otheruipackage imports, breaking conventional grouping. Consider consolidating allteam.aliens.dms.android.core.designsystemimports together, and similarly group theuiimports.π Suggested import reorganization
import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.ramcosta.composedestinations.annotation.Destination import team.aliens.dms.android.core.designsystem.AlertDialog import team.aliens.dms.android.core.designsystem.ButtonDefaults import team.aliens.dms.android.core.designsystem.ContainedButton + import team.aliens.dms.android.core.designsystem.PaddingDefaults import team.aliens.dms.android.core.designsystem.foundation.DmsIcon import team.aliens.dms.android.core.designsystem.DmsTheme import team.aliens.dms.android.core.designsystem.DmsTopAppBar import team.aliens.dms.android.core.designsystem.LocalToast import team.aliens.dms.android.core.designsystem.Scaffold import team.aliens.dms.android.core.designsystem.TextButton import team.aliens.dms.android.core.designsystem.shadow import ui.DefaultHorizontalSpace import ui.DefaultVerticalSpace - import team.aliens.dms.android.core.designsystem.PaddingDefaults import ui.bottomPadding import ui.composable.FloatingNotice import ui.horizontalPadding import ui.startPadding import ui.topPadding import ui.verticalPaddingcore/design-system/src/dev/java/team/aliens/dms/android/core/designsystem/button/DmsItemButton.kt (2)
3-3: Remove unused import.The
@DrawableResannotation is imported but not used, since theiconResparameter is of typePainterrather than an Int resource ID.π Proposed fix
-import androidx.annotation.DrawableRes
53-54: Remove redundant.clip()modifier.The
.clip(RoundedCornerShape(32.dp))on line 53 is redundant since.background()on line 54 already applies the same shape, which automatically clips the content.π Proposed fix
Row( modifier = modifier .fillMaxWidth() - .clip(RoundedCornerShape(32.dp)) .background(color = backgroundColor, shape = RoundedCornerShape(32.dp)) .clickable(feature/src/dev/kotlin/team/aliens/dms/android/feature/main/application/ui/ApplicationScreen.kt (1)
10-13: Placeholder implementation detected.The
ApplicationScreen()function is currently empty, serving as a placeholder for future implementation. This is acceptable for incremental development.Would you like me to help scaffold a basic implementation or open an issue to track the Application screen feature?
core/design-system/src/dev/res/drawable/ic_plus.xml (1)
7-14: Consider using color resources for better maintainability.The colors are hardcoded (
#B1D0FE,#0F6EFE) instead of referencing theme or color resources. This reduces flexibility for theme variations and makes it harder to maintain design consistency across the app.Consider defining these colors in your color resources and referencing them via
@color/...or using theme attributes.feature/src/prod/kotlin/team/aliens/dms/android/feature/main/application/ApplicationScreen.kt (1)
367-367: Remove unusedappliedTitleparameter.The
appliedTitleparameter is declared but never passed by any call site invoteTapContent(lines 236-275). The associatedAnimatedVisibilityblock (lines 410-427) will never be visible.π Proposed fix to remove the unused parameter
private fun VoteCard( modifier: Modifier = Modifier, topStartTimeTitle: LocalDateTime, topEndTimeTitle: LocalDateTime, title: String, description: String, - appliedTitle: String? = null, isVoted: Boolean, onButtonClick: () -> Unit, ) {Additionally, remove the unused
AnimatedVisibilityblock at lines 410-427:Text( modifier = Modifier.weight(1f), text = title, color = DmsTheme.colorScheme.onSurface, style = DmsTheme.typography.title2, ) - AnimatedVisibility( - visible = appliedTitle != null, - enter = slideInVertically() + fadeIn(), - exit = slideOutVertically() + fadeOut(), - ) { - if (appliedTitle != null) { - RoundedButton( - onClick = { }, - fillMinSize = false, - contentPadding = PaddingValues( - horizontal = PaddingDefaults.Medium, - vertical = PaddingDefaults.Small, - ), - ) { - Text(text = appliedTitle) - } - } - } }core/design-system/build.gradle.kts (1)
65-65: Remove the unused threetenbp dependency.The codebase has completed its migration to java.time; no org.threeten.bp imports exist anywhere in the codebase. This dependency can be safely removed to reduce the dependency footprint.
feature/src/dev/kotlin/team/aliens/dms/android/feature/main/mypage/ui/MyPageScreen.kt (1)
10-13: Placeholder implementation detected.The
MyPageScreenis currently a stub with no implementation. This is expected for incremental development.Would you like me to help scaffold the MyPage UI structure or open an issue to track the implementation?
feature/src/prod/kotlin/team/aliens/dms/android/feature/main/home/HomeViewModel.kt (1)
128-260: Consider removing commented-out code.A large block of legacy implementation (133 lines) is commented out. If this code is no longer needed, consider removing it to improve maintainability. If it serves as reference documentation, consider moving it to a separate doc or ADR.
core/ui/src/dev/java/team/aliens/dms/android/core/ui/util/Localize.kt (1)
6-12: Consider using string resources for localized weekday names.The weekday names are hardcoded in Korean. Consider using string resources instead to support proper localization, maintain consistency with the rest of the app, and enable easier updates.
core/design-system/src/dev/res/drawable/ic_equal.xml (1)
1-15: Consider using theme color references for better theming support.The icon uses hard-coded color values (
#DDDDDDand#202020). If this icon should adapt to different themes or dark mode, consider using color resources from the theme instead of hard-coded hex values.feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/model/AnnouncementButton.kt (1)
42-53: Extract hard-coded strings to string resources for localization.The Korean text strings are hard-coded directly in the composable. For better i18n support and maintainability, consider extracting these to string resources.
π Recommended refactor
Move strings to
strings.xml:<string name="announcement_button_title">κ³΅μ§ λ³΄λ¬κ°κΈ°</string> <string name="announcement_button_description">μλ‘μ΄ κ³΅μ§μ¬νμ νμΈνμΈμ</string>Then reference them in the composable:
Text( modifier = Modifier.padding(start = 4.dp), - text = "κ³΅μ§ λ³΄λ¬κ°κΈ°", + text = stringResource(R.string.announcement_button_title), style = DmsTheme.typography.labelB, color = DmsTheme.colorScheme.tertiaryContainer, ) Text( modifier = Modifier.padding(start = 8.dp), - text = "μλ‘μ΄ κ³΅μ§μ¬νμ νμΈνμΈμ", + text = stringResource(R.string.announcement_button_description), style = DmsTheme.typography.labelM, color = DmsTheme.colorScheme.inverseSurface, )feature/src/dev/kotlin/team/aliens/dms/android/feature/meal/component/DateChip.kt (1)
33-37: Consider zero-padding for consistent date formatting.The current date format produces output like "2025.1.5" instead of "2025.01.05". If consistent date formatting is desired, consider using
String.format()orDateTimeFormatterfor zero-padded values.π Suggested formatting options
Option 1: Manual padding
-text = "${date.year}.${date.monthValue}.${date.dayOfMonth} (${date.dayOfWeek.toLocate()})", +text = "${date.year}.${date.monthValue.toString().padStart(2, '0')}.${date.dayOfMonth.toString().padStart(2, '0')} (${date.dayOfWeek.toLocate()})",Option 2: DateTimeFormatter
import java.time.format.DateTimeFormatter val formatter = DateTimeFormatter.ofPattern("yyyy.MM.dd") text = "${date.format(formatter)} (${date.dayOfWeek.toLocate()})",feature/src/dev/kotlin/team/aliens/dms/android/feature/main/mypage/navigation/MyPageRoute.kt (1)
4-4: Remove unused import.The
kotlinx.serialization.Serializableimport is not used in this file.feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/viewmodel/HomeViewModel.kt (1)
13-15: Repository should beprivate.The
studentRepositoryis only used internally bygetMyPage()and shouldn't be exposed publicly. Mark it asprivateto maintain encapsulation.π Proposed fix
internal class HomeViewModel @Inject constructor( - val studentRepository: StudentRepository, + private val studentRepository: StudentRepository, ) : BaseStateViewModel<HomeState, HomeSideEffect>(HomeState()) {feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/ui/HomeScreen.kt (2)
40-47: Remove unused parameteronNavigateNoticeDetail.The parameter
onNavigateNoticeDetail: (String) -> Unitis declared but never used in this composable or passed toHomeScreen. This is dead code.π Proposed fix
@Composable internal fun Home( onNavigateNotice: () -> Unit, - onNavigateNoticeDetail: (String) -> Unit, onNavigatePointHistory: (PointType) -> Unit, onNavigateMeal: () -> Unit, onShowSnackBar: (DmsSnackBarType, String) -> Unit, ) {
50-55: Consider remembering the gradient brush to avoid recreation on recomposition.The gradient
Brushis recreated on every recomposition. Since it uses static colors, wrap it inrememberfor better performance.π Proposed fix
- val gradient = Brush.radialGradient( + val gradient = remember { + Brush.radialGradient( - colors = listOf( - Color(0xFF002051).copy(alpha = 0.2f), - Color(0xFF0F6EFE).copy(alpha = 0.2f), - ) - ) + colors = listOf( + Color(0xFF002051).copy(alpha = 0.2f), + Color(0xFF0F6EFE).copy(alpha = 0.2f), + ) + ) + }app/src/dev/kotlin/team/aliens/dms/android/app/DmsApp.kt (2)
3-3: Remove unused import.
android.util.Logis imported but not used anywhere in this file.π Proposed fix
-import android.util.Log
69-72: Rename for clarity:shouldShowBottomBarlogic is inverted.The variable
shouldShowBottomBaristruewhen the screen is SignIn or Onboarding, but the bottom bar is shown when!shouldShowBottomBar. This is confusing. Consider renaming toshouldHideBottomBaror inverting the logic.π Proposed fix
- val shouldShowBottomBar = currentScreen in listOf( + val shouldHideBottomBar = currentScreen in listOf( SignInScreenNav, OnboardingScreenNav, )Then update usage:
- if (!shouldShowBottomBar) { + if (!shouldHideBottomBar) {app/src/dev/kotlin/team/aliens/dms/android/app/BottomMenu.kt (1)
6-8: Remove unused imports.
ApplicationRoute,HomeRoute, andMyPageRouteare imported but not used in this file.π Proposed fix
import androidx.annotation.DrawableRes import androidx.navigation3.runtime.NavKey import team.aliens.dms.android.core.designsystem.foundation.DmsIcon -import team.aliens.dms.android.feature.main.application.navigation.ApplicationRoute -import team.aliens.dms.android.feature.main.home.navigation.HomeRoute -import team.aliens.dms.android.feature.main.mypage.navigation.MyPageRoutecore/design-system/src/dev/java/team/aliens/dms/android/core/designsystem/calendar/DmsCalendar.kt (2)
37-40: Remove unused imports and annotation.
kotlin.time.Duration.Companion.daysandkotlin.time.ExperimentalTimeare imported but not used. The@OptIn(ExperimentalTime::class)annotation is unnecessary.π Proposed fix
import java.time.LocalDate import java.time.YearMonth -import kotlin.time.Duration.Companion.days -import kotlin.time.ExperimentalTime -@OptIn(ExperimentalTime::class) @Composable fun DmsCalendar(
47-52: Calendar may not display the selected date's month.
firstVisibleMonthis hardcoded toYearMonth.now()instead of deriving fromselectDate. IfselectDateis in a different month, users won't see it when the calendar opens.π Proposed fix
var updateDate by remember { mutableStateOf(selectDate) } val calendarState = rememberCalendarState( startMonth = YearMonth.now().minusYears(1), endMonth = YearMonth.now().plusYears(1), - firstVisibleMonth = YearMonth.now(), + firstVisibleMonth = YearMonth.from(selectDate), )feature/src/dev/kotlin/team/aliens/dms/android/feature/meal/viewmodel/MealViewModel.kt (1)
3-3: Remove unused import.
android.util.Logis imported but not used.π Proposed fix
-import android.util.Logfeature/src/dev/kotlin/team/aliens/dms/android/feature/meal/ui/MealScreen.kt (1)
59-59: Consider clarifying the purpose ofMAX_CALENDAR_COUNT.The value 366 seems to represent the total number of pager pages (one page per meal, so ~122 days of meals). Consider adding a comment or renaming to
MAX_PAGER_PAGE_COUNTfor clarity.
π Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
β Files ignored due to path filters (5)
core/design-system/src/dev/res/drawable/img_calendar.pngis excluded by!**/*.pngcore/design-system/src/dev/res/drawable/img_dinner.pngis excluded by!**/*.pngcore/design-system/src/dev/res/drawable/img_food.pngis excluded by!**/*.pngcore/design-system/src/dev/res/drawable/img_launch.pngis excluded by!**/*.pngcore/design-system/src/dev/res/drawable/img_morning.pngis excluded by!**/*.png
π Files selected for processing (112)
app/src/dev/kotlin/team/aliens/dms/android/app/BottomMenu.ktapp/src/dev/kotlin/team/aliens/dms/android/app/BottomNavigationBar.ktapp/src/dev/kotlin/team/aliens/dms/android/app/DmsApp.ktapp/src/dev/kotlin/team/aliens/dms/android/app/di/app/AppConfigModule.ktapp/src/prod/kotlin/team/aliens/dms/android/app/di/app/AppConfigModule.ktcore/database/src/main/java/team/aliens/dms/android/core/database/converter/DateTypeConverter.ktcore/database/src/main/java/team/aliens/dms/android/core/database/dao/MealDao.ktcore/database/src/main/java/team/aliens/dms/android/core/database/di/DatabaseModule.ktcore/database/src/main/java/team/aliens/dms/android/core/database/entity/MealEntity.ktcore/database/src/main/java/team/aliens/dms/android/core/database/entity/NoticeEntity.ktcore/design-system/build.gradle.ktscore/design-system/src/dev/java/team/aliens/dms/android/core/designsystem/PaddingDefaults.ktcore/design-system/src/dev/java/team/aliens/dms/android/core/designsystem/appbar/DmsTopAppBar.ktcore/design-system/src/dev/java/team/aliens/dms/android/core/designsystem/button/DmsItemButton.ktcore/design-system/src/dev/java/team/aliens/dms/android/core/designsystem/calendar/DmsCalendar.ktcore/design-system/src/dev/java/team/aliens/dms/android/core/designsystem/foundation/DmsIcon.ktcore/design-system/src/dev/res/drawable/ic_announcement.xmlcore/design-system/src/dev/res/drawable/ic_application.xmlcore/design-system/src/dev/res/drawable/ic_application_fill.xmlcore/design-system/src/dev/res/drawable/ic_equal.xmlcore/design-system/src/dev/res/drawable/ic_home.xmlcore/design-system/src/dev/res/drawable/ic_home_fill.xmlcore/design-system/src/dev/res/drawable/ic_minus.xmlcore/design-system/src/dev/res/drawable/ic_my_page.xmlcore/design-system/src/dev/res/drawable/ic_my_page_fill.xmlcore/design-system/src/dev/res/drawable/ic_notice.xmlcore/design-system/src/dev/res/drawable/ic_outing_pass.xmlcore/design-system/src/dev/res/drawable/ic_plus.xmlcore/design-system/src/prod/java/team/aliens/dms/android/core/designsystem/Calendars.ktcore/design-system/src/prod/java/team/aliens/dms/android/core/designsystem/foundation/DmsIcon.ktcore/design-system/src/prod/res/drawable/ic_application.xmlcore/design-system/src/prod/res/drawable/ic_application_fill.xmlcore/design-system/src/prod/res/drawable/ic_home_fill.xmlcore/design-system/src/prod/res/drawable/ic_my_page.xmlcore/design-system/src/prod/res/drawable/ic_my_page_fill.xmlcore/jwt/src/main/java/team/aliens/dms/android/core/jwt/Token.ktcore/ui/src/dev/java/team/aliens/dms/android/core/ui/util/Localize.ktcore/ui/src/dev/java/team/aliens/dms/android/core/ui/viewmodel/BaseStateViewModel.ktcore/ui/src/prod/kotlin/team/aliens/dms/android/core/ui/composable/FloatingNotice.ktdata/src/main/java/team/aliens/dms/android/data/meal/model/Meal.ktdata/src/main/java/team/aliens/dms/android/data/meal/repository/MealRepository.ktdata/src/main/java/team/aliens/dms/android/data/meal/repository/MealRepositoryImpl.ktdata/src/main/java/team/aliens/dms/android/data/notice/model/Notice.ktdata/src/main/java/team/aliens/dms/android/data/notification/model/Notification.ktdata/src/main/java/team/aliens/dms/android/data/outing/model/OutingApplicationTime.ktdata/src/main/java/team/aliens/dms/android/data/outing/repository/OutingRepository.ktdata/src/main/java/team/aliens/dms/android/data/outing/repository/OutingRepositoryImpl.ktdata/src/main/java/team/aliens/dms/android/data/point/model/Point.ktdata/src/main/java/team/aliens/dms/android/data/remains/model/RemainsApplicationTime.ktdata/src/main/java/team/aliens/dms/android/data/student/mapper/StudentMapper.ktdata/src/main/java/team/aliens/dms/android/data/student/model/MyPage.ktdata/src/main/java/team/aliens/dms/android/data/voting/model/AllVoteSearch.ktdata/src/main/java/team/aliens/dms/android/data/voting/repository/VotingRepository.ktdata/src/main/java/team/aliens/dms/android/data/voting/repository/VotingRepositoryImpl.ktdatabase/src/main/java/team/aliens/dms/android/database/meal/datasource/DatabaseMealDataSource.ktdatabase/src/main/java/team/aliens/dms/android/database/meal/datasource/DatabaseMealDataSourceImpl.ktfeature/build.gradle.ktsfeature/src/dev/kotlin/team/aliens/dms/android/feature/main/application/navigation/ApplicationRoute.ktfeature/src/dev/kotlin/team/aliens/dms/android/feature/main/application/ui/ApplicationScreen.ktfeature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/model/AnnouncementButton.ktfeature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/model/DmsPointCotent.ktfeature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/model/HomeTopAppBar.ktfeature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/model/MealContent.ktfeature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/navigation/HomeRoute.ktfeature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/ui/HomeScreen.ktfeature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/viewmodel/HomeViewModel.ktfeature/src/dev/kotlin/team/aliens/dms/android/feature/main/mypage/navigation/MyPageRoute.ktfeature/src/dev/kotlin/team/aliens/dms/android/feature/main/mypage/ui/MyPageScreen.ktfeature/src/dev/kotlin/team/aliens/dms/android/feature/meal/component/DateChip.ktfeature/src/dev/kotlin/team/aliens/dms/android/feature/meal/component/MealContent.ktfeature/src/dev/kotlin/team/aliens/dms/android/feature/meal/navigation/MealRoute.ktfeature/src/dev/kotlin/team/aliens/dms/android/feature/meal/ui/MealScreen.ktfeature/src/dev/kotlin/team/aliens/dms/android/feature/meal/viewmodel/MealViewModel.ktfeature/src/dev/kotlin/team/aliens/dms/android/feature/signin/ui/SigninScreen.ktfeature/src/prod/kotlin/team/aliens/dms/android/feature/editprofile/EditProfileImageScreen.ktfeature/src/prod/kotlin/team/aliens/dms/android/feature/main/Main.ktfeature/src/prod/kotlin/team/aliens/dms/android/feature/main/announcement/AnnouncementListScreen.ktfeature/src/prod/kotlin/team/aliens/dms/android/feature/main/application/ApplicationScreen.ktfeature/src/prod/kotlin/team/aliens/dms/android/feature/main/home/HomeScreen.ktfeature/src/prod/kotlin/team/aliens/dms/android/feature/main/home/HomeViewModel.ktfeature/src/prod/kotlin/team/aliens/dms/android/feature/main/mypage/MyPageScreen.ktfeature/src/prod/kotlin/team/aliens/dms/android/feature/notice/NoticeDetailsScreen.ktfeature/src/prod/kotlin/team/aliens/dms/android/feature/notice/NoticeDetailsViewModel.ktfeature/src/prod/kotlin/team/aliens/dms/android/feature/notification/box/NotificationBoxScreen.ktfeature/src/prod/kotlin/team/aliens/dms/android/feature/notification/settings/NotificationSettingsScreen.ktfeature/src/prod/kotlin/team/aliens/dms/android/feature/outing/OutingApplicationScreen.ktfeature/src/prod/kotlin/team/aliens/dms/android/feature/outing/OutingStatusScreen.ktfeature/src/prod/kotlin/team/aliens/dms/android/feature/outing/OutingViewModel.ktfeature/src/prod/kotlin/team/aliens/dms/android/feature/point/PointHistoryScreen.ktfeature/src/prod/kotlin/team/aliens/dms/android/feature/remains/RemainsApplicationScreen.ktfeature/src/prod/kotlin/team/aliens/dms/android/feature/signin/SignInScreen.ktfeature/src/prod/kotlin/team/aliens/dms/android/feature/signup/SetProfileImageScreen.ktfeature/src/prod/kotlin/team/aliens/dms/android/feature/studyroom/Common.ktfeature/src/prod/kotlin/team/aliens/dms/android/feature/studyroom/list/StudyRoomListScreen.ktfeature/src/prod/kotlin/team/aliens/dms/android/feature/voting/VotingApprovalScreen.ktfeature/src/prod/kotlin/team/aliens/dms/android/feature/voting/VotingModelStudentScreen.ktfeature/src/prod/kotlin/team/aliens/dms/android/feature/voting/VotingSelectedScreen.ktfeature/src/prod/kotlin/team/aliens/dms/android/feature/voting/VotingStudentScreen.ktfeature/src/prod/kotlin/team/aliens/dms/android/feature/voting/VotingViewModel.ktgradle/libs.versions.tomlnetwork/src/main/java/team/aliens/dms/android/network/meal/apiservice/MealApiService.ktnetwork/src/main/java/team/aliens/dms/android/network/meal/datasource/NetworkMealDataSource.ktnetwork/src/main/java/team/aliens/dms/android/network/meal/datasource/NetworkMealDataSourceImpl.ktnetwork/src/main/java/team/aliens/dms/android/network/outing/model/FetchOutingApplicationDetailsResponse.ktnetwork/src/main/java/team/aliens/dms/android/network/remains/model/FetchRemainsApplicationTimeResponse.ktnetwork/src/main/java/team/aliens/dms/android/network/voting/apiservice/VotingApiService.ktnetwork/src/main/java/team/aliens/dms/android/network/voting/datasource/NetworkVotingDataSource.ktnetwork/src/main/java/team/aliens/dms/android/network/voting/datasource/NetworkVotingDataSourceImpl.ktshared/date/src/main/java/team/aliens/dms/android/shared/date/Extensions.ktshared/date/src/main/java/team/aliens/dms/android/shared/date/util/Utils.ktshared/date/src/test/java/team/aliens/dms/android/shared/date/junit/DateUtilsTest.ktshared/date/src/test/java/team/aliens/dms/android/shared/date/junit/ExtensionsTest.kt
π§° Additional context used
𧬠Code graph analysis (13)
feature/src/dev/kotlin/team/aliens/dms/android/feature/main/mypage/navigation/MyPageRoute.kt (1)
feature/src/dev/kotlin/team/aliens/dms/android/feature/main/mypage/ui/MyPageScreen.kt (1)
MyPage(5-8)
feature/src/dev/kotlin/team/aliens/dms/android/feature/main/application/navigation/ApplicationRoute.kt (1)
feature/src/dev/kotlin/team/aliens/dms/android/feature/main/application/ui/ApplicationScreen.kt (1)
Application(5-8)
feature/src/dev/kotlin/team/aliens/dms/android/feature/meal/navigation/MealRoute.kt (1)
feature/src/dev/kotlin/team/aliens/dms/android/feature/meal/ui/MealScreen.kt (1)
Meal(61-131)
feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/model/MealContent.kt (1)
core/design-system/src/dev/java/team/aliens/dms/android/core/designsystem/button/Button.kt (1)
DmsButton(253-351)
core/design-system/src/dev/java/team/aliens/dms/android/core/designsystem/calendar/DmsCalendar.kt (1)
core/design-system/src/dev/java/team/aliens/dms/android/core/designsystem/button/Button.kt (1)
DmsButton(253-351)
feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/viewmodel/HomeViewModel.kt (2)
core/ui/src/dev/java/team/aliens/dms/android/core/ui/viewmodel/BaseStateViewModel.kt (2)
setState(29-31)sendEffect(33-35)feature/src/dev/kotlin/team/aliens/dms/android/feature/main/mypage/ui/MyPageScreen.kt (1)
MyPage(5-8)
feature/src/dev/kotlin/team/aliens/dms/android/feature/meal/viewmodel/MealViewModel.kt (2)
core/ui/src/dev/java/team/aliens/dms/android/core/ui/viewmodel/BaseStateViewModel.kt (1)
setState(29-31)feature/src/dev/kotlin/team/aliens/dms/android/feature/meal/ui/MealScreen.kt (1)
Meal(61-131)
feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/navigation/HomeRoute.kt (1)
feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/ui/HomeScreen.kt (1)
Home(40-83)
feature/src/dev/kotlin/team/aliens/dms/android/feature/meal/ui/MealScreen.kt (6)
core/design-system/src/prod/java/team/aliens/dms/android/core/designsystem/Modal.kt (1)
ModalBottomSheet(16-46)feature/src/dev/kotlin/team/aliens/dms/android/feature/meal/component/DateChip.kt (1)
DateChip(18-39)feature/src/dev/kotlin/team/aliens/dms/android/feature/meal/viewmodel/MealViewModel.kt (1)
getProperMeal(101-105)core/design-system/src/dev/java/team/aliens/dms/android/core/designsystem/button/DmsIconButton.kt (1)
DmsIconButton(17-40)feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/model/MealContent.kt (1)
MealContent(30-76)core/design-system/src/dev/java/team/aliens/dms/android/core/designsystem/button/DmsItemButton.kt (1)
DmsItemButton(31-81)
feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/ui/HomeScreen.kt (5)
feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/model/HomeTopAppBar.kt (1)
HomeTopAppBar(19-48)feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/model/AnnouncementButton.kt (1)
AnnouncementButton(23-61)feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/model/MealContent.kt (1)
MealContent(30-76)feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/model/DmsPointCotent.kt (1)
DmsPointContent(30-79)core/design-system/src/dev/java/team/aliens/dms/android/core/designsystem/button/DmsItemButton.kt (1)
DmsItemButton(31-81)
core/design-system/src/dev/java/team/aliens/dms/android/core/designsystem/appbar/DmsTopAppBar.kt (1)
core/design-system/src/dev/java/team/aliens/dms/android/core/designsystem/button/DmsIconButton.kt (1)
DmsIconButton(17-40)
app/src/dev/kotlin/team/aliens/dms/android/app/DmsApp.kt (6)
core/design-system/src/prod/java/team/aliens/dms/android/core/designsystem/Scaffold.kt (1)
Scaffold(11-28)app/src/dev/kotlin/team/aliens/dms/android/app/BottomNavigationBar.kt (1)
BottomNavigationBar(33-84)feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/navigation/HomeRoute.kt (1)
HomeRoute(7-18)feature/src/dev/kotlin/team/aliens/dms/android/feature/main/application/navigation/ApplicationRoute.kt (1)
ApplicationRoute(7-10)feature/src/dev/kotlin/team/aliens/dms/android/feature/main/mypage/navigation/MyPageRoute.kt (1)
MyPageRoute(7-10)feature/src/dev/kotlin/team/aliens/dms/android/feature/meal/navigation/MealRoute.kt (1)
MealRoute(6-13)
feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/model/HomeTopAppBar.kt (1)
core/design-system/src/dev/java/team/aliens/dms/android/core/designsystem/button/DmsIconButton.kt (1)
DmsIconButton(17-40)
πͺ detekt (1.23.8)
feature/src/dev/kotlin/team/aliens/dms/android/feature/main/application/ui/ApplicationScreen.kt
[warning] 11-13: This empty block of code can be removed.
(detekt.empty-blocks.EmptyFunctionBlock)
feature/src/dev/kotlin/team/aliens/dms/android/feature/main/mypage/ui/MyPageScreen.kt
[warning] 11-13: This empty block of code can be removed.
(detekt.empty-blocks.EmptyFunctionBlock)
β° 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). (1)
- GitHub Check: build
core/database/src/main/java/team/aliens/dms/android/core/database/entity/NoticeEntity.kt
Show resolved
Hide resolved
| val HomeFill = R.drawable.ic_home_fill | ||
| val CheckCircle = R.drawable.ic_application | ||
| val CheckCircleFill = R.drawable.ic_application_fill | ||
| val MyPage = R.drawable.ic_my_page | ||
| val MyPageFill = R.drawable.ic_my_page_fill |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π§© Analysis chain
π Script executed:
#!/bin/bash
# Find DmsIcon files in the repository
find . -name "DmsIcon.kt" -type f 2>/dev/null | head -20Repository: team-aliens/DMS-Android
Length of output: 263
π Script executed:
#!/bin/bash
# Read the dev version
echo "=== DEV VERSION ==="
cat ./core/design-system/src/dev/java/team/aliens/dms/android/core/designsystem/foundation/DmsIcon.kt
echo ""
echo "=== PROD VERSION ==="
cat ./core/design-system/src/prod/java/team/aliens/dms/android/core/designsystem/foundation/DmsIcon.ktRepository: team-aliens/DMS-Android
Length of output: 4246
π Script executed:
#!/bin/bash
# Check if the missing icons are used in shared code
echo "=== Searching for references to missing icons ==="
rg 'DmsIcon\.(Announcement|Minus|Equal|OutingPass|SymbolLight|SymbolDark|Cancel)' --type kotlinRepository: team-aliens/DMS-Android
Length of output: 1358
Prod DmsIcon is missing 7 icons that are referenced in shared code.
The prod version is missing: Announcement, Minus, Equal, OutingPass, SymbolLight, SymbolDark, and Cancel. These are referenced in:
core/design-system/.../DmsTopAppBar.kt,DmsSymbol.kt, andDmsTextField.ktfeature/.../AnnouncementButton.kt,HomeTopAppBar.kt, andDmsPointCotent.kt
Any prod build that uses shared code will fail to compile.
Also note: prod has BlueLaunch while dev has BlueLunch (likely a typo).
π€ Prompt for AI Agents
In
core/design-system/src/prod/java/team/aliens/dms/android/core/designsystem/foundation/DmsIcon.kt
around lines 24-28, the prod icon object is missing mappings for Announcement,
Minus, Equal, OutingPass, SymbolLight, SymbolDark, and Cancel which are
referenced across shared code and will cause compile failures; add val entries
for each of those icons mapped to their corresponding R.drawable resource names
(matching the dev variant or actual drawable names used elsewhere), and also fix
the naming typo by aligning BlueLaunch/BlueLunch to the correct resource name
used in dev/shared code so both prod and dev export the same set of icon
identifiers.
| abstract suspend fun fetchMeal(date: LocalDate): Result<Meal> | ||
|
|
||
| abstract suspend fun updateMeal(date: LocalDate): Meal | ||
| abstract suspend fun updateMeal(date: LocalDate): Result<Meal> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π§© Analysis chain
π Script executed:
#!/bin/bash
# Find all usages of fetchMeal and updateMeal to verify Result handling
echo "Finding fetchMeal call sites..."
rg -n "fetchMeal\(" --type kotlin -C3
echo -e "\nFinding updateMeal call sites..."
rg -n "updateMeal\(" --type kotlin -C3
echo -e "\nChecking for Result handling patterns..."
rg -n "\.getOrElse|\.getOrNull|\.onSuccess|\.onFailure|\.fold" --type kotlin -g "*Meal*"
echo -e "\nChecking MealRepository file..."
find . -name "MealRepository.kt" -type f | head -5Repository: team-aliens/DMS-Android
Length of output: 11873
π Script executed:
#!/bin/bash
# Comprehensive search for MealRepository usage and Result handling
echo "=== Finding MealRepository file ==="
find . -name "*MealRepository*" -type f
echo -e "\n=== Searching for fetchMeal implementations and calls ==="
rg "fetchMeal" --type kotlin -n
echo -e "\n=== Searching for updateMeal implementations and calls ==="
rg "updateMeal" --type kotlin -n
echo -e "\n=== Checking for implementations of MealRepository ==="
rg "class.*MealRepository|: MealRepository" --type kotlin -n
echo -e "\n=== Checking Result handling patterns in Meal-related files ==="
rg -l "Meal" --type kotlin | xargs rg "\.getOrElse|\.getOrNull|\.onSuccess|\.onFailure|\.fold|\.getOrThrow|\.getOrDefault" --type kotlin | head -20Repository: team-aliens/DMS-Android
Length of output: 5962
π Script executed:
#!/bin/bash
# Get more context around MealWorker.kt line 68
echo "=== MealWorker.kt context around fetchMeal call ==="
sed -n '60,85p' core/widget/src/prod/kotlin/team/aliens/dms/android/core/widget/MealWorker.kt
echo -e "\n=== Check setWidgetState signature ==="
rg -n "fun setWidgetState|setWidgetState.*Meal" --type kotlin -A2 core/widget/src/prod/kotlin/team/aliens/dms/android/core/widget/MealWorker.kt
echo -e "\n=== Check Result extension or toEntity ==="
rg -n "\.toEntity\(" core/widget/src/prod/kotlin/team/aliens/dms/android/core/widget/MealWorker.kt -B2 -A2Repository: team-aliens/DMS-Android
Length of output: 1698
Fix MealWorker.kt to properly unwrap the Result wrapper before calling toEntity().
At core/widget/src/prod/kotlin/team/aliens/dms/android/core/widget/MealWorker.kt:69, the code calls response.toEntity() on a Result<Meal> object, which will fail since Result has no toEntity() method. Extract the Meal value first using fold(onSuccess, onFailure), or use onSuccess/onFailure methods or getOrNull before passing to setWidgetState(). The current try-catch masks this error by returning a silent failure instead of properly handling the Result.
π€ Prompt for AI Agents
In core/widget/src/prod/kotlin/team/aliens/dms/android/core/widget/MealWorker.kt
around line 69, the code calls response.toEntity() where response is a
Result<Meal>; you must first unwrap the Result and only call toEntity() on the
Meal instance. Replace the direct call with a Result-unwrapping pattern (e.g.,
response.fold(onSuccess = { meal -> setWidgetState(meal.toEntity()) }, onFailure
= { error -> handle/log the error and set an error/fallback widget state }), or
use response.getOrNull()?.let { setWidgetState(it.toEntity()) } and handle the
null case), and ensure failures are not silently swallowed (log the error and
set an appropriate widget error state or propagate the failure).
data/src/main/java/team/aliens/dms/android/data/meal/repository/MealRepositoryImpl.kt
Show resolved
Hide resolved
| package team.aliens.dms.android.data.notification.model | ||
|
|
||
| import org.threeten.bp.LocalDateTime | ||
| import java.time.LocalDateTime |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π§© Analysis chain
π Script executed:
#!/bin/bash
# Check minSdk and desugaring configuration for java.time support
echo "=== Checking minSdk configuration ==="
fd -e toml libs.versions.toml --exec cat {} \; | grep -i "minSdk"
echo -e "\n=== Checking for desugaring configuration in build files ==="
fd build.gradle.kts --exec grep -l "coreLibraryDesugaring" {} \;
echo -e "\n=== Checking desugaring dependency ==="
fd build.gradle.kts --exec grep "coreLibraryDesugaring\|desugar_jdk_libs" {} \;Repository: team-aliens/DMS-Android
Length of output: 220
Configure Android API level support for java.time migration.
The minSdk is set to 23, which does not support java.time. Either increase minSdk to 26 or higher, or enable core library desugaring by:
- Adding
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:VERSION")to your build.gradle.kts - Configuring
coreLibrarydesugaring in the Android build configuration
Without either change, java.time imports will crash on devices running API 23β25.
π€ Prompt for AI Agents
In
data/src/main/java/team/aliens/dms/android/data/notification/model/Notification.kt
around line 3, the import of java.time.LocalDateTime will fail on devices with
API 23β25 because minSdk is 23; fix by either raising minSdk to 26+ in module
build.gradle.kts OR enable core library desugaring: in the Android module's
build.gradle.kts enable core library desugaring in compileOptions
(coreLibraryDesugaringEnabled = true) and add the desugaring dependency
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:VERSION") to the
dependencies block, then rebuild and verify java.time classes work on older
APIs.
| package team.aliens.dms.android.network.meal.apiservice | ||
|
|
||
| import org.threeten.bp.LocalDate | ||
| import java.time.LocalDate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π§© Analysis chain
π Script executed:
#!/bin/bash
# Check for gradle build files and their configuration
find . -name "build.gradle*" -type f | head -20Repository: team-aliens/DMS-Android
Length of output: 660
π Script executed:
#!/bin/bash
# Find gradle files
fd "build\.gradle" -x cat {} \;Repository: team-aliens/DMS-Android
Length of output: 41896
π Script executed:
#!/bin/bash
# List files in the root
ls -la
# Find all gradle files
find . -name "*.gradle*" -type f 2>/dev/null | head -20
# Also check for common gradle locations
echo "=== Checking for build.gradle files ==="
find . -maxdepth 3 -name "build.gradle*" -type f 2>/dev/nullRepository: team-aliens/DMS-Android
Length of output: 2834
π Script executed:
#!/bin/bash
# Search for gradle files more broadly
find . -type f \( -name "build.gradle" -o -name "build.gradle.kts" \) 2>/dev/nullRepository: team-aliens/DMS-Android
Length of output: 795
π Script executed:
#!/bin/bash
# Check gradle.properties for minSdk
echo "=== gradle.properties ==="
cat gradle.properties
# Check for version catalog (usually in gradle/libs.versions.toml)
echo -e "\n=== Version Catalog ==="
find . -name "*.toml" -o -name "*.properties" | grep -E "(libs|versions)" | head -10Repository: team-aliens/DMS-Android
Length of output: 1330
π Script executed:
#!/bin/bash
# Search for minSdk value in gradle files
echo "=== Checking for minSdk values ==="
grep -r "minSdk" . --include="*.toml" --include="*.properties" --include="*.kts" 2>/dev/null | head -20
# Search for coreLibrary and desugaring
echo -e "\n=== Checking for desugaring configuration ==="
grep -r "coreLibrary\|desugaring" . --include="*.kts" --include="*.properties" 2>/dev/nullRepository: team-aliens/DMS-Android
Length of output: 1747
π Script executed:
#!/bin/bash
cat gradle.properties 2>/dev/null || echo "No gradle.properties found"
echo -e "\n=== Checking for libs.versions.toml ==="
find . -name "libs.versions.toml" -exec cat {} \;Repository: team-aliens/DMS-Android
Length of output: 9655
Verify Android API compatibility for java.time migration.
The app's minSdk is set to 23 (Android 6.0), but java.time is only available natively from API 26 (Android 8.0). Without Java 8+ API desugaring enabled, migrating to java.time will cause NoClassDefFoundError on devices running Android < 8.0 (affecting millions of users on Android 6.0β7.1). Enable desugaring by adding coreLibraryDesugaringEnabled = true in compileOptions and the coreLibraryDesugaring dependency, or increase minSdk to 26 or higher.
π€ Prompt for AI Agents
In
network/src/main/java/team/aliens/dms/android/network/meal/apiservice/MealApiService.kt
around line 3, the import of java.time.LocalDate is unsafe because minSdk is 23
and java.time is only natively available from API 26; fix by enabling Java 8+
desugaring in the Android module: set compileOptions to include
coreLibraryDesugaringEnabled = true and add the appropriate
coreLibraryDesugaring dependency to the module's build.gradle (or alternatively
raise minSdk to 26+ if desugaring is not desired), then rebuild and verify no
runtime NoClassDefFoundError on older devices.
| package team.aliens.dms.android.network.meal.datasource | ||
|
|
||
| import org.threeten.bp.LocalDate | ||
| import java.time.LocalDate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π§© Analysis chain
π Script executed:
#!/bin/bash
# 1. Find any remaining org.threeten.bp imports
echo "=== Checking for remaining org.threeten.bp imports ==="
rg "import org\.threeten\.bp" --type=kt --type=java 2>/dev/null | head -20
# 2. Check build.gradle files for desugaring configuration
echo -e "\n=== Checking build.gradle files for desugaring config ==="
fd -e gradle -e kts | head -10 | xargs -I {} sh -c 'echo "File: {}"; grep -E "coreLibraryDesugaring|minSdk|coreLibraryDesugaringEnabled" "{}" || true' 2>/dev/null
# 3. Check if the NetworkMealDataSourceImpl file exists and its imports
echo -e "\n=== Checking NetworkMealDataSourceImpl file ==="
find . -name "NetworkMealDataSourceImpl.kt" -type f 2>/dev/null | xargs cat 2>/dev/null | head -20Repository: team-aliens/DMS-Android
Length of output: 1574
π Script executed:
#!/bin/bash
# 1. Find minSdk actual value from gradle.properties or version catalog
echo "=== Checking for minSdk value ==="
find . -name "gradle.properties" -o -name "libs.versions.toml" | xargs cat 2>/dev/null | grep -i "minSdk\|min.sdk" || echo "Not found in standard locations"
# 2. Search for coreLibraryDesugaring configuration more thoroughly
echo -e "\n=== Checking for coreLibraryDesugaring configuration ==="
rg "coreLibraryDesugaring" --type=gradle --type=kts -A 2 -B 2 2>/dev/null
# 3. Check app/build.gradle.kts for actual config
echo -e "\n=== Checking app/build.gradle.kts content ==="
cat app/build.gradle.kts | head -100
# 4. Get complete list of Kotlin files to verify no org.threeten imports remain
echo -e "\n=== Total Kotlin files with time/date imports ==="
rg "import.*\.(time|date)" --type=kt -l | wc -lRepository: team-aliens/DMS-Android
Length of output: 3131
π Script executed:
#!/bin/bash
# Check core/network/build.gradle.kts in detail
echo "=== core/network/build.gradle.kts content ==="
cat core/network/build.gradle.kts 2>/dev/null
echo -e "\n=== Checking all build.gradle.kts for compileOptions ==="
rg "compileOptions\|coreLibraryDesugaring" -A 5 2>/dev/null
echo -e "\n=== Check if desugaring is in dependencies ==="
rg "desugar" 2>/dev/nullRepository: team-aliens/DMS-Android
Length of output: 1971
Add desugaring configuration to support java.time on minSdk 23.
The migration from ThreeTenBP to java.time.LocalDate is complete (no remaining backport imports), but the app will crash on API 23β25 devices due to missing desugaring configuration. Since java.time requires API 26+, add the following to app/build.gradle.kts:
-
Enable desugaring in
compileOptions:compileOptions { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 isCoreLibraryDesugaringEnabled = true } -
Add the desugaring dependency:
dependencies { coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.1") }
π€ Prompt for AI Agents
In
network/src/main/java/team/aliens/dms/android/network/meal/datasource/NetworkMealDataSourceImpl.kt
around line 3 the code now imports java.time.LocalDate but the project lacks
desugaring for java.time on minSdk 23; update app/build.gradle.kts to enable
core library desugaring by setting compileOptions.sourceCompatibility and
targetCompatibility to JavaVersion.VERSION_1_8 and
isCoreLibraryDesugaringEnabled = true, and add the coreLibraryDesugaring
dependency com.android.tools:desugar_jdk_libs:2.0.1 in the dependencies block so
java.time APIs work on API 23β25 devices.
|
|
||
| import com.google.gson.annotations.SerializedName | ||
| import org.threeten.bp.LocalDateTime | ||
| import java.time.LocalDateTime |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π§© Analysis chain
π Script executed:
# Check for the file and verify the import change
find . -name "FetchOutingApplicationDetailsResponse.kt" -type f | head -5
# Search for GsonBuilder configuration in the codebase
rg -n "GsonBuilder|registerTypeAdapter.*LocalDateTime|registerTypeAdapter.*java.time" --type=kotlin --type=java -C 3
# Search for build.gradle files
fd -e gradle | head -20Repository: team-aliens/DMS-Android
Length of output: 1783
π Script executed:
# Read the full HttpClientFactories.kt file to see Gson configuration
cat -n core/network/src/main/java/team/aliens/dms/android/core/network/util/HttpClientFactories.kt
# Search for build.gradle files
find . -name "build.gradle*" -type f | grep -E "(app|core|network)" | head -10Repository: team-aliens/DMS-Android
Length of output: 2675
π Script executed:
# Check app/build.gradle.kts for coreLibraryDesugaring and minSdk
head -100 ./app/build.gradle.kts
# Check core/network/build.gradle.kts
cat ./core/network/build.gradle.kts
# Search for coreLibraryDesugaring in all build files
rg -n "coreLibraryDesugaring|minSdk" -A 2 -B 2Repository: team-aliens/DMS-Android
Length of output: 11422
Add Gson TypeAdapters for java.time.LocalDateTime and enable coreLibraryDesugaring.
The codebase has two critical issues preventing proper deserialization of network responses with LocalDateTime fields:
- GsonBuilder in HttpClientFactories.kt (lines 26-31) does not register TypeAdapters for java.time types, causing Gson deserialization to fail at runtime.
- minSdk is set to 23, below API 26 where java.time is available. Enable coreLibraryDesugaring in build.gradle to provide java.time support on older devices, or register custom TypeAdapters for LocalDateTime serialization.
|
|
||
| import com.google.gson.annotations.SerializedName | ||
| import org.threeten.bp.DayOfWeek | ||
| import java.time.DayOfWeek |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π§© Analysis chain
π Script executed:
# Find the target file and examine it
find . -type f -name "FetchRemainsApplicationTimeResponse.kt" 2>/dev/null | head -5Repository: team-aliens/DMS-Android
Length of output: 175
π Script executed:
#!/bin/bash
# Read the target file
echo "=== FetchRemainsApplicationTimeResponse.kt ==="
cat ./network/src/main/java/team/aliens/dms/android/network/remains/model/FetchRemainsApplicationTimeResponse.kt
echo -e "\n=== Searching for build.gradle files ==="
find . -name "build.gradle*" -type f | head -10
echo -e "\n=== Checking network module build.gradle for minSdk and desugaring ==="
find ./network -name "build.gradle*" -type f -exec cat {} \;
echo -e "\n=== Searching for Gson configuration ==="
rg -i "gsonbuilder|typeadapter|gson.*java\.time|javatime" --type kotlin --type java -A 3 | head -50Repository: team-aliens/DMS-Android
Length of output: 4920
π Script executed:
#!/bin/bash
# Find version catalog
echo "=== Finding version catalog ==="
find . -name "*.toml" -o -name "gradle.properties" | head -5
# Read the version catalog
echo -e "\n=== Version catalog content (searching for minSdk) ==="
find . -name "*.toml" -exec grep -l "minSdk" {} \;
# Check app/build.gradle.kts for desugaring
echo -e "\n=== app/build.gradle.kts content ==="
cat ./app/build.gradle.kts | grep -A 20 -B 5 "coreLibrary\|compileOptions\|minSdk" | head -50
# Read full HttpClientFactories.kt
echo -e "\n=== Full HttpClientFactories.kt ==="
wc -l ./core/network/src/main/java/team/aliens/dms/android/core/network/util/HttpClientFactories.kt
# Read HttpClientFactories.kt focusing on Gson setup
echo -e "\n=== HttpClientFactories.kt Gson configuration ==="
cat ./core/network/src/main/java/team/aliens/dms/android/core/network/util/HttpClientFactories.kt
# Search for custom type adapters for java.time or DayOfWeek
echo -e "\n=== Searching for custom DayOfWeek/java.time type adapters ==="
find . -type f \( -name "*.kt" -o -name "*.java" \) -exec grep -l "DayOfWeek.*Adapter\|TypeAdapter.*DayOfWeek\|JsonDeserializer.*DayOfWeek" {} \;
# Check buildSrc for version catalog
echo -e "\n=== buildSrc structure ==="
find ./buildSrc -type f | head -20Repository: team-aliens/DMS-Android
Length of output: 3873
π Script executed:
#!/bin/bash
# Read version catalog for minSdk
echo "=== gradle/libs.versions.toml (minSdk) ==="
grep -A 5 -B 5 "minSdk" ./gradle/libs.versions.toml
# Read ProjectProperties
echo -e "\n=== buildSrc ProjectProperties.kt ==="
cat ./buildSrc/src/main/kotlin/ProjectProperties.kt
# Read Versions.kt
echo -e "\n=== buildSrc Versions.kt ==="
cat ./buildSrc/src/main/kotlin/Versions.kt
# Final check: search for coreLibraryDesugaring anywhere
echo -e "\n=== Searching for coreLibraryDesugaring in entire project ==="
rg -i "corelibrary" --type gradle --type kotlin
# Check if there are any other Gson adapters registered
echo -e "\n=== Searching for all type adapter registrations ==="
rg "registerTypeAdapter|registerTypeAdapterFactory" --type kotlin --type javaRepository: team-aliens/DMS-Android
Length of output: 783
Gson configuration missing type adapters and Android API compatibility unresolved for java.time migration.
The migration from org.threeten.bp.DayOfWeek to java.time.DayOfWeek creates two critical runtime issues:
-
Gson serialization failure: By default, Gson does not support java.time types. The current GsonBuilder (HttpClientFactories.kt) has no registered type adapters for
DayOfWeek, causing deserialization to fail at runtime. Requires either customTypeAdapterimplementation or a library like gson-configuration. -
Android API compatibility: java.time was added to Android API level 26, but the app's minSdk is 23. To enable the use of these types when the minimum API is below 26, the Android Gradle plugin (4.0 or newer) requires that you enable "core library desugaring". No
coreLibraryDesugaringEnabledconfiguration found in the project.
This incomplete migration will cause crashes on API 23-25 devices and deserialization failures across all API levels. The project still depends on ThreeTenBP, indicating broader migration inconsistencies.
| package team.aliens.dms.android.network.voting.apiservice | ||
|
|
||
| import org.threeten.bp.LocalDate | ||
| import java.time.LocalDate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π§© Analysis chain
π Script executed:
#!/bin/bash
# Verify Android compatibility and Retrofit java.time serialization setup
echo "=== Checking Android minSdk and desugaring configuration ==="
find . -name "*.gradle" -o -name "*.gradle.kts" | head -20 | xargs grep -n -A2 -B2 'minSdk\|coreLibraryDesugaring' 2>/dev/null || echo "No matches found in gradle files"
echo -e "\n=== Checking Retrofit java.time converter configuration ==="
find . -name "*.kt" -o -name "*.java" | xargs grep -n -C3 'JavaTimeConverterFactory\|GsonJavaTimeAdapters\|ScalarsConverterFactory\|registerModule.*Time\|LocalDate.*Converter' 2>/dev/null | head -50 || echo "No converter config found"
echo -e "\n=== Checking for any remaining org.threeten.bp imports ==="
find . -name "*.kt" -o -name "*.java" | xargs grep -n 'import org\.threeten\.bp' 2>/dev/null || echo "No ThreeTenBP imports found"
echo -e "\n=== Checking VotingApiService.kt specifically ==="
find . -name "VotingApiService.kt" -exec cat {} \;Repository: team-aliens/DMS-Android
Length of output: 7630
π Script executed:
#!/bin/bash
# Find actual minSdk value and Retrofit setup
echo "=== Finding minSdk actual value ==="
grep -r "minSdk\s*=" . --include="*.kt" --include="*.kts" | grep -E "ProjectProperties|libs.versions|=" | head -5
echo -e "\n=== Finding ProjectProperties file ==="
find . -name "ProjectProperties.kt" -o -name "ProjectProperties.java" -exec cat {} \;
echo -e "\n=== Checking gradle/libs.versions.toml for minSdk ==="
find . -name "libs.versions.toml" -o -name "gradle.properties" | xargs grep -n "minSdk\|MIN_SDK" 2>/dev/null
echo -e "\n=== Looking for Retrofit Okhttp client/interceptor setup ==="
find . -type f \( -name "*.kt" -o -name "*.java" \) | xargs grep -l "OkHttpClient\|Retrofit.Builder" 2>/dev/null | head -10
echo -e "\n=== Checking how Retrofit is configured with serialization ==="
find . -type f \( -name "*Retrofit*" -o -name "*Network*" \) \( -name "*.kt" -o -name "*.java" \) | head -10 | xargs cat 2>/dev/nullRepository: team-aliens/DMS-Android
Length of output: 18076
π Script executed:
#!/bin/bash
# Check HttpClientModule for converter factory setup
echo "=== Checking HttpClientModule.kt ==="
find . -name "HttpClientModule.kt" -exec cat {} \;
echo -e "\n=== Checking for compileOptions/coreLibraryDesugaring in all gradle files ==="
find . -name "*.gradle.kts" | xargs grep -n "compileOptions\|coreLibraryDesugar" 2>/dev/null | head -20
echo -e "\n=== Checking if there's a Retrofit.Builder with addConverterFactory ==="
find . -type f \( -name "*.kt" -o -name "*.java" \) | xargs grep -n "addConverterFactory\|Retrofit.Builder" 2>/dev/null | head -20Repository: team-aliens/DMS-Android
Length of output: 4422
π Script executed:
#!/bin/bash
# Check full HttpClientFactories.kt for converter setup
echo "=== Full HttpClientFactories.kt content ==="
cat ./core/network/src/main/java/team/aliens/dms/android/core/network/util/HttpClientFactories.kt
echo -e "\n=== Check compileOptions details to see if desugaring is enabled ==="
grep -A 5 "compileOptions" ./network/build.gradle.ktsRepository: team-aliens/DMS-Android
Length of output: 2178
Fix Android API compatibility and Retrofit LocalDate serialization.
The migration to java.time.LocalDate introduces two issues that require fixes:
-
Android API compatibility: With minSdk = 23, java.time.LocalDate is unsupported on Android 6.0-7.1 devices. Either enable
coreLibraryDesugaringincompileOptionsor raise minSdk to 26+. -
Retrofit query parameter serialization: The Gson configuration in
HttpClientFactories.ktlacks LocalDate support. AddJavaTimeModuleto the GsonBuilder or configure a custom date format to ensure LocalDate parameters serialize correctly in the/students/step/candidate-listendpoint (VotingApiService.kt, line 44).
π€ Prompt for AI Agents
In
network/src/main/java/team/aliens/dms/android/network/voting/apiservice/VotingApiService.kt
around lines 3 and 44 and in the Gson setup (HttpClientFactories.kt), LocalDate
usage breaks on minSdk=23 and wonβt serialize as Retrofit query params; either
enable coreLibraryDesugaring in module build.gradle (compileOptions ->
coreLibraryDesugaringEnabled true and add desugaring dependency) or raise minSdk
to 26+, and update your Gson configuration to support java.time by registering
JavaTimeModule (or add a custom LocalDate serializer/deserializer/format) so
LocalDate query parameters (e.g., the candidate-list endpoint) are serialized
correctly by Retrofit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 7
β»οΈ Duplicate comments (2)
feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/model/DmsPointCotent.kt (1)
1-1: Filename typo: rename file toDmsPointContent.kt.The filename contains a typo:
DmsPointCotent.ktshould beDmsPointContent.ktto match the class name.data/src/main/java/team/aliens/dms/android/data/meal/repository/MealRepositoryImpl.kt (1)
16-20: LGTM! Critical bug from previous review is now fixed.The
recoverCatchingpattern correctly replaces the failed database query result with the network update result. This addresses the issue whereonFailurewas not propagating the successful recovery.
π§Ή Nitpick comments (3)
feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/model/DmsPointCotent.kt (1)
86-89: Specify explicit size for the icon Image.The
Imagecomposable lacks a size modifier, which may lead to inconsistent icon sizing. Consider adding an explicit size for better UI consistency.π Suggested fix
Image( + modifier = Modifier.size(24.dp), painter = painterResource(icon), contentDescription = null, )You'll also need to import:
import androidx.compose.foundation.layout.sizecore/ui/src/dev/java/team/aliens/dms/android/core/ui/util/Localize.kt (1)
5-13: Consider using Android string resources for internationalization.The hardcoded Korean strings prevent supporting multiple languages. For a production app that may need internationalization, consider using Android's string resource system (e.g.,
strings.xml) with locale-specific resource directories (e.g.,values-ko/,values-en/) instead of hardcoding strings.However, since this file is in the
/dev/source set, if it's intended only for development builds with Korean as the sole language, this approach may be acceptable.π Example implementation using string resources
In
res/values-ko/strings.xml:<string name="monday">μμμΌ</string> <string name="tuesday">νμμΌ</string> <!-- ... other days ... -->Then modify the function to accept a Context or use a string provider pattern to retrieve localized strings.
feature/src/dev/kotlin/team/aliens/dms/android/feature/meal/component/DateChip.kt (1)
34-34: Consider using DateTimeFormatter for consistent date formatting.The current string interpolation approach produces dates like "2025.1.5" for single-digit months/days. If you need zero-padded formatting (e.g., "2025.01.05"), consider using
DateTimeFormatter:val formatter = DateTimeFormatter.ofPattern("yyyy.M.d (${date.dayOfWeek.toLocale()})") text = date.format(formatter)Or, for a simpler pattern without the weekday in the formatter:
val formatter = DateTimeFormatter.ofPattern("yyyy.M.d") text = "${date.format(formatter)} (${date.dayOfWeek.toLocale()})"Note: If the current format (without leading zeros) is intentional for your design, this suggestion can be ignored.
π Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
π Files selected for processing (8)
app/build.gradle.ktsapp/src/dev/AndroidManifest.xmlapp/src/dev/kotlin/team/aliens/dms/android/app/DmsApp.ktcore/ui/src/dev/java/team/aliens/dms/android/core/ui/util/Localize.ktdata/src/main/java/team/aliens/dms/android/data/meal/repository/MealRepositoryImpl.ktfeature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/model/DmsPointCotent.ktfeature/src/dev/kotlin/team/aliens/dms/android/feature/meal/component/DateChip.ktgradle/libs.versions.toml
π§° Additional context used
𧬠Code graph analysis (1)
data/src/main/java/team/aliens/dms/android/data/meal/repository/MealRepositoryImpl.kt (2)
data/src/main/java/team/aliens/dms/android/data/meal/repository/MealRepository.kt (1)
updateMeal(10-10)feature/src/prod/kotlin/team/aliens/dms/android/feature/main/home/HomeViewModel.kt (1)
updateMeal(67-86)
β° 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). (1)
- GitHub Check: build
π Additional comments (6)
app/src/dev/AndroidManifest.xml (3)
5-9: Verify the necessity of CAMERA permission for the home screen feature.The CAMERA permission is a sensitive permission that requires careful justification. Since this PR implements a home screen feature, it's unclear why camera access is needed at this stage.
Additionally, ensure that dangerous permissions (CAMERA and POST_NOTIFICATIONS on API 33+) are properly requested at runtime with appropriate user-facing rationale, not just declared in the manifest.
34-39: EnsureDmsMessagingServiceproperly validates intents and handles messages securely.The Firebase Messaging service configuration is correct. The
android:exported="true"attribute is required for Firebase Cloud Messaging to deliver messages to your service. However, exported services are security-sensitiveβverify thatDmsMessagingServicevalidates incoming intents and handles all messages safely, as other apps can potentially invoke this service.
41-46: Verify that the referenced resources exist.Ensure that the string resource
default_notification_channel_idand color resourceprimaryare defined in the appropriate resource files to avoid build failures.data/src/main/java/team/aliens/dms/android/data/meal/repository/MealRepositoryImpl.kt (1)
22-26: Address unsafe null-handling inupdateMeal.The
!!operator at line 25 throws a genericNullPointerExceptionif no meal matches the date. Use a domain-specific exception for clarity:- }.find { it.date == date }!! + }.find { it.date == date } ?: throw CannotFindMealException()Verify how
updateMeal()is called throughout the codebase, particularly inHomeViewModel. Since the function returnsResult<Meal>, callers wrapping it in additionalrunCatchingblocks would incorrectly receiveResult<Result<Meal>>.app/build.gradle.kts (1)
147-147: Dependency is correctly added.The
coreLibraryDesugaringdependency is properly configured. However, ensure that desugaring is enabled for all flavors that will usejava.timeAPIs (see comment on lines 38-41).app/src/dev/kotlin/team/aliens/dms/android/app/DmsApp.kt (1)
128-145: Well-structured navigation implementation.The migration from
MainScreenNavto the new navigation structure (HomeScreenNav,ApplicationScreenNav,MyPageScreenNav,MealScreenNav) is properly implemented. Each route is correctly wired with appropriate navigation callbacks, and the back stack management logic appropriately clears main screens before navigating to a new bottom bar destination.
|
|
||
| compileOptions { | ||
| isCoreLibraryDesugaringEnabled = true | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enable desugaring for prod flavor as well.
Desugaring is only enabled for the dev flavor, but the coreLibraryDesugaring dependency is added globally (Line 147). Since the PR migrates to java.time APIs and minSdk = 23 (API 23 < 26), the prod build will crash at runtime when using java.time classes without desugaring.
π Proposed fix to enable desugaring for prod flavor
create("prod") {
dimension = "environment"
buildConfigField("String", "ENVIRONMENT", "\"prod\"")
+
+ compileOptions {
+ isCoreLibraryDesugaringEnabled = true
+ }
}Committable suggestion skipped: line range outside the PR's diff.
π€ Prompt for AI Agents
In app/build.gradle.kts around lines 38 to 41, desugaring is enabled only for
the dev flavor but the coreLibraryDesugaring dependency is added globally,
causing prod builds to crash when using java.time on minSdk 23; enable
desugaring for prod by moving or adding isCoreLibraryDesugaringEnabled = true to
a global compileOptions block under android (or add the same flag inside the
prod flavor block) so both flavors use core library desugaring.
| modifier = Modifier | ||
| .navigationBarsPadding() | ||
| .systemBarsPadding(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π οΈ Refactor suggestion | π Major
Remove redundant padding modifier.
Both navigationBarsPadding() and systemBarsPadding() are applied to the NavDisplay. Since systemBarsPadding() already includes padding for both status bars and navigation bars, the navigationBarsPadding() call is redundant.
π Proposed fix
NavDisplay(
modifier = Modifier
- .navigationBarsPadding()
.systemBarsPadding(),π 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.
| modifier = Modifier | |
| .navigationBarsPadding() | |
| .systemBarsPadding(), | |
| modifier = Modifier | |
| .systemBarsPadding(), |
π€ Prompt for AI Agents
In app/src/dev/kotlin/team/aliens/dms/android/app/DmsApp.kt around lines 102 to
104, the NavDisplay modifier applies both navigationBarsPadding() and
systemBarsPadding(), which is redundant because systemBarsPadding() already
includes navigation bar insets; remove the navigationBarsPadding() call and
leave only systemBarsPadding() on the modifier so the component still receives
status and navigation bar padding without duplication.
| Text( | ||
| text = "${date.year}.${date.monthValue}.${date.dayOfMonth} (${date.dayOfWeek.toLocale()})", | ||
| style = DmsTheme.typography.bodyB, | ||
| color = DmsTheme.colorScheme.onPrimaryContainer, | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add accessibility semantics for screen reader support.
The DateChip lacks a content description, which impacts users relying on screen readers. Add a semantics modifier to provide proper accessibility context.
π Proposed fix to add accessibility support
+import androidx.compose.ui.semantics.contentDescription
+import androidx.compose.ui.semantics.semantics
+
@Composable
internal fun DateChip(
modifier: Modifier = Modifier,
date: LocalDate,
) {
+ val dateDescription = "${date.year}λ
${date.monthValue}μ ${date.dayOfMonth}μΌ ${date.dayOfWeek.toLocale()}"
+
Row(
modifier = modifier
.wrapContentWidth()
+ .semantics { contentDescription = dateDescription }
.background(
color = DmsTheme.colorScheme.background,
shape = CircleShape,
)π 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.
| Text( | |
| text = "${date.year}.${date.monthValue}.${date.dayOfMonth} (${date.dayOfWeek.toLocale()})", | |
| style = DmsTheme.typography.bodyB, | |
| color = DmsTheme.colorScheme.onPrimaryContainer, | |
| ) | |
| import androidx.compose.ui.semantics.contentDescription | |
| import androidx.compose.ui.semantics.semantics | |
| @Composable | |
| internal fun DateChip( | |
| modifier: Modifier = Modifier, | |
| date: LocalDate, | |
| ) { | |
| val dateDescription = "${date.year}λ ${date.monthValue}μ ${date.dayOfMonth}μΌ ${date.dayOfWeek.toLocale()}" | |
| Row( | |
| modifier = modifier | |
| .wrapContentWidth() | |
| .semantics { contentDescription = dateDescription } | |
| .background( | |
| color = DmsTheme.colorScheme.background, | |
| shape = CircleShape, | |
| ) | |
| ) { | |
| Text( | |
| text = "${date.year}.${date.monthValue}.${date.dayOfMonth} (${date.dayOfWeek.toLocale()})", | |
| style = DmsTheme.typography.bodyB, | |
| color = DmsTheme.colorScheme.onPrimaryContainer, | |
| ) | |
| } | |
| } |
π€ Prompt for AI Agents
In
feature/src/dev/kotlin/team/aliens/dms/android/feature/meal/component/DateChip.kt
around lines 33β37, the Text composable lacks accessibility semantics for screen
readers; add a Modifier.semantics block supplying a clear contentDescription
(e.g. the same formatted date string used in the Text, including localized
day-of-week) and import androidx.compose.ui.semantics.semantics and
androidx.compose.ui.semantics.contentDescription so assistive technologies read
the date; ensure you apply the modifier to the Text (or the parent) and keep the
description concise and localized.
| lifecycle = "2.7.0" | ||
| material = "1.11.0" | ||
| materialCompose = "1.3.2" | ||
| composeCalendar = "2.6.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update library versions to current stable releases.
Kizitonwose calendar compose latest is 2.9.0 (code shows 2.6.0), desugar_jdk_libs should be 2.0.3 for AGP 7.4+, kotlinx-datetime current version is 0.7.1 with breaking changes from 0.6.x, and kotlinx-collections-immutable should be 0.4.0. No known security advisories were found, but newer versions provide bug fixes and improved compatibility.
π€ Prompt for AI Agents
In gradle/libs.versions.toml around line 23, update outdated dependency
versions: change composeCalendar from 2.6.0 to 2.9.0, desugar_jdk_libs to 2.0.3,
kotlinx-datetime to 0.7.1 and kotlinx-collections-immutable to 0.4.0; after
bumping kotlinx-datetime note it has breaking changes from 0.6.x so adjust any
datetime API usages accordingly (imports, constructors, and function names) to
match 0.7.1.
There was a problem hiding this 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
β»οΈ Duplicate comments (1)
gradle/libs.versions.toml (1)
23-23: Address the outdated dependency versions flagged in previous review.The previous review already identified that several dependencies need updating to their latest stable versions. Please refer to the existing comment for details on composeCalendar, kotlinxDatetime, and kotlinx-collections-immutable.
Also applies to: 52-53, 92-93, 119-120
π§Ή Nitpick comments (6)
feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/ui/HomeScreen.kt (2)
51-56: Wrap the gradient inrememberto avoid reallocation on recomposition.The radial gradient is created on every recomposition, causing unnecessary allocations since it never changes.
π Proposed fix
- val gradient = Brush.radialGradient( - colors = listOf( - Color(0xFF002051).copy(alpha = 0.2f), - Color(0xFF0F6EFE).copy(alpha = 0.2f), - ) - ) + val gradient = remember { + Brush.radialGradient( + colors = listOf( + Color(0xFF002051).copy(alpha = 0.2f), + Color(0xFF0F6EFE).copy(alpha = 0.2f), + ) + ) + }
59-73: Extract hardcoded Korean strings to string resources for localization.The user-facing messages "κ°λ°μ€μΈ κΈ°λ₯μ΄μμ" are hardcoded and will not support localization or easy updates.
π Recommended approach
Add the string to
strings.xml:<string name="feature_under_development">κ°λ°μ€μΈ κΈ°λ₯μ΄μμ</string>Then reference it in the code (you'll need to pass a
Contextor use a string resource holder pattern in your architecture):// Example if using a resources provider onShowSnackBar( DmsSnackBarType.SUCCESS, stringResource(R.string.feature_under_development) )app/src/dev/kotlin/team/aliens/dms/android/app/DmsApp.kt (4)
63-68: Bottom bar visibility logic is correct.The logic correctly shows the bottom bar only on main navigation screens (Home, Application, MyPage) and hides it on detail screens like Meal and authentication screens. The implementation properly excludes MealScreenNav from the bottom bar visibility list.
For slightly improved readability, consider renaming the variable to make the intent more explicit:
π Optional refactor for clarity
- val shouldShowBottomBar = currentScreen in listOf( + val isMainNavigationScreen = currentScreen in listOf( HomeScreenNav, ApplicationScreenNav, MyPageScreenNav, ) ... bottomBar = { - if (shouldShowBottomBar) { + if (isMainNavigationScreen) {
83-105: Scaffold padding properly applied, but check for redundancy.The Scaffold content padding is now correctly captured and applied to NavDisplay (lines 101, 104), which prevents content overlap with the bottom bar. This addresses a previous major issue.
However, the
navigationBarsPadding()modifier on line 105 might be redundant if the Scaffold is configured to handle window insets (which is the default in Material3). The Scaffold'spaddingValuestypically includes system bar insets.π Verify if navigationBarsPadding is needed
#!/bin/bash # Check if Scaffold is configured with edge-to-edge or window insets handling echo "Checking Scaffold windowInsets configuration:" rg -n -A5 "Scaffold\(" app/src/dev/kotlin/team/aliens/dms/android/app/DmsApp.kt # Check Material3 Scaffold defaults in the project echo -e "\nChecking MaterialTheme or Scaffold configuration:" rg -n "WindowInsets|edge.*to.*edge" --type=ktIf the Scaffold handles all insets, consider removing the explicit
navigationBarsPadding()to avoid potential double-padding.
88-96: Bottom bar navigation logic is functional but can be simplified.The navigation logic correctly removes previous main screens before adding the new destination, ensuring a clean back stack for bottom bar navigation.
The type checks using
iswork correctly, but for data objects, instance equality checks are more idiomatic and clearer:π Suggested simplification
onNavigate = { destination -> if (currentScreen != destination) { backStack.removeAll { - it is HomeScreenNav || - it is ApplicationScreenNav || - it is MyPageScreenNav + it in listOf(HomeScreenNav, ApplicationScreenNav, MyPageScreenNav) } backStack.add(destination) } }This is more concise and aligns with the pattern used at lines 64-68.
149-164: Consider using Scaffold's dedicated snackbarHost parameter.The SnackbarHost is currently placed as content within the Scaffold. While this works, Material3's Scaffold provides a dedicated
snackbarHostparameter designed for this purpose, which ensures proper z-ordering, positioning, and material design compliance.π Recommended: Use Scaffold's snackbarHost parameter
Scaffold( + snackbarHost = { + SnackbarHost( + hostState = appState.snackBarHostState, + snackbar = { + val visuals = it.visuals as? DmsSnackBarVisuals ?: return@SnackbarHost + DmsSnackBar( + snackBarType = visuals.snackBarType, + message = visuals.message, + ) + }, + ) + }, bottomBar = { if (shouldShowBottomBar) { BottomNavigationBar( currentScreen = currentScreen, onNavigate = { destination -> if (currentScreen != destination) { backStack.removeAll { it is HomeScreenNav || it is ApplicationScreenNav || it is MyPageScreenNav } backStack.add(destination) } } ) } } ) { paddingValues -> NavDisplay( modifier = Modifier .padding(paddingValues) .navigationBarsPadding(), backStack = backStack, onBack = { backStack.removeLastOrNull() }, entryProvider = entryProvider { // ... entries }, ) - Box { - SnackbarHost( - modifier = Modifier - .statusBarsPadding() - .padding(top = 16.dp) - .align(Alignment.Center), - hostState = appState.snackBarHostState, - snackbar = { - val visuals = it.visuals as? DmsSnackBarVisuals ?: return@SnackbarHost - DmsSnackBar( - snackBarType = visuals.snackBarType, - message = visuals.message, - ) - }, - ) - } }This approach:
- Follows Material Design guidelines
- Ensures proper z-ordering with FABs and other elements
- Automatically handles positioning and animations
- Simplifies the layout structure
Note: If custom positioning is required (centered at top as currently implemented), you can still customize the snackbarHost while keeping it in the proper parameter.
π Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
π Files selected for processing (4)
app/src/dev/kotlin/team/aliens/dms/android/app/DmsApp.ktfeature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/ui/HomeScreen.ktfeature/src/dev/kotlin/team/aliens/dms/android/feature/signin/ui/SigninScreen.ktgradle/libs.versions.toml
π§° Additional context used
𧬠Code graph analysis (2)
app/src/dev/kotlin/team/aliens/dms/android/app/DmsApp.kt (5)
app/src/dev/kotlin/team/aliens/dms/android/app/BottomNavigationBar.kt (1)
BottomNavigationBar(33-84)feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/navigation/HomeRoute.kt (1)
HomeRoute(7-18)feature/src/dev/kotlin/team/aliens/dms/android/feature/main/application/navigation/ApplicationRoute.kt (1)
ApplicationRoute(7-10)feature/src/dev/kotlin/team/aliens/dms/android/feature/main/mypage/navigation/MyPageRoute.kt (1)
MyPageRoute(7-10)feature/src/dev/kotlin/team/aliens/dms/android/feature/meal/navigation/MealRoute.kt (1)
MealRoute(6-13)
feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/ui/HomeScreen.kt (5)
feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/model/HomeTopAppBar.kt (1)
HomeTopAppBar(19-48)feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/model/AnnouncementButton.kt (1)
AnnouncementButton(23-61)feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/model/MealContent.kt (1)
MealContent(30-76)feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/model/DmsPointCotent.kt (1)
DmsPointContent(25-71)core/design-system/src/dev/java/team/aliens/dms/android/core/designsystem/button/DmsItemButton.kt (1)
DmsItemButton(31-81)
β° 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). (1)
- GitHub Check: build
π Additional comments (7)
feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/ui/HomeScreen.kt (1)
86-142: LGTM! Well-structured Compose UI.The UI composition follows Compose best practices with proper state management, modifier usage, and scrollable content. The layout hierarchy and spacing are well-organized.
gradle/libs.versions.toml (2)
42-42: Verify that dropping Android 6.0 support is intentional.Increasing
minSdkfrom 23 to 24 removes support for Android 6.0 (Marshmallow). Confirm this breaking change is intentional and, if so, ensure it's documented in release notes or migration guides.
44-44: LGTM: Desugar JDK libs version is appropriate.Version 2.0.3 is correct for the AGP 8.9.1 in use.
Also applies to: 119-119
app/src/dev/kotlin/team/aliens/dms/android/app/DmsApp.kt (2)
41-50: LGTM: Navigation keys properly defined.The new navigation keys (HomeScreenNav, MealScreenNav, ApplicationScreenNav, MyPageScreenNav) are correctly defined as serializable data objects, following the navigation3 pattern used throughout the app.
129-146: LGTM: Navigation routes properly wired.All routes are correctly implemented with appropriate navigation callbacks:
- HomeRoute navigates to MealScreenNav (line 132)
- MealRoute uses
removeLastOrNull()for safe back navigation (line 144)- Main navigation screens (Home, Application, MyPage) are properly registered
The use of
removeLastOrNull()addresses the previous concern about potential crashes fromremoveLast()on an empty stack.feature/src/dev/kotlin/team/aliens/dms/android/feature/signin/ui/SigninScreen.kt (2)
36-37: Padding utilities successfully migrated to design system.The
horizontalPaddingandtopPaddingextension functions are properly defined incore.designsystemand correctly imported in the file. No remaining legacy imports fromcore.uifor padding utilities were found across the codebase.
55-55: LGTM: Updated to use new sideEffect API.The side effect collection has been updated from
effectFlowtosideEffect, consistent with the ViewModel API changes mentioned in the summary.Verify that the base ViewModel class supports the
sideEffectproperty and all ViewModels have been migrated:#!/bin/bash # Description: Verify sideEffect API is defined and consistently used # Find the base ViewModel definition echo "Checking BaseStateViewModel for sideEffect property:" ast-grep --pattern 'val sideEffect' # Check for any remaining uses of old effectFlow API echo -e "\nChecking for old effectFlow usages:" rg -n "\.effectFlow\s*\." --type=kt
| firebaseBom = "33.0.0" | ||
| firebaseMessaging = "24.0.0" | ||
| googleServices = "4.4.1" | ||
| googleServices = "4.4.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update Google Services plugin to the latest version.
The Google Services plugin version 4.4.2 is outdated. The latest stable version is 4.4.4, which should be used instead.
π€ Prompt for AI Agents
In gradle/libs.versions.toml at line 11, the googleServices version is pinned to
4.4.2; update that value to "4.4.4" to use the latest stable Google Services
plugin, save the file, and run a Gradle sync/build to verify there are no
compatibility issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
π§Ή Nitpick comments (1)
feature/src/dev/kotlin/team/aliens/dms/android/feature/meal/ui/MealScreen.kt (1)
59-59: Consider clarifying the constant name or adding documentation.
MAX_CALENDAR_COUNT = 366suggests calendar days, but the HorizontalPager cycles through 3 meal types (BREAKFAST, LUNCH, DINNER), not 366 distinct items. The value provides a large page pool for bidirectional scrolling, but the name-purpose relationship is unclear. Consider renaming toMAX_PAGER_COUNTor adding a comment explaining that this provides the paging pool for meal type cycling.
π Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
π Files selected for processing (1)
feature/src/dev/kotlin/team/aliens/dms/android/feature/meal/ui/MealScreen.kt
π§° Additional context used
𧬠Code graph analysis (1)
feature/src/dev/kotlin/team/aliens/dms/android/feature/meal/ui/MealScreen.kt (6)
core/design-system/src/prod/java/team/aliens/dms/android/core/designsystem/Modal.kt (1)
ModalBottomSheet(16-46)feature/src/dev/kotlin/team/aliens/dms/android/feature/meal/component/DateChip.kt (1)
DateChip(18-39)feature/src/dev/kotlin/team/aliens/dms/android/feature/meal/viewmodel/MealViewModel.kt (1)
getProperMeal(101-105)core/design-system/src/dev/java/team/aliens/dms/android/core/designsystem/button/DmsIconButton.kt (1)
DmsIconButton(17-40)feature/src/dev/kotlin/team/aliens/dms/android/feature/main/home/model/MealContent.kt (1)
MealContent(30-76)core/design-system/src/dev/java/team/aliens/dms/android/core/designsystem/button/DmsItemButton.kt (1)
DmsItemButton(31-81)
β° 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). (1)
- GitHub Check: build
π Additional comments (1)
feature/src/dev/kotlin/team/aliens/dms/android/feature/meal/ui/MealScreen.kt (1)
88-96: Verify edge case handling for rapid page transitions.The LaunchedEffect tracks page changes and calls
setNextMealTypeorsetPreviousMealTypebased on direction. This assumes sequential navigation (one page at a time). If the user swipes multiple pages rapidly or ifanimateScrollToPageis interrupted, the logic might not correctly track the meal type transitions.Consider testing rapid swipes and verifying that
currentCardTypestays synchronized with the displayed meal type. You may want to calculate the meal type directly from the page offset rather than tracking direction.
| HorizontalPager( | ||
| modifier = Modifier | ||
| .fillMaxWidth(), | ||
| state = pagerState, | ||
| ) { page -> | ||
| val mealPage = page + getProperMeal().ordinal | ||
| val cardType = when (mealPage % 3) { | ||
| 0 -> MealCardType.BREAKFAST | ||
| 1 -> MealCardType.LUNCH | ||
| else -> MealCardType.DINNER | ||
| } | ||
| Image( | ||
| modifier = Modifier | ||
| .fillMaxWidth() | ||
| .size(200.dp) | ||
| .align(Alignment.Center), | ||
| painter = painterResource(cardType.iconRes), | ||
| contentDescription = null, | ||
| ) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix state synchronization issue in pager icon calculation.
The pager uses getProperMeal().ordinal (line 181) to calculate which meal icon to display. According to the relevant code snippets, getProperMeal() reads now.hour to determine the meal type based on current time. This creates a logic inconsistency:
- The ViewModel manages
currentCardTypethrough user navigation (setNextMealType/setPreviousMealType) - The pager icons are rendered based on
getProperMeal()which reads current time, independent of ViewModel state - If the current time changes while the user is viewing the screen (e.g., crossing from morning to afternoon), the icon calculation changes, causing unexpected behavior
- The displayed icons may not match the ViewModel's
currentCardType, violating the single source of truth principle
The ViewModel's currentCardType should be the authoritative source for determining which meal type is displayed. Consider refactoring to calculate the page offset from currentCardType instead of getProperMeal().
π Suggested refactor
Instead of using getProperMeal().ordinal in the pager item composition, calculate the offset based on the initial proper meal (computed once) or pass the offset from the parent composable based on state.currentCardType:
// In Meal composable, calculate initial offset once
val initialMealOffset = remember { getProperMeal().ordinal }
// Pass to MealScreen
MealScreen(
initialMealOffset = initialMealOffset,
// ... other params
)
// In MealScreen's HorizontalPager
HorizontalPager(
// ...
) { page ->
val mealPage = page + initialMealOffset
val cardType = when (mealPage % 3) {
0 -> MealCardType.BREAKFAST
1 -> MealCardType.LUNCH
else -> MealCardType.DINNER
}
// ...
}Alternatively, compute the icon to display directly from currentCardType and the page offset relative to the current page.
π€ Prompt for AI Agents
In feature/src/dev/kotlin/team/aliens/dms/android/feature/meal/ui/MealScreen.kt
around lines 176β195, the pager computes mealPage using getProperMeal().ordinal
which reads current time and can change independently of the ViewModel, causing
state desync; instead derive the pager offset from a single source of truth (the
ViewModel's currentCardType) or compute the initial offset once and pass it in
(e.g., remember initialMealOffset = getProperMeal().ordinal in the parent and
pass into MealScreen) so the pager uses that stable offset or
state.currentCardType.ordinal to calculate mealPage; update the HorizontalPager
calculation to use the provided initial offset or the ViewModel value and remove
direct calls to getProperMeal() to ensure icons follow the ViewModel navigation
state.
| internal enum class MealCardType( | ||
| val title: String, | ||
| @DrawableRes val iconRes: Int, | ||
| ) { | ||
| BREAKFAST( | ||
| title = "μμΉ¨", | ||
| iconRes = R.drawable.img_morning, | ||
| ), | ||
| LUNCH( | ||
| title = "μ μ¬", | ||
| iconRes = R.drawable.img_launch, | ||
| ), | ||
| DINNER( | ||
| title = "μ λ ", | ||
| iconRes = R.drawable.img_dinner, | ||
| ), | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π§© Analysis chain
π Script executed:
# Find drawable resources in the repository
find . -type f \( -name "*.png" -o -name "*.jpg" -o -name "*.webp" -o -name "*.xml" \) -path "*/drawable*" | head -30Repository: team-aliens/DMS-Android
Length of output: 1799
π Script executed:
# Search for references to img_launch and img_lunch in the codebase
rg "img_lunch|img_launch" -iRepository: team-aliens/DMS-Android
Length of output: 184
Line 248: Drawable resource name appears to be a typo.
The LUNCH enum value references R.drawable.img_launch, which is likely a typo for R.drawable.img_lunch. The naming pattern across other meal types (img_morning, img_dinner) and the enum structure (BREAKFAST, LUNCH, DINNER) suggests the resource should be img_lunch to match the meal type.
LUNCH(
title = "μ μ¬",
- iconRes = R.drawable.img_launch,
+ iconRes = R.drawable.img_lunch,
),π 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.
| internal enum class MealCardType( | |
| val title: String, | |
| @DrawableRes val iconRes: Int, | |
| ) { | |
| BREAKFAST( | |
| title = "μμΉ¨", | |
| iconRes = R.drawable.img_morning, | |
| ), | |
| LUNCH( | |
| title = "μ μ¬", | |
| iconRes = R.drawable.img_launch, | |
| ), | |
| DINNER( | |
| title = "μ λ ", | |
| iconRes = R.drawable.img_dinner, | |
| ), | |
| } | |
| internal enum class MealCardType( | |
| val title: String, | |
| @DrawableRes val iconRes: Int, | |
| ) { | |
| BREAKFAST( | |
| title = "μμΉ¨", | |
| iconRes = R.drawable.img_morning, | |
| ), | |
| LUNCH( | |
| title = "μ μ¬", | |
| iconRes = R.drawable.img_lunch, | |
| ), | |
| DINNER( | |
| title = "μ λ ", | |
| iconRes = R.drawable.img_dinner, | |
| ), | |
| } |
π€ Prompt for AI Agents
feature/src/dev/kotlin/team/aliens/dms/android/feature/meal/ui/MealScreen.kt
lines 238-254: the LUNCH enum references a likely-typo drawable
R.drawable.img_launch; change it to R.drawable.img_lunch to match naming
convention (img_morning, img_lunch, img_dinner); if img_lunch does not exist,
rename the drawable asset from img_launch to img_lunch or add a new img_lunch
resource and update any references accordingly.
κ°μ
μμ μ¬ν
μΆκ° λ‘ ν λ§
Summary by CodeRabbit
New Features
UI Components
Design & Icons
Notifications
Breaking Changes
βοΈ Tip: You can customize this high-level summary in your review settings.