Skip to content

[Fix/#166] 네비게이션 스택 이동 수정#173

Merged
nahy-512 merged 20 commits intodevelopfrom
fix/#166-navigation-stack
Jan 22, 2026
Merged

[Fix/#166] 네비게이션 스택 이동 수정#173
nahy-512 merged 20 commits intodevelopfrom
fix/#166-navigation-stack

Conversation

@nahy-512
Copy link
Contributor

@nahy-512 nahy-512 commented Jan 22, 2026

📮 관련 이슈

📌 작업 내용

  • startDestination Splash로 변경
  • 로그인 -> 홈, 온보딩 -> 홈 스택 제거
  • 바텀네비 선택 시 쌓이는 스택 제거

🫛 To. 리뷰어

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능

    • 앱 시작 시 스플래시 화면이 기본 시작 화면으로 설정되었습니다.
  • 개선사항

    • 네비게이션 흐름 개선: 뒤로가기/스택 처리와 새 네비게이션 옵션 지원으로 더 일관된 화면 전환이 가능합니다.
    • 테마가 반투명으로 업데이트되어 일부 화면에서 배경이 보입니다.
    • 네트워크 요청 시 동적 액세스 토큰을 사용하는 Authorization 헤더가 활성화되었습니다.
  • 리팩터

    • 네비게이션 관련 공개 API가 정리되고 옵션 매개변수가 추가되었습니다.

✏️ Tip: You can customize this high-level summary in your review settings.

nahy-512 and others added 17 commits January 22, 2026 21:31
- `MainNavigator` 및 `navigateToCollectionDetail`에 `targetImageUrl` 파라미터 추가
- `CollectionDetailRoute`에 `targetImageUrl` 전달 로직 구현
- `ExploreScreen`에서 컬렉션 상세 이동 시 이미지 URL을 함께 전달하도록 수정
- `CollectionDetailScreen`에 `targetImageUrl` 파라미터 추가
- `onGloballyPositioned`를 사용하여 각 컨텐츠의 위치(y좌표) 저장
- `LaunchedEffect`를 통해 화면 진입 시 `targetImageUrl`에 해당하는 위치로 애니메이션 스크롤 동작 구현
- `ContentPreviewProvider`에서 사용하는 모델을 `ContentModel`에서 `ContentModelNew`로 변경
- 변경된 모델 명세에 맞춰 필드명 수정 (`contentId` -> `id`, `posterImage` -> `imageUrl`, `description` -> `reason` 등)
- `OttType` 관련 파라미터 제거 및 `bookmarkCount` 추가
- `collectionContent`의 테스트 데이터를 긴 텍스트로 변경 하여 텍스트 래핑 확인 등에 용이하도록 수정
@nahy-512 nahy-512 self-assigned this Jan 22, 2026
@nahy-512 nahy-512 requested a review from a team as a code owner January 22, 2026 14:32
@nahy-512 nahy-512 linked an issue Jan 22, 2026 that may be closed by this pull request
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 22, 2026

Warning

Rate limit exceeded

@nahy-512 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 5 minutes and 40 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📝 Walkthrough

Walkthrough

네비게이션 콜백 파라미터 이름을 정규화(on* → navigate*), NavOptions 지원을 여러 네비게이션 API에 추가, 시작 목적지를 Route.Splash로 변경하고 네비게이션 스택 관리 로직을 개선했으며 테마를 반투명으로 변경했습니다.

Changes

Cohort / File(s) 변경 요약
네비게이션 파라미터 정규화
app/src/main/java/com/flint/presentation/login/navigation/LoginNavigation.kt, app/src/main/java/com/flint/presentation/splash/navigation/SplashNavigation.kt, app/src/main/java/com/flint/presentation/onboarding/navigation/OnboardingNavigation.kt
콜백 파라미터 onNavigateTo*navigateTo*로 이름 변경 및 내부 인수 매핑 업데이트. Onboarding 네비게이션에 NavOptions? 파라미터 추가.
메인 네비게이션 호출부
app/src/main/java/com/flint/presentation/main/MainNavHost.kt
네비게이션 그래프 호출부에서 파라미터 이름(호출자 측) 정규화(renamed args) 적용.
메인 네비게이터 로직 변경
app/src/main/java/com/flint/presentation/main/MainNavigator.kt
startDestination을 Route.Splash로 변경. 스택 팝/복원 로직 재구성(refreshNavOptions, clearStackNavOptions 추가). 많은 네비게이션 함수 시그니처에 navOptions: NavOptions? = ... 옵션 추가.
토큰 인터셉터
app/src/main/java/com/flint/data/di/interceptor/TokenInterceptor.kt
Authorization 헤더를 하드코드 대신 실제 accessToken을 사용하도록 활성화(주석 해제).
테마 변경
app/src/main/res/values/themes.xml
Theme.Flint 스타일을 블록형으로 변경하고 <item name="android:windowIsTranslucent">true</item> 추가 (투명성 설정).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

⚙️ Setting

🐰 길을 바꿨네, 이름도 바꿨네,
스택을 정리해 새 길을 냈네.
토큰은 진짜로, 창은 반투명,
홈으로 향하는 발걸음 가볍네. ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning theme.xml의 translucent 설정 추가와 TokenInterceptor 수정은 네비게이션 스택 관리 외의 변경이며, 이슈 #166 범위 외의 변경으로 보입니다. themes.xml 및 TokenInterceptor.kt의 변경 사항이 이슈 #166과 관련이 없으므로 별도 PR로 분리하거나 해당 변경의 필요성을 설명해주세요.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목 '[Fix/#166] 네비게이션 스택 이동 수정'은 변경 사항의 주요 내용을 명확하게 요약하고 있으며, 연결된 이슈 #166의 목표인 네비게이션 스택 관리 개선과 일치합니다.
Description check ✅ Passed PR 설명은 필수 템플릿 항목들을 포함하고 있으며, 작업 내용이 구체적으로 설명되어 있습니다. 다만 스크린샷 섹션이 누락되어 있습니다.
Linked Issues check ✅ Passed 코드 변경 사항들이 이슈 #166의 목표를 충족합니다: startDestination을 Splash로 변경, 로그인/온보딩→홈 전환 시 스택 제거, 바텀 네비게이션 스택 관리.

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


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.

@nahy-512 nahy-512 added Fix 🐛 버그, UI 오류, 오타, 명세와의 불일치 등을 수정 Style 🎨 UI 변경 대응, 코드 스타일 수정 등 간단한 작업 labels Jan 22, 2026
…n-stack

# Conflicts:
#	app/src/main/java/com/flint/presentation/main/MainNavigator.kt
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@app/src/main/java/com/flint/presentation/main/MainNavigator.kt`:
- Around line 74-97: The navigate() function currently defines an unused
navOptions variable and misuses launchSingleTop in refreshNavOptions; remove the
dead navOptions declaration (or use it where intended) and set launchSingleTop =
true inside the refreshNavOptions block so refreshNavOptions correctly applies
singleTop behavior for
navController.navigateToHome/navigateToExplore/navigateToMyProfile.

Comment on lines 74 to 97
fun navigate(tab: MainTab) {
val navOptions =
navOptions {
popUpTo(navController.graph.findStartDestination().id) {
val navOptions = navOptions {
navController.currentDestination?.route?.let {
popUpTo(it) {
inclusive = true
saveState = true
}
launchSingleTop = true
restoreState = true
launchSingleTop = true
}
}

val refreshNavOptions = navOptions {
popUpTo(0) {
inclusive = true
}
launchSingleTop
}

when (tab) {
MainTab.HOME -> navController.navigateToHome(navOptions)
MainTab.EXPLORE -> navController.navigateToExplore(navOptions)
MainTab.PROFILE -> navController.navigateToMyProfile(navOptions)
MainTab.HOME -> navController.navigateToHome(refreshNavOptions)
MainTab.EXPLORE -> navController.navigateToExplore(refreshNavOptions)
MainTab.PROFILE -> navController.navigateToMyProfile(refreshNavOptions)
}
Copy link
Contributor

@coderabbitai coderabbitai bot Jan 22, 2026

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

미사용 변수 및 launchSingleTop 할당 누락

두 가지 문제가 있습니다:

  1. Line 75-84: navOptions 변수가 정의되었지만 사용되지 않습니다 (데드 코드).
  2. Line 90: launchSingleTop= true 없이 단독으로 사용되어 아무 효과가 없습니다.
🔧 수정 제안
     fun navigate(tab: MainTab) {
-        val navOptions = navOptions {
-            navController.currentDestination?.route?.let {
-                popUpTo(it) {
-                    inclusive = true
-                    saveState = true
-                }
-                restoreState = true
-                launchSingleTop = true
-            }
-        }
-
         val refreshNavOptions = navOptions {
             popUpTo(0) {
                 inclusive = true
             }
-            launchSingleTop
+            launchSingleTop = true
         }

         when (tab) {
             MainTab.HOME -> navController.navigateToHome(refreshNavOptions)
             MainTab.EXPLORE -> navController.navigateToExplore(refreshNavOptions)
             MainTab.PROFILE -> navController.navigateToMyProfile(refreshNavOptions)
         }
     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
fun navigate(tab: MainTab) {
val navOptions =
navOptions {
popUpTo(navController.graph.findStartDestination().id) {
val navOptions = navOptions {
navController.currentDestination?.route?.let {
popUpTo(it) {
inclusive = true
saveState = true
}
launchSingleTop = true
restoreState = true
launchSingleTop = true
}
}
val refreshNavOptions = navOptions {
popUpTo(0) {
inclusive = true
}
launchSingleTop
}
when (tab) {
MainTab.HOME -> navController.navigateToHome(navOptions)
MainTab.EXPLORE -> navController.navigateToExplore(navOptions)
MainTab.PROFILE -> navController.navigateToMyProfile(navOptions)
MainTab.HOME -> navController.navigateToHome(refreshNavOptions)
MainTab.EXPLORE -> navController.navigateToExplore(refreshNavOptions)
MainTab.PROFILE -> navController.navigateToMyProfile(refreshNavOptions)
}
fun navigate(tab: MainTab) {
val refreshNavOptions = navOptions {
popUpTo(0) {
inclusive = true
}
launchSingleTop = true
}
when (tab) {
MainTab.HOME -> navController.navigateToHome(refreshNavOptions)
MainTab.EXPLORE -> navController.navigateToExplore(refreshNavOptions)
MainTab.PROFILE -> navController.navigateToMyProfile(refreshNavOptions)
}
}
🤖 Prompt for AI Agents
In `@app/src/main/java/com/flint/presentation/main/MainNavigator.kt` around lines
74 - 97, The navigate() function currently defines an unused navOptions variable
and misuses launchSingleTop in refreshNavOptions; remove the dead navOptions
declaration (or use it where intended) and set launchSingleTop = true inside the
refreshNavOptions block so refreshNavOptions correctly applies singleTop
behavior for navController.navigateToHome/navigateToExplore/navigateToMyProfile.

Copy link
Contributor

Choose a reason for hiding this comment

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

요것만 확인해주세요 ~!

Copy link
Contributor

Choose a reason for hiding this comment

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

🧩 Analysis chain

🌐 Web query:

Kotlin Navigation NavOptions launchSingleTop DSL syntax

💡 Result:

Use the NavOptions Kotlin DSL inside navigate { } (preferred) or navOptions { } and set the launchSingleTop property.

Examples:

  • Inline with navigate (recommended)
    findNavController().navigate("yourRoute") {
    launchSingleTop = true
    // optional:
    restoreState = true
    popUpTo(navController.graph.startDestinationId) { saveState = true }
    }

  • Build NavOptions explicitly with the DSL
    val opts = navOptions {
    launchSingleTop = true
    }
    findNavController().navigate("yourRoute", null, opts)

References: Android Navigation docs and NavOptionsBuilder API. [1][2]

Sources
[1] Navigate with options — Android Developers.
[2] NavOptionsBuilder — Android Developers.


@giovannijunseokim 네, 확인했습니다!

두 가지 문제가 맞습니다:

  1. Line 75-84의 navOptions 변수: 정의되었지만 실제로 사용되지 않고 있습니다 (Line 93-95에서는 refreshNavOptions만 사용됨)
  2. Line 90의 launchSingleTop: = true를 붙여야 제대로 동작합니다. 현재처럼 단독으로 사용하면 효과가 없습니다.

제안드린 수정사항대로 적용하시면 됩니다! 🐰

/\_/\

( o.o )
> ^ <
깔끔한 코드~

Copy link
Contributor

@giovannijunseokim giovannijunseokim left a comment

Choose a reason for hiding this comment

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

LGTM 🔥

Copy link
Contributor

@kimjw2003 kimjw2003 left a comment

Choose a reason for hiding this comment

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

LGTM

@nahy-512 nahy-512 merged commit dbbd81d into develop Jan 22, 2026
2 checks passed
@nahy-512 nahy-512 deleted the fix/#166-navigation-stack branch January 22, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Fix 🐛 버그, UI 오류, 오타, 명세와의 불일치 등을 수정 Style 🎨 UI 변경 대응, 코드 스타일 수정 등 간단한 작업

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fix] 화면 이동 스택 관리

3 participants

Comments