Skip to content

Conversation

@angryPodo
Copy link
Owner

Summary

wisp-runtime 모듈에 NavDeepLinkBuilder를 사용하여 화면 깜빡임 없이 동적으로 백스택을 생성하고 탐색하는 핵심 API를 구현했습니다.

Related Issue

Closes #6

ScreenShot(Option)

N/A

Details

  • NavDeepLinkBuilder 기반 탐색 로직 구현:

    • wisp-runtimeWisp 클래스 내부에 NavDeepLinkBuilder를 사용하여 List<Any> 형태의 라우트 객체로부터 백스택을 원자적으로 생성하고 즉시 탐색하는 navigateTo 메소드를 구현했습니다.
  • 리플렉션 제거를 위한 아키텍처 리팩토링:

    • 테스트 실패의 원인이었던 런타임의 리플렉션 의존성 문제를 해결했습니다.
    • WispRegistrySpec 인터페이스에 getRoutePattern(route: Any): String? 메소드를 추가했습니다. KSP가 생성하는 WispRegistry는 이 메소드를 통해, @Serializable 객체에 해당하는 라우트 패턴(클래스의 FQCN)을 리플렉션 없이 반환합니다.
    • Wisp 클래스의 navigateTo 메소드는 이 getRoutePattern을 호출하여 NavGraph에서 NavDestination을 찾도록 수정되었습니다.
  • API 단순성 유지:

    • 최종 사용자는 Wisp.initialize() 호출 후, 기존 계획대로 navController.navigateTo(uri) 확장 함수를 그대로 사용하여 라이브러리를 이용할 수 있습니다.
    • 모든 복잡한 로직(URI 파싱, Routable 객체 변환, NavDeepLinkBuilder 실행)은 라이브러리 내부에 캡슐화됩니다.
  • 테스트 전략 변경:

    • PendingIntent.send()를 사용하는 로직은 TestNavHostController 환경에서 검증하기 어렵다는 기술적 한계를 확인했습니다.
    • 불안정한 계측 테스트 코드는 삭제하고 다음 단계인 샘플 앱 구현을 통해 실제 환경에서 기능의 동작을 검증하기로 결정했습니다.

@angryPodo angryPodo requested a review from jm991014 November 24, 2025 13:41
@angryPodo angryPodo self-assigned this Nov 24, 2025
@angryPodo angryPodo added the FEAT✨ Add a new feature or change the behavior/policy of an existing feature. label Nov 24, 2025
Copy link
Collaborator

@jm991014 jm991014 left a comment

Choose a reason for hiding this comment

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

핵심 기능인 백스택 생성 로직이 깔끔하게 잘 구현된 것 같네요!!
더 보완할 부분은 없는 것 같습니다ㅎㅎ 간단한 질문 하나만 남겨뒀는데 확인하시고 바로 머지해도 좋을 것 같습니다!
고생하셨습니다. 🚀🚀🚀

* Wisp의 기본 인스턴스를 제공하고 초기화하는 역할을 담당합니다.
*/
companion object {
private var instance: Wisp? = null
Copy link
Collaborator

Choose a reason for hiding this comment

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

여기서 경쟁 상태가 일어날.. 가능성은 없겠죠? 멀티 스레드 관련해서 잘 아는 편이 아니라서 여쭤봅니다!

Copy link
Owner Author

Choose a reason for hiding this comment

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

일단 추후에 고민 해보겠습니다...지금대로면 크게 가능성은 없다고 생각해요!

@angryPodo angryPodo merged commit 6177c8f into main Nov 24, 2025
@angryPodo angryPodo deleted the feat/#16-runtime-navcontroller-navigate branch November 24, 2025 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FEAT✨ Add a new feature or change the behavior/policy of an existing feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Runtime: NavController.navigateTo 백스택 재구성 및 탐색 API 구현

3 participants