[Feat]: Navigation3 기반 전체 화면 라우팅 및 딥링크 처리 - #144
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
`androidx.navigation3`를 사용하여 앱의 전체 라우팅 구조를 설계하고, `todakun://` 커스텀 스킴을 통해 특정 화면으로 진입할 수 있는 딥링크 시스템을 구축한다. - `TodakunNavigator`: `NavBackStack`을 래핑하여 인증 상태에 따른 접근 제어, 탭 전환, 딥링크 내비게이션 및 폴백(알림함 이동) 로직을 캡슐화한다. - `DeepLinkParser`: `lucky-action`, `fortune/`, `chat/` 등 커스텀 스킴 기반의 URI를 `TodakunRoute`로 변환하는 파서를 구현하고 단위 테스트를 추가한다. - `MainActivity` 및 `TodakunApp`: 외부 `Intent` 및 FCM을 통해 들어오는 딥링크 이벤트를 수신하여 `NavDisplay`에 반영하며, 각 화면(Route)에 대한 진입점과 상태 복구(Decorator)를 설정한다. - 푸시 알림 연동: `TodakunFirebaseMessagingService`에서 백그라운드 알림 수신 시 딥링크를 포함한 `PendingIntent`를 생성하고, `NotificationViewModel`에서 알림 클릭 시 해당 링크로 이동하는 기능을 구현한다. - UI 및 기타: 바텀 내비게이션 가시성 제어 로직을 추가하고, `TodakunBottomNavigation`의 하단 그림자 클리핑 이슈를 수정한다. # Conflicts: # app/src/main/AndroidManifest.xml
HomeHeader의 알림 벨 아이콘을 알림함 화면으로 연결하고, #138 설계 결정 사항을 designs/issue-138-route.md로 남긴다.
로그인 및 온보딩 과정에서 발견된 로직 오류를 수정하고, 구현 단계 진입에 따라 관련 설계 문서를 정리합니다. - `LoginViewModel`: 신규 가입자(`newMember`)의 경우 로그인 시점에 즉시 메시징 토큰을 등록하지 않도록 로직 수정 - `TermsRoute`: 종료 확인 다이얼로그에서 '확인'과 '취소' 버튼의 동작이 반대로 매핑되어 있던 콜백 오류 수정 - `issue-138-route.md`: 전체 화면 라우팅 설계 문서 삭제 (설계 단계 종료)
`MainActivity`에서 `Flow`를 통해 비동기적으로 전달하던 딥링크 이벤트를 앱 진입 시점에 파싱된 `TodakunRoute`를 직접 전달하는 방식으로 개선합니다. 이를 통해 로그인 또는 인증이 필요한 상황에서 딥링크 대기 및 전환 로직을 보다 명확하게 관리합니다. - `MainActivity`의 `deepLinkEvents`(`SharedFlow`)를 제거하고, `handleDeepLinkIntent`에서 딥링크를 즉시 파싱하여 `TodakunApp`에 `TodakunRoute`로 전달 - `TodakunApp`에서 로그인(`onLoginSuccess`) 또는 인증 통과(`onAuthPass`) 시, 전달된 `deepLinkRoute`가 있을 경우 해당 경로로 이동하는 로직 추가 - `DeepLinkParser`에 `notice/` 경로를 추가하여 알림함 화면으로의 딥링크 지원 - `TodakunNavigator` 내의 불필요한 `isAuthenticated` 플래그 및 `pendingDeepLink` 관리 로직 제거 - `PushNotificationEvent`의 `DEEP_LINK_KEY` 값을 `"deeplink"`에서 `"deepLink"`로 수정하여 일관성 확보 - 인앱 알림 배너(`PushNotificationBanner`) 노출 시 상태 값(`inAppEvent`) 확인 조건 추가 및 관련 테스트 코드 정리
앱 내에서 실시간 푸시 이벤트를 상단 드롭다운 형태로 보여주는 `PushNotificationBanner` 컴포넌트를 구현하고, 이를 메인 앱 UI 구조에 통합합니다. - `PushNotificationBanner`: `AnimatedVisibility`를 활용하여 상단 슬라이드 인/아웃 및 페이드 효과를 적용하고, `LaunchedEffect`를 통해 3초 노출 후 자동으로 사라지는 로직 구현 - `PushNotificationBannerContent`: 썸네일 이미지, 알림 제목 및 본문을 포함하는 다크 테마 기반의 카드 UI 레이아웃 구현 - `TodakunApp`: 메인 화면 최상단에 배너를 배치하고, `systemBarsPadding`을 적용하여 상태 표시줄과의 레이아웃 겹침 문제 해결 - 배너 클릭 시 이벤트에 포함된 딥링크(deepLink)로 이동하는 내비게이션 로직 연동 및 배너 상태 초기화 처리 - 디자인 시스템(`TodakunTheme`) 및 타이포그래피 적용으로 일관된 UI 스타일 유지
마이페이지 하위 기능들과 사주 콘텐츠(궁합, 일진, 토정비결) 관련 화면들을 전체 내비게이션 그래프에 통합하고, 각 화면 간 데이터 전달 및 이동 로직을 구현합니다. - `TodakunApp`: `MyPageEdit`, `Mansaeryeok`, `PartnerSajuManagement`, `Compatibility`, `DateFortune`, `YearFortune` 등 10여 개의 신규 경로(Route)를 내비게이션 그래프에 추가하고 화면 전환 로직 연동 - `TodakunRoute`: 앱 내 주요 기능에 대한 `Serializable` 경로 클래스 정의 및 `partnerLinkId`, `reason` 등 내비게이션 인자 구조 설계 - `Home`: 홈 화면의 사주 콘텐츠 카드(궁합, 일진, 토정비결) 클릭 시 해당 입력 화면으로 이동하는 콜백 구현 및 `SajuContents` 컴포넌트 연결 - `MyPage`: 내정보 수정, 만세력, 파트너 관리, 알림/앱 설정 등 메뉴 타입(`MyPageMenuType`)에 따른 상세 화면 라우팅 처리 - `PartnerSajuForm`: `Navigation3` 환경에서 `SavedStateHandle`에 인자가 자동 주입되지 않는 점을 고려하여, `Route`에서 `linkId`를 받아 `ViewModel`에서 명시적으로 로드하는 `load()` 함수 추가 - `AppSetting`: 회원 탈퇴 과정(`Withdrawal` -> `WithdrawalNotice`)의 단계별 라우팅 및 탈퇴 완료 시 로그인 화면으로 스택을 초기화(`resetTo`)하는 로직 구현
신규 디자인된 앱 아이콘 벡터 리소스를 추가하고, 이를 런처 아이콘으로 통합 적용합니다. 또한 앱의 표시 이름을 한글 명칭으로 변경하고 불필요한 문자열 리소스를 정리합니다. - `app_icon.xml`: 신규 앱 아이콘 벡터 그래픽 리소스 추가 - `ic_launcher.xml`: 어댑티브 아이콘의 배경(background), 전경(foreground), 모노크롬(monochrome) 요소를 모두 신규 `app_icon`으로 교체 - `strings.xml`: `app_name`을 "todakun"에서 "토닥운 - 사주 운세"로 변경하고, 미사용 문자열(`my_page_placeholder`) 삭제
채팅 히스토리에서 새 채팅으로 진입하는 경우와 같이, 이미 앱을 사용 중인 상태에서 불필요한 스플래시 화면(로딩 화면) 노출을 방지하기 위해 `skipSplash` 옵션을 추가하고 관련 로직을 개선합니다. - `TodakunRoute.Chat`: 채팅 화면 경로 정의에 스플래시 노출 여부를 제어하는 `skipSplash` 필드 추가 - `ChatRoute`: `skipSplash` 전달 값에 따라 `ChatSplashScreen` 노출 여부를 결정하도록 수정 - `ChatViewModel`: `load` 함수에 `skipSplash` 파라미터를 추가하여, 해당 값이 true일 경우 로딩 화면의 최소 노출 시간을 보장하기 위한 `delay` 로직을 건너뛰도록 처리 - `TodakunApp`: 채팅 히스토리 화면 내 '새 채팅' 버튼 클릭 시 `skipSplash = true`를 전달하여 사용자 경험 개선 - 기타: `MyPageEditRoute` 콜백 코드의 불필요한 쉼표 정리 등 코드 스타일 수정
oungsi2000
force-pushed
the
feat/138-route
branch
from
August 19, 2026 13:55
7140631 to
d313b0f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
관련 이슈
close #138
작업 내용
androidx.navigation3)로 전체 화면 라우팅 그래프를 구성한다.TodakunApp)에서 Scaffold + 하단 탭(SnackbarHost 포함) +NavDisplay를 조립한다.PushNotificationEventFlow를 구독해 인앱 알림 상태를 들고 있는다(배너 UI 자체는 TODO 스텁).todakun://...)를 콜드 스타트 /onNewIntent/ 포그라운드 인앱 알림 3가지 경로에서 공통 처리한다.변경사항 / 상세
core:navigation:TodakunRoute(NavKey),DeepLinkParser, 백스택/인증/딥링크 진입 정책을 캡슐화한TodakunNavigator추가.app:TodakunApp(Root),MainActivity의 딥링크 인텐트 처리(onNewIntent포함),AndroidManifest에todakun://intent-filter 추가.feature:notification: 알림 클릭 시 딥링크 이동 SideEffect 추가, FCM 백그라운드(프로세스 생존) 알림에도 딥링크 PendingIntent 연결.feature:home:HomeHeader알림 버튼 라우팅 연결.feature:mypage,feature:saju-contents는 아직 미구현이라 라우트 자리만 TODO로 남기고 모듈 include는 하지 않았다(designs/issue-138-route.md참고).중점 리뷰사항
TodakunNavigator의 인증 전 딥링크 보류/재생 로직 (isAuthenticated,navigateOrFallbackToDeepLink) — 인증 전에 보호된 화면으로 바로 진입하지 않는지.notification블록을 포함하는 한 클라이언트만으로는 완전히 커버할 수 없다는 한계가 있다(designs/issue-138-route.md리스크 섹션 참고, data-only payload로 전환 여부는 백엔드 확인 필요).스크린샷 (선택)