Feat: 대중교통, 자가용 선택 기능 구현 - #190
Conversation
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Tools execution failed with the following error: Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error) Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
iosApp/iosApp.xcodeproj/project.pbxproj (1)
573-573:⚠️ Potential issue | 🟠 Major | ⚡ Quick win위젯 확장의 버전 정보를 메인 앱과 동기화해야 합니다.
OnDotAlarmWidgetExtension타겟의 버전 정보가 업데이트되지 않았습니다. 메인 앱은 39/1.4.0으로 변경되었지만, 위젯 확장은 여전히 24/1.2.0으로 남아있습니다. App Store 제출 시 메인 앱과 임베디드 확장 간의 버전 불일치로 인해 거부될 수 있습니다.🔧 제안하는 수정
Debug 구성 (라인 573, 584):
- CURRENT_PROJECT_VERSION = 24; + CURRENT_PROJECT_VERSION = 39;- MARKETING_VERSION = 1.2.0; + MARKETING_VERSION = 1.4.0;Release 구성 (라인 605, 618):
- CURRENT_PROJECT_VERSION = 24; + CURRENT_PROJECT_VERSION = 39;- MARKETING_VERSION = 1.2.0; + MARKETING_VERSION = 1.4.0;Also applies to: 584-584, 605-605, 618-618
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@iosApp/iosApp.xcodeproj/project.pbxproj` at line 573, OnDotAlarmWidgetExtension의 빌드 설정에서 CURRENT_PROJECT_VERSION과 MARKETING_VERSION이 메인 앱과 달라 App Store 거부 위험이 있으니, OnDotAlarmWidgetExtension 타겟의 Debug 및 Release 구성(현재 나타난 CURRENT_PROJECT_VERSION = 24 등)을 찾아 CURRENT_PROJECT_VERSION을 39으로, MARKETING_VERSION을 1.4.0으로 업데이트하여 메인 앱(39 / 1.4.0)과 버전 정보를 동기화하세요.
🧹 Nitpick comments (1)
feature/main/src/commonTest/kotlin/com/ondot/main/home/HomeViewModelTest.kt (1)
417-438: ⚡ Quick win테스트가 기본 transportType에 고정돼 전달 경로 검증이 약합니다.
Line 438은
PUBLIC_TRANSPORT고정 검증이라, 전달 로직이 잘못되어도 기본값 때문에 통과할 수 있습니다. given에서CAR를 명시해 전달값을 검증하는 케이스로 바꾸는 편이 안전합니다.테스트 보강 예시
- val s1 = dummySchedule(id = 1L, hasPreparationNote = true, preparationAlarmEnabled = true) + val s1 = dummySchedule(id = 1L, hasPreparationNote = true, preparationAlarmEnabled = true) + .copy(transportType = TransportType.CAR) @@ - assertEquals(TransportType.PUBLIC_TRANSPORT, call.transportType) + assertEquals(TransportType.CAR, call.transportType)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@feature/main/src/commonTest/kotlin/com/ondot/main/home/HomeViewModelTest.kt` around lines 417 - 438, The test currently asserts a fixed TransportType.PUBLIC_TRANSPORT which can mask bugs; change the setup to create the schedule with the non-default transport (e.g., set transportType = TransportType.CAR on dummySchedule / s1) and then assert that directionsOpener.calls.first().transportType equals that transport value; update references in the test to use s1.transportType (or the explicit CAR) when calling openDirections(id = 1L) and in the final assert to verify the actual passed transport type rather than the hardcoded PUBLIC_TRANSPORT.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@domain/testing/src/commonMain/kotlin/com/ondot/testing/fake/FakeScheduleRepository.kt`:
- Around line 68-69: FakeScheduleRepository currently sets transportType on
creation but never persists or returns it in getScheduleDetail() and
editSchedule(), causing value loss; update the repository's in-memory model used
by createSchedule()/getScheduleDetail()/editSchedule() so that transportType
(created via TransportType.from(request.transportType)) is stored on the
Schedule object/record, returned by getScheduleDetail(), and overwritten on
editSchedule() when a new transportType is provided; ensure both the
create->read and edit->read code paths reference the same stored field so tests
at the creation and lines analogous to 173-174 observe consistent transportType
behavior.
In
`@feature/general/src/commonMain/kotlin/com/ondot/general/GeneralScheduleViewModel.kt`:
- Line 468: The request payload is using a hardcoded
TransportType.PUBLIC_TRANSPORT.name, so the user's selection isn't sent; in
GeneralScheduleViewModel replace the fixed value with the ViewModel's UI state
transport selection (e.g., the property that holds the user's chosen transport
in the schedule UI state or selectedTransport) when building the request for
creation, mapping it to the TransportType enum/name as needed and providing a
safe fallback if the UI value is null or invalid; update the reference where
transportType is set (currently TransportType.PUBLIC_TRANSPORT.name) to use that
UI state property instead.
---
Outside diff comments:
In `@iosApp/iosApp.xcodeproj/project.pbxproj`:
- Line 573: OnDotAlarmWidgetExtension의 빌드 설정에서 CURRENT_PROJECT_VERSION과
MARKETING_VERSION이 메인 앱과 달라 App Store 거부 위험이 있으니, OnDotAlarmWidgetExtension 타겟의
Debug 및 Release 구성(현재 나타난 CURRENT_PROJECT_VERSION = 24 등)을 찾아
CURRENT_PROJECT_VERSION을 39으로, MARKETING_VERSION을 1.4.0으로 업데이트하여 메인 앱(39 /
1.4.0)과 버전 정보를 동기화하세요.
---
Nitpick comments:
In `@feature/main/src/commonTest/kotlin/com/ondot/main/home/HomeViewModelTest.kt`:
- Around line 417-438: The test currently asserts a fixed
TransportType.PUBLIC_TRANSPORT which can mask bugs; change the setup to create
the schedule with the non-default transport (e.g., set transportType =
TransportType.CAR on dummySchedule / s1) and then assert that
directionsOpener.calls.first().transportType equals that transport value; update
references in the test to use s1.transportType (or the explicit CAR) when
calling openDirections(id = 1L) and in the final assert to verify the actual
passed transport type rather than the hardcoded PUBLIC_TRANSPORT.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b64cedc9-a15d-46be-9719-68ec8bae272c
⛔ Files ignored due to path filters (2)
core/design-system/src/commonMain/composeResources/drawable/ic_car.pngis excluded by!**/*.pngcore/design-system/src/commonMain/composeResources/drawable/ic_public_transport.pngis excluded by!**/*.png
📒 Files selected for processing (49)
OnDotAlarmKitBridge/Sources/OnDotAlarmKitBridge/OnDotAlarmKitBridge.swiftcomposeApp/src/commonMain/kotlin/com/dh/ondot/core/DirectionsFacade.ktcore/bridge/src/commonMain/kotlin/com/ondot/bridge/DirectionsFacade.ktcore/design-system/src/commonMain/kotlin/com/ondot/designsystem/components/AlarmInfoItem.ktcore/design-system/src/commonMain/kotlin/com/ondot/designsystem/components/DateTimeInfoBar.ktcore/platform/src/androidMain/kotlin/com/ondot/platform/util/AndroidDirectionsOpener.ktcore/platform/src/iosMain/kotlin/com/ondot/platform/util/IosAlarmScheduler.ktcore/platform/src/iosMain/kotlin/com/ondot/platform/util/IosDirectionsOpener.ktcore/ui/src/commonMain/kotlin/com/ondot/ui/model/TransportInfo.ktcore/ui/src/commonMain/kotlin/com/ondot/ui/screen/placepicker/PlacePicker.ktcore/ui/src/commonMain/kotlin/com/ondot/ui/screen/placepicker/model/PlacePickerUiModel.ktcore/util/src/commonMain/kotlin/com/ondot/util/DefaultScheduleAlarmManager.ktdata/src/commonMain/kotlin/com/ondot/data/local/datasource/ScheduleLocalDataSourceImpl.ktdata/src/commonMain/kotlin/com/ondot/data/local/db/Mappers.ktdata/src/commonMain/kotlin/com/ondot/data/mapper/ScheduleDetailResponseMapper.ktdata/src/commonMain/kotlin/com/ondot/data/mapper/ScheduleListResponseMapper.ktdata/src/commonMain/kotlin/com/ondot/data/model/response/schedule/ScheduleDetailResponse.ktdata/src/commonMain/kotlin/com/ondot/data/model/response/schedule/ScheduleResponse.ktdata/src/commonMain/kotlin/com/ondot/data/model/response/schedule/mapper/ScheduleResponseMapper.ktdata/src/commonMain/sqldelight/com/dh/ondot/data/local/db/1.sqmdata/src/commonMain/sqldelight/com/dh/ondot/data/local/db/ScheduleEntity.sqdomain/src/commonMain/kotlin/com/ondot/domain/model/enums/TransportType.ktdomain/src/commonMain/kotlin/com/ondot/domain/model/request/CreateScheduleRequest.ktdomain/src/commonMain/kotlin/com/ondot/domain/model/schedule/Schedule.ktdomain/src/commonMain/kotlin/com/ondot/domain/model/schedule/ScheduleDetail.ktdomain/src/commonMain/kotlin/com/ondot/domain/model/ui/AlarmRingInfo.ktdomain/src/commonMain/kotlin/com/ondot/domain/service/DirectionsOpener.ktdomain/testing/src/commonMain/kotlin/com/ondot/testing/fake/FakeScheduleRepository.ktdomain/testing/src/commonMain/kotlin/com/ondot/testing/fake/util/FakeDirectionsOpener.ktfeature/alarm/src/commonMain/kotlin/com/ondot/alarm/AlarmViewModel.ktfeature/edit/src/commonMain/kotlin/com/ondot/edit/EditScheduleScreen.ktfeature/edit/src/commonMain/kotlin/com/ondot/edit/EditScheduleViewModel.ktfeature/everytime/src/commonMain/kotlin/com/ondot/everytime/contract/EverytimeIntent.ktfeature/everytime/src/commonMain/kotlin/com/ondot/everytime/contract/EverytimeViewModel.ktfeature/everytime/src/commonMain/kotlin/com/ondot/everytime/placepicker/EverytimePlacePickerScreen.ktfeature/general/src/commonMain/kotlin/com/ondot/general/GeneralScheduleViewModel.ktfeature/general/src/commonMain/kotlin/com/ondot/general/contract/GeneralScheduleIntent.ktfeature/general/src/commonMain/kotlin/com/ondot/general/contract/GeneralScheduleState.ktfeature/general/src/commonMain/kotlin/com/ondot/general/contract/GeneralScheduleViewModel.ktfeature/general/src/commonMain/kotlin/com/ondot/general/place/PlacePickerScreen.ktfeature/general/src/commonMain/kotlin/com/ondot/general/ui/place/PlacePickerRoute.ktfeature/main/src/commonMain/kotlin/com/ondot/main/home/HomeViewModel.ktfeature/main/src/commonTest/kotlin/com/ondot/main/home/HomeViewModelTest.ktgradle.propertiesiosApp/iosApp.xcodeproj/project.pbxprojiosApp/iosApp/AlarmKitBridge/ONDAlarmKit.hiosApp/iosApp/AlarmKitBridge/ONDAlarmKit.miosApp/iosApp/Util/AlarmKitBridgeShim.swiftiosApp/iosApp/iOSApp.swift
💤 Files with no reviewable changes (2)
- feature/general/src/commonMain/kotlin/com/ondot/general/contract/GeneralScheduleState.kt
- feature/edit/src/commonMain/kotlin/com/ondot/edit/EditScheduleScreen.kt
이슈 번호
작업내용
transportType을 일정 응답 모델에 반영Schedule및 로컬 DB에 교통수단 정보를 저장하도록 SQLDelight schema/migration 추가TransportType.from()공통 변환 로직을 추가해 응답/DB 파싱 중복 제거Summary by CodeRabbit
Release Notes - v1.4.0