Repository navigation
[feat/#69] 알림 기능 서버 연동 (조회/삭제/읽음) + 딥링크 이동 - #73
Conversation
- NotificationResponse: 알림 목록 조회 응답 DTO (서버 명세 1:1) - Notification: 도메인 모델 + type/deepLinkType enum(미정의 값 UNKNOWN 처리) - NotificationMapper: DTO→도메인 변환(createdAt OffsetDateTime 파싱)
- NotificationService: 알림 목록 조회(GET)·삭제(DELETE)·읽음(PATCH .../read) - NotificationServiceModule: Retrofit Service Hilt 제공
- NotificationRemoteDataSource(+Impl): Service를 감싸 데이터 접근 추상화 - NotificationDataSourceModule: 구현체 바인딩
- NotificationRepository(+Impl): DataSource 결과를 도메인 모델로 변환해 ViewModel에 전달 - 조회는 DTO→Notification 매핑, 삭제·읽음은 성공 여부 체크 - NotificationRepositoryModule: 구현체 바인딩
- NotificationViewModel: 더미 제거, NotificationRepository로 목록 조회 - 카드 클릭 시 읽음 처리(멱등, 로컬 선반영 후 서버 반영) - 삭제 시 서버 호출, 404(이미 삭제)는 성공과 동일 처리 - Contract: OnItemClick 이벤트 + NotificationItem에 딥링크 필드(matchId/teamIds/deepLinkType) 추가 - 카드 onClick 연결, isHttpNotFound 헬퍼 추가
- OnItemClick: 읽음 처리 후 deepLinkType에 맞춰 홈 펍 화면으로 이동 - TODAY_PUBS·NEARBY_PUBS=오늘 요일, TOMORROW_GAME=내일 요일 businessDay 계산(KST) - teamIds(홈+원정)+businessDay를 홈 savedStateHandle로 전달해 펍 필터 적용 - UNKNOWN deepLinkType은 이동하지 않음
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: swyp-5th-team9/android/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (18)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthrough알림 조회, 읽음 처리, 삭제를 위한 API와 데이터 계층을 추가했습니다. ViewModel은 서버 알림을 상태로 관리합니다. 알림 클릭은 읽음 처리와 딥링크 이동으로 연결되며, 펍 필터 정보를 홈 화면에 전달합니다. Changes알림 API 연동
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~30 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant NotificationScreen
participant NotificationViewModel
participant NotificationRepository
participant NotificationService
participant MainScreen
NotificationScreen->>NotificationViewModel: 알림 카드 클릭
NotificationViewModel->>NotificationRepository: 읽음 처리 및 딥링크 계산
NotificationRepository->>NotificationService: PATCH /api/v1/notifications/{notificationId}/read
NotificationViewModel-->>NotificationScreen: NavigateToPubs(teamIds, businessDay)
NotificationScreen->>MainScreen: 펍 이동 콜백 전달
MainScreen->>MainScreen: Home savedStateHandle에 필터 저장
Merge Risk: ⚪ Minimal · up to The notification API and navigation integration appears mergeable with normal checks. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Out of Scope Changes checkExplanation 이슈
✨ Finishing Touches 💡 1📝 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 |
Related issue
Closes #69
작업 내용
알림 기능 서버 연동(조회/삭제/읽음) + 딥링크 이동을 데이터 레이어부터 붙였습니다.
데이터 레이어 (DTO → Service → DataSource → Repository)
NotificationResponse(DTO): 서버 명세 1:1 (notificationId/matchId/teamIds/type/title/content/createdAt/isRead/deepLinkType)Notification(도메인 모델) +NotificationType/NotificationDeepLinkTypeenum — 미정의 값은UNKNOWN처리NotificationMapper: DTO → 도메인 (createdAt을OffsetDateTime으로 파싱)NotificationService:GET /notifications,DELETE /notifications/{id},PATCH /notifications/{id}/readNotificationRemoteDataSource(+Impl)/NotificationRepository(+Impl)+ Hilt 모듈 3종ViewModel 연동
NotificationRepository로 실목록 조회404(이미 삭제)는 성공과 동일하게 목록에서 제거 (isHttpNotFound헬퍼 추가)isRead선반영 후 서버 반영 (멱등)딥링크 이동
카드 클릭 → 읽음 처리 →
deepLinkType별 홈 펍 화면으로 이동 + 필터 적용TODAY_PUBS/NEARBY_PUBS→ 오늘 요일,TOMORROW_GAME→ 내일 요일 (businessDayKST 기준 계산)teamIds(경기 홈+원정) +businessDay를 홈savedStateHandle로 전달 (펍 필터 결과 전달과 동일 메커니즘)UNKNOWN은 이동하지 않음참고 / 후속
NEARBY_PUBS의 "내 위치 중심" GPS 센터링은 미구현(현재 오늘요일+teamIds 필터만)createdAt표기 규칙은 기획 확정 전까지 "M월 d일"