Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
기존 String 타입을 MealMenuItem(name, allergyIds)으로 변경하고 괄호 안의 알러지 번호를 파싱하는 로직 추가 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
DataStore 기반 알러지 선택 저장/조회 인프라 추가 (DataSource, Repository, UseCase, DI 바인딩) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
AllergiesViewModel 저장/로드 연동 및 MainScreen에서 알러지 음식 하이라이트 표시 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (13)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (10)
Walkthrough알레르기 설정 기능이 새로 추가되었습니다. DataStore 기반 로컬 선택 값 저장소와 도메인/데이터 레이어 바인딩, UI(알레르기 화면/카드) 및 메인·설정·위젯 연동이 포함되어 식단 항목에 알레르기 매핑이 적용됩니다. Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant SettingScreen as 설정 화면
participant AllergiesRoute as 알레르기 라우트
participant AllergiesViewModel as ViewModel
participant AllergyRepository as 저장소
participant LocalDataSource as DataSource
participant DataStore as DataStore
User->>SettingScreen: 알레르기 설정 클릭
SettingScreen->>AllergiesRoute: onAllergySettingClick
AllergiesRoute->>AllergiesViewModel: toggleAllergy(id)
AllergiesViewModel->>AllergyRepository: saveSelectedAllergyIds(ids)
AllergyRepository->>LocalDataSource: saveSelectedAllergyIds(ids)
LocalDataSource->>DataStore: 데이터 저장
AllergiesViewModel->>AllergiesRoute: 상태 갱신 (reduce)
AllergiesRoute->>User: UI 리렌더링 (선택 반영)
sequenceDiagram
participant MainActivity
participant MainViewModel as MainViewModel
participant GetSelectedAllergyIdsUseCase as UseCase
participant AllergyRepository as 저장소
participant LocalDataSource as DataSource
participant DataStore as DataStore
participant MainScreen as 메인 화면
MainActivity->>MainViewModel: 초기화
MainViewModel->>GetSelectedAllergyIdsUseCase: invoke()
GetSelectedAllergyIdsUseCase->>AllergyRepository: getSelectedAllergyIds()
AllergyRepository->>LocalDataSource: getSelectedAllergyIds()
LocalDataSource->>DataStore: 데이터 조회
loop Flow 구독
DataStore-->>LocalDataSource: 선택 ID 집합 방출
LocalDataSource-->>AllergyRepository: Flow 전달
AllergyRepository-->>GetSelectedAllergyIdsUseCase: Flow 전달
GetSelectedAllergyIdsUseCase-->>MainViewModel: 집합 수신
MainViewModel->>MainScreen: uiState 방출 (selectedAllergyIds 업데이트)
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 분 Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello, 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. Footnotes
|
There was a problem hiding this comment.
Code Review
이 PR은 사용자가 알레르기를 선택하고, 선택된 알레르기 정보를 급식 메뉴에서 하이라이트하는 새로운 알레르기 설정 기능을 추가합니다. DataStore를 이용한 데이터 영속성, Jetpack Compose를 사용한 UI, Orbit MVI를 통한 상태 관리를 포함하여 기능 구현이 포괄적입니다. 새로운 기능 모듈과 명확한 관심사 분리로 코드 구조가 잘 잡혀있습니다. 코드의 명확성과 안정성을 높이기 위해 ViewModel의 상태 관리 및 알레르기 ID 저장을 위한 자료구조 선택과 관련하여 몇 가지 개선 제안 사항이 있습니다.
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (8)
feature/allergies/src/main/java/khs/onmi/allergies/viewmodel/container/AllergiesSideEffect.kt (1)
4-4: 토스트 메시지 타입을 리소스 기반으로 추상화하는 것을 권장합니다.
String직결 방식은 지역화 확장 시 비용이 커질 수 있어,messageResId또는 공용UiText타입으로 전환해두면 유지보수가 쉬워집니다.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@feature/allergies/src/main/java/khs/onmi/allergies/viewmodel/container/AllergiesSideEffect.kt` at line 4, The ShowToast side-effect currently carries a plain String (data class ShowToast(val message: String) : AllergiesSideEffect()), which hinders localization; change its payload to a resource-based abstraction (e.g., messageResId: Int or a shared UiText type) and update all places that construct or consume ShowToast (viewModel emission sites and UI observers) to pass and resolve the resource/UiText instead of raw strings; ensure the UI layer converts UiText or resource IDs to localized strings before showing the toast and update any tests/mocks to use the new type.domain/src/main/java/com/onmi/domain/repository/AllergyRepository.kt (1)
6-7: 선택 ID 컬렉션은Set<Int>계약을 고려해보세요.현재
List<Int>는 중복 저장 가능성이 열려 있어, 도메인 계약 자체로 유일성을 보장하면 상태/저장소 일관성이 좋아집니다.🔧 제안 예시
interface AllergyRepository { - fun getSelectedAllergyIds(): Flow<List<Int>> - suspend fun saveSelectedAllergyIds(ids: List<Int>) + fun getSelectedAllergyIds(): Flow<Set<Int>> + suspend fun saveSelectedAllergyIds(ids: Set<Int>) }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@domain/src/main/java/com/onmi/domain/repository/AllergyRepository.kt` around lines 6 - 7, Update the AllergyRepository contract to enforce uniqueness by changing the return and parameter types from List<Int> to Set<Int>: modify the interface methods getSelectedAllergyIds() to return Flow<Set<Int>> and saveSelectedAllergyIds(ids: Set<Int>); then update all implementations of AllergyRepository (and any classes referencing getSelectedAllergyIds or saveSelectedAllergyIds) to persist/emit Sets (or deduplicate incoming Lists to Sets inside implementations) and adjust callers to convert between List and Set as needed so domain-level uniqueness is guaranteed; target symbols: AllergyRepository, getSelectedAllergyIds, saveSelectedAllergyIds.data/src/main/java/com/onmi/data/datasource/LocalAllergyDataSource.kt (1)
6-7: 선택 ID는List<Int>보다Set<Int>가 의도를 더 잘 드러냅니다.현재 계약은 중복 ID 저장을 허용합니다. “선택 상태”라면 집합 타입이 더 안전하고 호출부 실수를 줄입니다.
🔧 제안 수정안
interface LocalAllergyDataSource { - fun getSelectedAllergyIds(): Flow<List<Int>> - suspend fun saveSelectedAllergyIds(ids: List<Int>) + fun getSelectedAllergyIds(): Flow<Set<Int>> + suspend fun saveSelectedAllergyIds(ids: Set<Int>) }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@data/src/main/java/com/onmi/data/datasource/LocalAllergyDataSource.kt` around lines 6 - 7, Change the API to use sets to express “selected” semantics: update the LocalAllergyDataSource contract methods getSelectedAllergyIds() to return Flow<Set<Int>> and saveSelectedAllergyIds(ids: Set<Int>), then update every implementation (repositories, DAOs, mappers, serializers) that implements or calls getSelectedAllergyIds/saveSelectedAllergyIds to convert between List and Set (deduplicate when reading/writing) and adjust persistence code (entities/TypeConverters) and unit tests accordingly so callers receive/submit a Set<Int> rather than a List<Int>.feature/allergies/src/main/java/khs/onmi/allergies/constant/AllergyConstants.kt (1)
14-32: 사용자 노출 문자열을 리소스로 분리하는 것을 권장합니다.알레르기명이 코드에 하드코딩되어 있어 다국어 대응/문구 변경 시 수정 범위가 커집니다. 문자열 리소스로 분리하면 관리가 훨씬 안정적입니다.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@feature/allergies/src/main/java/khs/onmi/allergies/constant/AllergyConstants.kt` around lines 14 - 32, The hardcoded allergy names in AllergyConstants.kt (the Allergy(...) enum/list entries such as Allergy(1, "난류", ...), Allergy(2, "우유", ...), etc.) should be moved to string resources; replace the raw Korean strings with resource lookups (e.g., use context.getString(R.string.allergy_egg) or pass a string resource id) and add corresponding entries in strings.xml for each unique allergy (allergy_egg, allergy_milk, ...), updating any constructors or consumers (e.g., the Allergy data class or enum factory methods) to accept/respect string resource ids or resolved strings so UI code displays localized text via Android resource APIs.feature/setting/src/main/java/khs/onmi/setting/screen/SettingRoute.kt (1)
54-57: 빠른 연속 탭 시 동일 화면이 백스택에 중복될 수 있습니다.
onAllergySettingClick에서navigate를 호출할 때launchSingleTop = true를 적용하면 사용자가 빠르게 연속으로 탭했을 때 동일한 목적지가 백스택에 중복되는 것을 방지할 수 있습니다.🔧 제안 수정안
onAllergySettingClick = { EventLogger.clickAllergySettingButton() - navController.navigate(ONMINavRoutes.ALLERGIES) + navController.navigate(ONMINavRoutes.ALLERGIES) { + launchSingleTop = true + } },🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@feature/setting/src/main/java/khs/onmi/setting/screen/SettingRoute.kt` around lines 54 - 57, The onAllergySettingClick handler currently calls EventLogger.clickAllergySettingButton() and navController.navigate(ONMINavRoutes.ALLERGIES) which can push duplicate entries on rapid taps; update the navigate call in onAllergySettingClick to use the NavController navigate overload with a NavOptionsBuilder and set launchSingleTop = true (i.e., navController.navigate(ONMINavRoutes.ALLERGIES) { launchSingleTop = true }) so repeated quick taps do not duplicate the same destination on the back stack.feature/main/src/main/java/khs/onmi/main/component/MealItem.kt (1)
45-52: 알레르기 매칭은Set기반 조회로 한 번 최적화해두는 것을 권장합니다.Line 51은 메뉴 아이템마다
List포함 검사(in)를 수행합니다. 선택 ID를 한 번Set으로 변환해두면 렌더링 경로에서 비용을 줄일 수 있습니다.♻️ 제안 수정안
+import androidx.compose.runtime.remember import com.onmi.domain.model.meal.MealMenuItem @@ fun MealsItem( @@ ) { + val selectedAllergyIdSet = remember(selectedAllergyIds) { selectedAllergyIds.toSet() } ONMITheme { color, typography -> @@ meals.forEach { meal -> MealItem( @@ - isAllergyFood = meal.allergyIds.any { it in selectedAllergyIds } + isAllergyFood = meal.allergyIds.any(selectedAllergyIdSet::contains) ) } } } }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@feature/main/src/main/java/khs/onmi/main/component/MealItem.kt` around lines 45 - 52, selectedAllergyIds is being checked with List membership inside the rendering loop causing repeated O(n) lookups; convert selectedAllergyIds to a Set once (e.g., selectedAllergyIdSet) before the meals.forEach loop and update the allergy match check used by MealItem (currently allergyIds.any { it in selectedAllergyIds }) to use the set (e.g., allergyIds.any { it in selectedAllergyIdSet } or allergyIds.any(selectedAllergyIdSet::contains) ) so each containment check is O(1).data/src/main/java/com/onmi/data/dto/meal/response/GetTodayMealsResponse.kt (1)
3-10: Data 레이어에서 Domain 모델 직접 참조
GetTodayMealsResponseDTO가MealMenuItemdomain 모델을 직접 import하고 있습니다. Clean Architecture 원칙에 따르면 data 레이어는 자체 모델을 가지고 domain으로 매핑하는 것이 이상적입니다.현재 이 DTO는 역직렬화되지 않고
MealDataSourceImpl에서 직접 생성되어 바로toModel()로 변환되므로 기능상 문제는 없습니다. 향후 리팩토링 시 고려해 주세요.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@data/src/main/java/com/onmi/data/dto/meal/response/GetTodayMealsResponse.kt` around lines 3 - 10, GetTodayMealsResponse가 data 계층에서 domain 모델 MealMenuItem을 직접 참조하고 있으니, 데이터 계층 전용 DTO 타입을 만들고 이를 domain 모델로 매핑하도록 변경하세요: 새 DTO(예: TodayMealItemDto / GetTodayMealsDto)를 정의하여 기존 GetTodayMealsResponse의 Pair<List<MealMenuItem>, String> 구조를 그대로 반영하고, MealDataSourceImpl에서 현재 사용 중인 GetTodayMealsResponse 대신 새 DTO를 생성·사용한 뒤 toModel() 또는 변환 함수(예: toDomainModel())를 구현해 DTO->domain(MealMenuItem)으로 변환하도록 교체하세요; 변경 대상 식별자: GetTodayMealsResponse, MealMenuItem, MealDataSourceImpl, toModel().feature/main/src/main/java/khs/onmi/main/component/MealsSection.kt (1)
86-90: Material 3에서Divider는 deprecated 되었습니다.
Divider를HorizontalDivider로 변경하세요. Material 3에서Divider는 더 이상 권장되지 않으며,HorizontalDivider가 직접 대체 컴포넌트입니다.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@feature/main/src/main/java/khs/onmi/main/component/MealsSection.kt` around lines 86 - 90, Replace the deprecated Divider usage in MealsSection.kt with the Material3 HorizontalDivider: locate the Divider(...) call (the one using thickness = 1.dp, color = color.UnselectedSecondary, modifier = Modifier.padding(vertical = 32.dp)) and change it to HorizontalDivider(...) preserving the same thickness, color and modifier arguments; also update/remove the old Divider import and add the Material3 HorizontalDivider import so the component resolves to androidx.compose.material3.HorizontalDivider (ensure color reference UnselectedSecondary still matches the Material3 color type).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@core/designsystem/src/main/java/khs/onmi/core/designsystem/component/Card.kt`:
- Around line 85-90: The Icon in Card.kt currently uses a fixed
contentDescription ("Allergies Icon") which harms accessibility; update the Icon
call that uses painterResource(id = iconId) (in the Card composable) to either
set contentDescription = null when the icon is purely decorative, or accept and
pass a localized/props-driven contentDescription parameter (e.g.,
iconContentDescription) so screen readers get the right, non-duplicative label;
ensure you update any callers of Card to provide the description when needed and
keep the tint/isSelected logic unchanged.
In
`@data/src/main/java/com/onmi/data/datasourceimpl/LocalAllergyDataSourceImpl.kt`:
- Around line 20-24: getSelectedAllergyIds() can crash if non-numeric values are
stored because it uses it.toInt(); update the mapping to safely parse ints using
toIntOrNull() and filter nulls (e.g., use mapNotNull) when transforming
prefs[SELECTED_ALLERGY_IDS] inside the Flow.map so invalid entries are ignored
and an empty list is returned if none are valid.
In
`@feature/allergies/src/main/java/khs/onmi/allergies/viewmodel/AllergiesViewModel.kt`:
- Around line 30-41: toggleAllergy currently calls
allergyRepository.saveSelectedAllergyIds(...) without error handling and even
uses state.selectedAllergyIds (old value) after reduce; wrap the save in a
try/catch, call save with the computed updatedIds (the variable inside reduce)
and on failure post a user-visible message (Toast) and revert the state to the
previous selectedAllergyIds (undo the change) — locate this logic in the
toggleAllergy function (intent/reduce block) and handle exceptions from
allergyRepository.saveSelectedAllergyIds accordingly.
In `@feature/main/src/main/java/khs/onmi/main/viewmodel/MainViewModel.kt`:
- Around line 38-41: collectAllergyIds currently calls
getSelectedAllergyIdsUseCase().collect without handling exceptions, so a bad
value (e.g., toInt() failure) can cancel the flow and stop future updates; fix
by adding a Flow.catch { e -> /* log e */ reduce { state.copy(selectedAllergyIds
= emptyList()) } } (or otherwise handle the error and provide a safe fallback)
before collect in collectAllergyIds, ensuring getSelectedAllergyIdsUseCase()
errors do not cancel the coroutine and selectedAllergyIds is updated to a safe
value via reduce.
---
Nitpick comments:
In `@data/src/main/java/com/onmi/data/datasource/LocalAllergyDataSource.kt`:
- Around line 6-7: Change the API to use sets to express “selected” semantics:
update the LocalAllergyDataSource contract methods getSelectedAllergyIds() to
return Flow<Set<Int>> and saveSelectedAllergyIds(ids: Set<Int>), then update
every implementation (repositories, DAOs, mappers, serializers) that implements
or calls getSelectedAllergyIds/saveSelectedAllergyIds to convert between List
and Set (deduplicate when reading/writing) and adjust persistence code
(entities/TypeConverters) and unit tests accordingly so callers receive/submit a
Set<Int> rather than a List<Int>.
In `@data/src/main/java/com/onmi/data/dto/meal/response/GetTodayMealsResponse.kt`:
- Around line 3-10: GetTodayMealsResponse가 data 계층에서 domain 모델 MealMenuItem을 직접
참조하고 있으니, 데이터 계층 전용 DTO 타입을 만들고 이를 domain 모델로 매핑하도록 변경하세요: 새 DTO(예:
TodayMealItemDto / GetTodayMealsDto)를 정의하여 기존 GetTodayMealsResponse의
Pair<List<MealMenuItem>, String> 구조를 그대로 반영하고, MealDataSourceImpl에서 현재 사용 중인
GetTodayMealsResponse 대신 새 DTO를 생성·사용한 뒤 toModel() 또는 변환 함수(예: toDomainModel())를
구현해 DTO->domain(MealMenuItem)으로 변환하도록 교체하세요; 변경 대상 식별자: GetTodayMealsResponse,
MealMenuItem, MealDataSourceImpl, toModel().
In `@domain/src/main/java/com/onmi/domain/repository/AllergyRepository.kt`:
- Around line 6-7: Update the AllergyRepository contract to enforce uniqueness
by changing the return and parameter types from List<Int> to Set<Int>: modify
the interface methods getSelectedAllergyIds() to return Flow<Set<Int>> and
saveSelectedAllergyIds(ids: Set<Int>); then update all implementations of
AllergyRepository (and any classes referencing getSelectedAllergyIds or
saveSelectedAllergyIds) to persist/emit Sets (or deduplicate incoming Lists to
Sets inside implementations) and adjust callers to convert between List and Set
as needed so domain-level uniqueness is guaranteed; target symbols:
AllergyRepository, getSelectedAllergyIds, saveSelectedAllergyIds.
In
`@feature/allergies/src/main/java/khs/onmi/allergies/constant/AllergyConstants.kt`:
- Around line 14-32: The hardcoded allergy names in AllergyConstants.kt (the
Allergy(...) enum/list entries such as Allergy(1, "난류", ...), Allergy(2, "우유",
...), etc.) should be moved to string resources; replace the raw Korean strings
with resource lookups (e.g., use context.getString(R.string.allergy_egg) or pass
a string resource id) and add corresponding entries in strings.xml for each
unique allergy (allergy_egg, allergy_milk, ...), updating any constructors or
consumers (e.g., the Allergy data class or enum factory methods) to
accept/respect string resource ids or resolved strings so UI code displays
localized text via Android resource APIs.
In
`@feature/allergies/src/main/java/khs/onmi/allergies/viewmodel/container/AllergiesSideEffect.kt`:
- Line 4: The ShowToast side-effect currently carries a plain String (data class
ShowToast(val message: String) : AllergiesSideEffect()), which hinders
localization; change its payload to a resource-based abstraction (e.g.,
messageResId: Int or a shared UiText type) and update all places that construct
or consume ShowToast (viewModel emission sites and UI observers) to pass and
resolve the resource/UiText instead of raw strings; ensure the UI layer converts
UiText or resource IDs to localized strings before showing the toast and update
any tests/mocks to use the new type.
In `@feature/main/src/main/java/khs/onmi/main/component/MealItem.kt`:
- Around line 45-52: selectedAllergyIds is being checked with List membership
inside the rendering loop causing repeated O(n) lookups; convert
selectedAllergyIds to a Set once (e.g., selectedAllergyIdSet) before the
meals.forEach loop and update the allergy match check used by MealItem
(currently allergyIds.any { it in selectedAllergyIds }) to use the set (e.g.,
allergyIds.any { it in selectedAllergyIdSet } or
allergyIds.any(selectedAllergyIdSet::contains) ) so each containment check is
O(1).
In `@feature/main/src/main/java/khs/onmi/main/component/MealsSection.kt`:
- Around line 86-90: Replace the deprecated Divider usage in MealsSection.kt
with the Material3 HorizontalDivider: locate the Divider(...) call (the one
using thickness = 1.dp, color = color.UnselectedSecondary, modifier =
Modifier.padding(vertical = 32.dp)) and change it to HorizontalDivider(...)
preserving the same thickness, color and modifier arguments; also update/remove
the old Divider import and add the Material3 HorizontalDivider import so the
component resolves to androidx.compose.material3.HorizontalDivider (ensure color
reference UnselectedSecondary still matches the Material3 color type).
In `@feature/setting/src/main/java/khs/onmi/setting/screen/SettingRoute.kt`:
- Around line 54-57: The onAllergySettingClick handler currently calls
EventLogger.clickAllergySettingButton() and
navController.navigate(ONMINavRoutes.ALLERGIES) which can push duplicate entries
on rapid taps; update the navigate call in onAllergySettingClick to use the
NavController navigate overload with a NavOptionsBuilder and set launchSingleTop
= true (i.e., navController.navigate(ONMINavRoutes.ALLERGIES) { launchSingleTop
= true }) so repeated quick taps do not duplicate the same destination on the
back stack.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 3480ad02-936a-4310-ae7d-5f5804465fda
📒 Files selected for processing (33)
.gitignorecore/designsystem/src/main/java/khs/onmi/core/designsystem/component/Card.ktcore/designsystem/src/main/java/khs/onmi/core/designsystem/icon/AllergiesIcon.ktdata/src/main/java/com/onmi/data/datasource/LocalAllergyDataSource.ktdata/src/main/java/com/onmi/data/datasourceimpl/LocalAllergyDataSourceImpl.ktdata/src/main/java/com/onmi/data/datasourceimpl/MealDataSourceImpl.ktdata/src/main/java/com/onmi/data/di/DataModule.ktdata/src/main/java/com/onmi/data/di/RepositoryModule.ktdata/src/main/java/com/onmi/data/dto/meal/response/GetTodayMealsResponse.ktdata/src/main/java/com/onmi/data/repository/AllergyRepositoryImpl.ktdomain/src/main/java/com/onmi/domain/model/meal/MealMenuItem.ktdomain/src/main/java/com/onmi/domain/model/meal/response/GetMealsResponseModel.ktdomain/src/main/java/com/onmi/domain/repository/AllergyRepository.ktdomain/src/main/java/com/onmi/domain/usecase/allergy/GetSelectedAllergyIdsUseCase.ktfeature/allergies/build.gradle.ktsfeature/allergies/src/main/java/khs/onmi/allergies/constant/AllergyConstants.ktfeature/allergies/src/main/java/khs/onmi/allergies/navigation/AllergiesNavigation.ktfeature/allergies/src/main/java/khs/onmi/allergies/screen/AllergiesRoute.ktfeature/allergies/src/main/java/khs/onmi/allergies/screen/AllergiesScreen.ktfeature/allergies/src/main/java/khs/onmi/allergies/viewmodel/AllergiesViewModel.ktfeature/allergies/src/main/java/khs/onmi/allergies/viewmodel/container/AllergiesSideEffect.ktfeature/allergies/src/main/java/khs/onmi/allergies/viewmodel/container/AllergiesState.ktfeature/main/src/main/java/khs/onmi/main/component/MealItem.ktfeature/main/src/main/java/khs/onmi/main/component/MealsSection.ktfeature/main/src/main/java/khs/onmi/main/screen/MainScreen.ktfeature/main/src/main/java/khs/onmi/main/viewmodel/MainViewModel.ktfeature/main/src/main/java/khs/onmi/main/viewmodel/container/MainState.ktfeature/root/build.gradle.ktsfeature/root/src/main/java/khs/onmi/root/MainActivity.ktfeature/setting/src/main/java/khs/onmi/setting/screen/SettingRoute.ktfeature/setting/src/main/java/khs/onmi/setting/screen/SettingScreen.ktfeature/widget/src/main/java/com/onmi/widget/util/WidgetDataDisplayManager.ktnavigation/src/main/java/khs/onmi/navigation/ONMINavRoutes.kt
💤 Files with no reviewable changes (1)
- core/designsystem/src/main/java/khs/onmi/core/designsystem/icon/AllergiesIcon.kt
- AllergiesViewModel: updatedIds를 reduce 외부에서 계산하여 레이스 컨디션 제거 - AllergiesViewModel: 저장 실패 시 이전 상태로 원복 및 Toast 표시 - LocalAllergyDataSourceImpl: toInt() → toIntOrNull() + mapNotNull로 크래시 방지 - MainViewModel: collectAllergyIds에 Flow.catch 추가로 코루틴 취소 방지 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
알러지 ID는 중복 불가 + 멤버십 체크가 주 용도이므로 Set이 의미적으로 적합하며 contains 연산이 O(1)로 개선됨 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- SettingRoute: 알러지 설정 navigate에 launchSingleTop 적용 - MealsSection: deprecated Divider를 HorizontalDivider로 교체 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
💡 개요
📃 작업내용
🔀 변경사항
2026-03-24.12.16.28.mov
🎸 기타
Summary by CodeRabbit