Skip to content

Feat: 대중교통, 자가용 선택 기능 구현 - #190

Merged
dogmania merged 17 commits into
developfrom
feat/#189-general-transfortation-type
Jun 5, 2026
Merged

Feat: 대중교통, 자가용 선택 기능 구현#190
dogmania merged 17 commits into
developfrom
feat/#189-general-transfortation-type

Conversation

@dogmania

@dogmania dogmania commented Jun 5, 2026

Copy link
Copy Markdown
Member

이슈 번호

작업내용

  • 서버에서 추가된 transportType을 일정 응답 모델에 반영
  • Schedule 및 로컬 DB에 교통수단 정보를 저장하도록 SQLDelight schema/migration 추가
  • 홈/알람/AlarmKit 경로 안내에서 저장된 교통수단 기준으로 지도 앱이 열리도록 연결
  • TransportType.from() 공통 변환 로직을 추가해 응답/DB 파싱 중복 제거

Summary by CodeRabbit

Release Notes - v1.4.0

  • New Features
    • 경로 안내 시 교통수단을 선택할 수 있는 기능 추가 (대중교통/자가용)
    • 선택한 교통수단 정보가 일정에 자동 저장되어 재사용
    • 알림 및 지도 연동 시 선택된 교통수단에 맞는 경로 정보 제공

@dogmania dogmania self-assigned this Jun 5, 2026
@dogmania dogmania added the FEAT 새로운 기능 구현 label Jun 5, 2026
@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown

Review Change Stack

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 11.11% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목은 구현된 주요 변경사항(대중교통/자가용 선택 기능)을 명확하게 요약하고 있습니다.
Linked Issues check ✅ Passed PR의 모든 코드 변경사항이 이슈 #189의 요구사항을 충족합니다. 일정 생성 UI에 교통수단 선택 추가, 상태 모델 정의, 선택 이벤트 처리, 서버 요청 시 포함, 경로안내에 반영이 모두 구현되었습니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 이슈 #189 범위 내에 있습니다. 버전 업그레이드와 리소스 추가 등도 기능 구현에 필요한 변경입니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/#189-general-transfortation-type

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 06707c0 and 974a411.

⛔ Files ignored due to path filters (2)
  • core/design-system/src/commonMain/composeResources/drawable/ic_car.png is excluded by !**/*.png
  • core/design-system/src/commonMain/composeResources/drawable/ic_public_transport.png is excluded by !**/*.png
📒 Files selected for processing (49)
  • OnDotAlarmKitBridge/Sources/OnDotAlarmKitBridge/OnDotAlarmKitBridge.swift
  • composeApp/src/commonMain/kotlin/com/dh/ondot/core/DirectionsFacade.kt
  • core/bridge/src/commonMain/kotlin/com/ondot/bridge/DirectionsFacade.kt
  • core/design-system/src/commonMain/kotlin/com/ondot/designsystem/components/AlarmInfoItem.kt
  • core/design-system/src/commonMain/kotlin/com/ondot/designsystem/components/DateTimeInfoBar.kt
  • core/platform/src/androidMain/kotlin/com/ondot/platform/util/AndroidDirectionsOpener.kt
  • core/platform/src/iosMain/kotlin/com/ondot/platform/util/IosAlarmScheduler.kt
  • core/platform/src/iosMain/kotlin/com/ondot/platform/util/IosDirectionsOpener.kt
  • core/ui/src/commonMain/kotlin/com/ondot/ui/model/TransportInfo.kt
  • core/ui/src/commonMain/kotlin/com/ondot/ui/screen/placepicker/PlacePicker.kt
  • core/ui/src/commonMain/kotlin/com/ondot/ui/screen/placepicker/model/PlacePickerUiModel.kt
  • core/util/src/commonMain/kotlin/com/ondot/util/DefaultScheduleAlarmManager.kt
  • data/src/commonMain/kotlin/com/ondot/data/local/datasource/ScheduleLocalDataSourceImpl.kt
  • data/src/commonMain/kotlin/com/ondot/data/local/db/Mappers.kt
  • data/src/commonMain/kotlin/com/ondot/data/mapper/ScheduleDetailResponseMapper.kt
  • data/src/commonMain/kotlin/com/ondot/data/mapper/ScheduleListResponseMapper.kt
  • data/src/commonMain/kotlin/com/ondot/data/model/response/schedule/ScheduleDetailResponse.kt
  • data/src/commonMain/kotlin/com/ondot/data/model/response/schedule/ScheduleResponse.kt
  • data/src/commonMain/kotlin/com/ondot/data/model/response/schedule/mapper/ScheduleResponseMapper.kt
  • data/src/commonMain/sqldelight/com/dh/ondot/data/local/db/1.sqm
  • data/src/commonMain/sqldelight/com/dh/ondot/data/local/db/ScheduleEntity.sq
  • domain/src/commonMain/kotlin/com/ondot/domain/model/enums/TransportType.kt
  • domain/src/commonMain/kotlin/com/ondot/domain/model/request/CreateScheduleRequest.kt
  • domain/src/commonMain/kotlin/com/ondot/domain/model/schedule/Schedule.kt
  • domain/src/commonMain/kotlin/com/ondot/domain/model/schedule/ScheduleDetail.kt
  • domain/src/commonMain/kotlin/com/ondot/domain/model/ui/AlarmRingInfo.kt
  • domain/src/commonMain/kotlin/com/ondot/domain/service/DirectionsOpener.kt
  • domain/testing/src/commonMain/kotlin/com/ondot/testing/fake/FakeScheduleRepository.kt
  • domain/testing/src/commonMain/kotlin/com/ondot/testing/fake/util/FakeDirectionsOpener.kt
  • feature/alarm/src/commonMain/kotlin/com/ondot/alarm/AlarmViewModel.kt
  • feature/edit/src/commonMain/kotlin/com/ondot/edit/EditScheduleScreen.kt
  • feature/edit/src/commonMain/kotlin/com/ondot/edit/EditScheduleViewModel.kt
  • feature/everytime/src/commonMain/kotlin/com/ondot/everytime/contract/EverytimeIntent.kt
  • feature/everytime/src/commonMain/kotlin/com/ondot/everytime/contract/EverytimeViewModel.kt
  • feature/everytime/src/commonMain/kotlin/com/ondot/everytime/placepicker/EverytimePlacePickerScreen.kt
  • feature/general/src/commonMain/kotlin/com/ondot/general/GeneralScheduleViewModel.kt
  • feature/general/src/commonMain/kotlin/com/ondot/general/contract/GeneralScheduleIntent.kt
  • feature/general/src/commonMain/kotlin/com/ondot/general/contract/GeneralScheduleState.kt
  • feature/general/src/commonMain/kotlin/com/ondot/general/contract/GeneralScheduleViewModel.kt
  • feature/general/src/commonMain/kotlin/com/ondot/general/place/PlacePickerScreen.kt
  • feature/general/src/commonMain/kotlin/com/ondot/general/ui/place/PlacePickerRoute.kt
  • feature/main/src/commonMain/kotlin/com/ondot/main/home/HomeViewModel.kt
  • feature/main/src/commonTest/kotlin/com/ondot/main/home/HomeViewModelTest.kt
  • gradle.properties
  • iosApp/iosApp.xcodeproj/project.pbxproj
  • iosApp/iosApp/AlarmKitBridge/ONDAlarmKit.h
  • iosApp/iosApp/AlarmKitBridge/ONDAlarmKit.m
  • iosApp/iosApp/Util/AlarmKitBridgeShim.swift
  • iosApp/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

@dogmania
dogmania merged commit d0eed84 into develop Jun 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FEAT 새로운 기능 구현

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feat: 대중교통, 자가용 선택 기능 구현

1 participant