Skip to content

[Fix] 디자인 피드백 반영, 수정#15

Merged
ParkSeongGeun merged 3 commits intodevfrom
fix/design-comment-14
Nov 5, 2025
Merged

[Fix] 디자인 피드백 반영, 수정#15
ParkSeongGeun merged 3 commits intodevfrom
fix/design-comment-14

Conversation

@ParkSeongGeun
Copy link
Copy Markdown
Contributor

@ParkSeongGeun ParkSeongGeun commented Nov 5, 2025

#14

개요

  • HomeView의 List를 ScrollView로 교체
  • HomeView에서 출력하는 정보 수정
  • HelpView Image 수정 -> '<' 버튼을 일부러 조금 내렸습니다! 타이틀에 가려지더라고요.

스크린샷

2개 이하의 버스 2개 이상 Help Page
스크린샷, 2025-11-05 오후 1 53 06 스크린샷, 2025-11-05 오후 1 52 27 스크린샷, 2025-11-05 오후 1 53 54

Summary by CodeRabbit

  • New Features

    • Added Bluetooth connectivity for courtesy seat notifications on buses.
    • Integrated location-based discovery of nearby bus stops.
    • Added real-time bus arrival information display.
    • Added onboarding and help documentation features.
  • Improvements

    • Redesigned home screen interface and user interactions.
    • Updated visual assets and app branding.
  • Tests

    • Added comprehensive unit test suite for location and bus stop services.
  • Chores

    • Updated app configuration and system permissions setup.
    • Refreshed app icons and image assets.

@ParkSeongGeun ParkSeongGeun self-assigned this Nov 5, 2025
@ParkSeongGeun ParkSeongGeun changed the base branch from main to dev November 5, 2025 04:55
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Nov 5, 2025

Caution

Review failed

Failed to post review comments

Walkthrough

This PR refactors the project structure, adds Bluetooth integration for courtesy seat notifications, implements location and bus services for nearby stop discovery with real-time arrivals, restructures presentation views into a new folder organization, adds comprehensive unit tests, and configures the iOS app with required permissions and API credentials in Info.plist.

Changes

Cohort / File(s) Summary
Project Configuration
.gitignore, ComfortableMove/.gitignore, ComfortableMove/ComfortableMove.xcodeproj/project.pbxproj
Added .xcconfig to root gitignore; created comprehensive macOS/Xcode/SPM/CocoaPods gitignore; added test target ComfortableMoveTest with build phases, configurations, product references, and integrated into main target dependencies.
Application Configuration
ComfortableMove/ComfortableMove/App/Sources/AppConfig.swift, ComfortableMove/ComfortableMove/Info.plist
Added AppConfig.swift with API_KEY global constant from Info.plist; updated Info.plist with API keys (API_KEY, BUS_SERVICE_UUID, RX_CHARACTERISTIC_UUID, TX_CHARACTERISTIC_UUID, DEVICE_NAME_PREFIX, COURTESY_SEAT_MESSAGE), location/Bluetooth usage descriptions, and NSAppTransportSecurity with NSAllowsArbitraryLoads.
Bluetooth Infrastructure
ComfortableMove/ComfortableMove/Core/Manager/Bluetooth/BluetoothConfig.swift, ComfortableMove/ComfortableMove/Core/Manager/Bluetooth/BluetoothManager.swift
Added BluetoothConfig struct with static UUID and string configuration loaded from Info.plist, busNumber parsing/device name generation utilities; added BluetoothManager class to scan, discover, connect peripherals, and send courtesy seat messages via BLE with timeout and error handling.
Location and Bus Services
ComfortableMove/ComfortableMove/Core/Manager/LocationManager.swift, ComfortableMove/ComfortableMove/Core/Manager/BusStopService.swift, ComfortableMove/ComfortableMove/Core/Manager/BusArrivalService.swift, ComfortableMove/ComfortableMove/Core/Manager/APIManager.swift
Added LocationManager wrapper around CLLocationManager for location updates with permission handling; added BusStopService singleton to fetch nearby stations from external API; added BusArrivalService singleton to fetch real-time bus arrivals; added empty APIManager scaffold.
Data Models
ComfortableMove/ComfortableMove/Core/Model/BusStop.swift, ComfortableMove/ComfortableMove/Core/Model/BusArrivalResponse.swift, ComfortableMove/ComfortableMove/Core/Model/StationByPosResponse.swift, ComfortableMove/ComfortableMove/Core/Model/StopWithRoutes.swift
Added BusStop model with distance calculation; added BusArrivalResponse, MsgHeader, MsgBody, BusArrivalItem, and BusRouteType enum with route classification and color/display name utilities; added StationByPosResponse with StationMsgBody and StationItem models; added StopWithRoutes model with nested RouteInfo.
View Restructuring
Deleted: ComfortableMove/ComfortableMove/Core/Home/BusNumberRow.swift, ComfortableMove/ComfortableMove/Core/Home/HomeView.swift, ComfortableMove/ComfortableMove/Core/Splash/OnBoardingView.swift
Added: ComfortableMove/ComfortableMove/Core/Presentation/Home/HomeView.swift, ComfortableMove/ComfortableMove/Core/Presentation/Splash/OnBoardingView.swift, ComfortableMove/ComfortableMove/Core/Presentation/Splash/SplashView.swift, ComfortableMove/ComfortableMove/Core/Presentation/Help/HelpPageView.swift, ComfortableMove/ComfortableMove/Core/Presentation/Help/InfoView.swift
Relocated HomeView and OnBoardingView to new Presentation folder structure; removed BusNumberRow; new HomeView integrates location discovery, bus arrivals, route selection, and Bluetooth courtesy seat notification; new OnBoardingView implements multi-page TabView-based onboarding with permissions shortcuts; added HelpPageView modal overlay and InfoView for app information; changed SplashView background color.
Asset Catalogs
ComfortableMove/ComfortableMove/App/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json, ComfortableMove/ComfortableMove/App/Resources/Assets.xcassets/Image/*/Contents.json (HelpImage, HomeTitle, InfoImage, bluetooth, buttonImage, buttonTappedImage, distance imagesets)
Updated AppIcon asset filenames (AppLogo.png → app_logo.png and variants); added new image asset definitions for HelpImage, HomeTitle, InfoImage, bluetooth, buttonImage, buttonTappedImage, distance with corresponding 1x/2x/3x scale variants.
Unit Tests
ComfortableMove/ComfortableMoveTest/LocationManagerTests.swift, ComfortableMove/ComfortableMoveTest/BusStopManagerTests.swift
Added LocationManagerTests covering initial state, location callbacks, refresh behavior, and error handling; added BusStopManagerTests covering state initialization, nearest stop discovery, consistency across multiple searches, distinct location handling, and performance measurement.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant HomeView
    participant LocationManager
    participant BusStopService
    participant BusArrivalService
    participant BluetoothManager
    participant BLE_Device

    User->>HomeView: Tap Select Route
    HomeView->>LocationManager: Request Location Permission
    LocationManager->>User: Show Permission Alert
    User->>LocationManager: Allow Permission
    LocationManager->>HomeView: onLocationUpdate(location)
    HomeView->>BusStopService: getNearbyStations(location, radius: 500m)
    BusStopService->>HomeView: Return [StationItem]
    HomeView->>BusArrivalService: getStationArrivalInfo(arsId)
    BusArrivalService->>HomeView: Return [BusArrivalItem]
    HomeView->>User: Display Nearest Stop + Routes
    User->>HomeView: Select Bus Route
    HomeView->>User: Show Confirmation Alert
    User->>HomeView: Confirm Courtesy Seat Notification
    HomeView->>BluetoothManager: sendCourtesySeatNotification(busNumber)
    BluetoothManager->>BluetoothManager: Scan for Peripherals (timeout: 10s)
    BluetoothManager->>BLE_Device: Discover Services
    BluetoothManager->>BLE_Device: Discover Characteristics
    BluetoothManager->>BLE_Device: Write Courtesy Seat Message (RX Characteristic)
    BLE_Device->>BluetoothManager: Write Success
    BluetoothManager->>HomeView: completion(true)
    HomeView->>User: Show Success Alert
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

  • High logic density in new services: BusStopService and BusArrivalService implement network API integration with error handling and response parsing; requires validation of API contract adherence and error handling paths.
  • BluetoothManager complexity: Manages BLE lifecycle (scan, discover, connect, write) with timeout and state transitions; concurrent state management and delegate callbacks require careful review for race conditions and memory leaks.
  • View restructuring and integration: New HomeView combines location, bus, and Bluetooth managers with complex state management (selectedRoute, loading flags, alerts); refactoring from old location requires verifying functionality preservation.
  • Model mapping logic: BusRouteType.from(busNumber:) contains conditional logic for route type inference; StationByPosResponse and BusArrivalResponse decode from external APIs requiring codec validation.
  • Heterogeneous changes: Mix of infrastructure (project config, test target), network/Bluetooth services, model definitions, view restructuring, and unit tests demands separate reasoning per area.

Areas requiring extra attention:

  • BluetoothManager delegate callbacks and memory management: Verify peripheral/central lifecycle, strong reference cycles, and proper cleanup on disconnect/timeout.
  • BusArrivalService and BusStopService URL construction: Validate API endpoint correctness, parameter encoding, and error handling for network failures.
  • HomeView state coordination: Multiple published properties (location, routes, arrivals, Bluetooth state) and UI updates; verify state consistency and avoid race conditions.
  • BusRouteType.from(busNumber:): Test edge cases for number parsing, special prefixes (N for nocturnal), and fallback logic.
  • Test coverage gaps: Verify BusStopManagerTests and LocationManagerTests adequately cover error paths and edge cases.

Possibly related PRs

Suggested reviewers

  • jinny3824

Poem

🐰 Busses await with courtesy seats so fine,
Bluetooth whispers cross the wireless line,
Locations dance with stops both near and far,
New views restructured, shining like a star!
Tests verify the journey, bold and true.

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The PR title '[Fix] 디자인 피드백 반영, 수정' (Design feedback reflected, fixed) is vague and generic, using non-specific terms like '수정' (fixed) without clearly conveying the primary design changes. Provide a more specific title that clearly describes the main design changes, such as '[Fix] Replace HomeView List with ScrollView and update Help page design' or similar concise phrasing.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/design-comment-14

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.

@ParkSeongGeun ParkSeongGeun merged commit a13179e into dev Nov 5, 2025
1 check was pending
@ParkSeongGeun ParkSeongGeun deleted the fix/design-comment-14 branch November 5, 2025 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant