Skip to content

[Feat] Onboarding Content API 연동#155

Merged
nahy-512 merged 11 commits intodevelopfrom
feat/#151-onboarding-contnet-api
Jan 21, 2026
Merged

[Feat] Onboarding Content API 연동#155
nahy-512 merged 11 commits intodevelopfrom
feat/#151-onboarding-contnet-api

Conversation

@ckals413
Copy link
Copy Markdown
Contributor

@ckals413 ckals413 commented Jan 21, 2026

📮 관련 이슈

📌 작업 내용

  • 온보딩 api 연동 dto, model, repository, mapper 생성했어요

📸 스크린샷

스크린샷
image

😅 미구현

  • 데이터 리스트 목록을 화면에 표시해야합니다!

🫛 To. 리뷰어

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능

    • 검색 기능 추가: 콘텐츠 검색 및 결과 목록 조회 기능 구현
    • 온보딩 중 닉네임 중복 확인 기능 추가
  • 개선 사항

    • 온보딩 화면 UI 및 네비게이션 구조 개선
    • 프로필 설정 및 콘텐츠 선택 프로세스 최적화

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

@ckals413 ckals413 self-assigned this Jan 21, 2026
@ckals413 ckals413 requested a review from a team as a code owner January 21, 2026 09:08
@ckals413 ckals413 added 🔖 API feat - API 연동 Feat ✨ 신규 기능을 추가하거나 기존 기능의 동작, 정책을 변경 labels Jan 21, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 21, 2026

📝 Walkthrough

워크스루

온보딩 프로필 닉네임 중복 체크 API 연동 및 검색 콘텐츠 기능을 구현했습니다. 새로운 DTO, 매퍼, 도메인 모델을 추가하고 의존성 주입을 통해 OnboardingViewModel 상태 관리를 개선했으며, 공유 ViewModel 인스턴스를 사용하는 복합 그래프 구조로 온보딩 네비게이션을 재구성했습니다.

변경 사항

Cohort / File(s) 요약
API 엔드포인트 추가
app/src/main/java/com/flint/data/api/SearchApi.kt, app/src/main/java/com/flint/data/api/UserApi.kt
SearchApi에 키워드 검색 엔드포인트 추가(getSearchContentList), UserApi에 닉네임 중복 체크 엔드포인트 추가(checkNickname)
네비게이션 라우트
app/src/main/java/com/flint/core/navigation/Route.kt
직렬화 가능한 OnboardingGraph 데이터 클래스 추가 (임시 토큰 파라미터 포함)
응답 DTO 정의
app/src/main/java/com/flint/data/dto/response/ContentSearchResponseDto.kt, app/src/main/java/com/flint/data/dto/search/SearchContentsResponseDto.kt, app/src/main/java/com/flint/data/dto/user/response/NicknameCheckResponseDto.kt
검색 콘텐츠 및 닉네임 체크 응답을 위한 직렬화 가능 DTO 추가
도메인 모델 및 매퍼
app/src/main/java/com/flint/domain/model/search/SearchContentItemModel.kt, app/src/main/java/com/flint/domain/model/user/NicknameCheckModel.kt, app/src/main/java/com/flint/domain/mapper/search/SearchContentMapper.kt, app/src/main/java/com/flint/domain/mapper/user/UserMapper.kt
DTO를 도메인 모델로 변환하는 매퍼 함수 및 모델 클래스 추가 (샘플 데이터 포함)
저장소 계층
app/src/main/java/com/flint/domain/repository/SearchRepository.kt, app/src/main/java/com/flint/domain/repository/UserRepository.kt
검색 콘텐츠 조회 및 닉네임 체크 기능을 추가하는 공개 메서드 확대
온보딩 상태 관리
app/src/main/java/com/flint/presentation/onboarding/OnboardingUiState.kt, app/src/main/java/com/flint/presentation/onboarding/OnboardingViewModel.kt
프로필 및 콘텐츠 UI 상태 모델 추가, ViewModel에 의존성 주입 및 상태 관리 로직 구현
온보딩 화면 리팩토링
app/src/main/java/com/flint/presentation/onboarding/OnboardingProfileScreen.kt, app/src/main/java/com/flint/presentation/onboarding/OnboardingContentScreen.kt, app/src/main/java/com/flint/presentation/onboarding/OnboardingDoneScreen.kt, app/src/main/java/com/flint/presentation/onboarding/OnboardingOttScreen.kt
상태 관리를 ViewModel로 통합, ViewModel 파라미터 추가, statusBarsPadding 제거, ProfileImage 컴포넌트 변경
네비게이션 구조 개선
app/src/main/java/com/flint/presentation/onboarding/navigation/OnboardingNavigation.kt, app/src/main/java/com/flint/core/common/extension/NavBackStackEntryExt.kt
복합 네비게이션 그래프 도입, 공유 ViewModel 확대, NavBackStackEntry 확장 함수로 ViewModel 검색 기능 추가
파일 삭제
app/src/main/java/com/flint/presentation/onboarding/OnboardingScreen.kt
사용되지 않는 OnboardingScreen 컴포저블 제거

시퀀스 다이어그램

sequenceDiagram
    actor User
    participant UI as OnboardingProfileScreen
    participant ViewModel as OnboardingViewModel
    participant UserRepo as UserRepository
    participant UserAPI as UserApi
    participant Network as Backend

    User->>UI: 닉네임 입력 및 확인 클릭
    UI->>ViewModel: checkNicknameDuplication()
    ViewModel->>UserRepo: checkNickname(nickname)
    UserRepo->>UserAPI: checkNickname(nickname)
    UserAPI->>Network: GET /api/v1/users/nickname/check
    Network-->>UserAPI: NicknameCheckResponseDto
    UserAPI-->>UserRepo: BaseResponse<NicknameCheckResponseDto>
    UserRepo->>UserRepo: toModel() 매핑
    UserRepo-->>ViewModel: Result<NicknameCheckModel>
    ViewModel->>ViewModel: uiState 업데이트
    ViewModel-->>UI: isNicknameAvailable 반영
    UI-->>User: 중복 여부 표시
Loading
sequenceDiagram
    participant Lifecycle as Composition
    participant UI as OnboardingContentScreen
    participant ViewModel as OnboardingViewModel
    participant SearchRepo as SearchRepository
    participant SearchAPI as SearchApi
    participant Network as Backend

    Lifecycle->>UI: 화면 진입
    UI->>ViewModel: getSearchContentList(keyword)
    ViewModel->>SearchRepo: getSearchContentList(keyword)
    SearchRepo->>SearchAPI: getSearchContentList(keyword)
    SearchAPI->>Network: GET /api/v1/search/contents
    Network-->>SearchAPI: BaseResponse<SearchContentsResponseDto>
    SearchAPI-->>SearchRepo: SearchContentsResponseDto
    SearchRepo->>SearchRepo: toModel() 매핑
    SearchRepo-->>ViewModel: Result<SearchContentListModel>
    ViewModel->>ViewModel: uiState.searchResults 업데이트
    ViewModel-->>UI: 콘텐츠 목록 표시
    User->>UI: 콘텐츠 선택
    UI->>ViewModel: updateSelectedContent()
    ViewModel-->>UI: 선택 상태 반영
Loading

예상 코드 리뷰 노력

🎯 4 (복잡함) | ⏱️ ~50분

관련 PR

  • PR #135: 동일한 네비게이션 및 API 표면을 수정하며, 이 PR이 검색 API와 온보딩 네비게이션 변경 사항을 기반으로 확장합니다.
  • PR #94: Route.kt에 직렬화 가능한 라우트 타입을 추가하며, 이 PR도 새로운 OnboardingGraph 라우트를 추가합니다.
  • PR #145: UserApi를 수정하고 사용자 관련 DTO와 매퍼를 추가하여 UserRepository를 확장하는 유사한 패턴을 따릅니다.

제안 검토자

  • nahy-512
  • giovannijunseokim

🐰 닉네임 체크하고, 콘텐츠도 찾고,
온보딩 여정이 더욱 부드러워졌네!
뷰모델이 상태를 쥐고,
네비게이션은 그래프로 춤을 춘다 🎭
7개 콘텐츠 선택, 이제 시작이야! ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning 대부분의 변경사항(DTO, 모델, 매퍼, 리포지토리, API 엔드포인트)이 온보딩 API 연동과 관련이 있으나, OnboardingScreen 파일 삭제와 네비게이션 구조 전면 개편은 범위 밖의 변경으로 보임. OnboardingScreen 삭제와 onBoarding 네비게이션 구조 변경의 이유를 설명하고, 이들이 PR의 주요 목표와 어떻게 연관되는지 명확히 해주세요.
Docstring Coverage ⚠️ Warning Docstring coverage is 20.69% 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
Description check ✅ Passed PR 설명이 필수 섹션은 포함하나, 작업 내용이 'onboarding api 연동 dto, model, repository, mapper 생성했어요'로 매우 간단하여 변경사항의 상세도가 낮음.
Linked Issues check ✅ Passed PR은 #150 이슈의 닉네임 중복체크 API 연동과 #151의 콘텐츠 검색 API 연동을 모두 구현했으나, #150에서 미구현으로 지정된 특수문자/이모지 유효성검사와 토스트 알림은 아직 미구현 상태임.
Title check ✅ Passed PR 제목 '[Feat] Onboarding Content API 연동'은 주요 변경사항인 온보딩 콘텐츠 API 통합을 명확하게 설명하고 있습니다.

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

✨ Finishing touches
  • 📝 Generate docstrings

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.

Copy link
Copy Markdown
Contributor

@nahy-512 nahy-512 left a comment

Choose a reason for hiding this comment

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

굿! 머지하고 회원가입 마무리 이슈 파고 작업 진행해주시죠

Comment on lines +12 to +20
// TODO: null 처리를 어떻게? 어떤거가 null가능인지
@Serializable
data class ContentItemDto(
@SerialName("contentId") val contentId: Long?,
@SerialName("title") val title: String?,
@SerialName("author") val author: String?,
@SerialName("posterUrl") val posterUrl: String?,
@SerialName("year") val year: Int?,
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

이거 서버샘들께 여쭤본 거 아니었나요? 👀
왜 다 nullable이죠

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

shelf에서 바꾸다가 까먹어서 nullable은 다 제거했습니당

Copy link
Copy Markdown
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/core/common/extension/NavBackStackEntryExt.kt`:
- Around line 17-21: Wrap the call to
navController.getBackStackEntry(navGraphRoute) in a try-catch (or runCatching)
that handles IllegalArgumentException and falls back to returning
hiltViewModel() without a parent; specifically, protect the remember block that
initializes parentEntry (and the subsequent return hiltViewModel(parentEntry))
so that if getBackStackEntry throws or cannot find navGraphRoute you return
hiltViewModel() instead, using the symbols navController.getBackStackEntry,
navGraphRoute, parentEntry, and hiltViewModel to locate and update the code.
🧹 Nitpick comments (1)
app/src/main/java/com/flint/presentation/onboarding/OnboardingProfileScreen.kt (1)

132-135: 알림: TODO 항목 - 닉네임 중복 체크 결과 토스트

연결된 이슈 #150에서 언급된 것처럼 닉네임 중복 체크 결과에 대한 토스트 알림이 구현되지 않았습니다. isNicknameAvailable 파라미터가 전달되지만 현재 UI에서 사용되지 않습니다.

토스트 알림 구현 코드를 생성하거나, 이 작업을 추적하기 위한 새 이슈를 열어드릴까요?

Comment on lines +17 to +21
val navGraphRoute = destination.parent?.route ?: return hiltViewModel()
val parentEntry = remember(this) {
navController.getBackStackEntry(navGraphRoute)
}
return hiltViewModel(parentEntry)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find and examine the NavBackStackEntryExt.kt file
find . -name "NavBackStackEntryExt.kt" -type f

Repository: imflint/Flint-Android

Length of output: 140


🏁 Script executed:

#!/bin/bash
# Read the full content of the extension file to understand the complete context
if [ -f "app/src/main/java/com/flint/core/common/extension/NavBackStackEntryExt.kt" ]; then
    cat -n "app/src/main/java/com/flint/core/common/extension/NavBackStackEntryExt.kt"
else
    find . -name "NavBackStackEntryExt.kt" -type f -exec cat -n {} \;
fi

Repository: imflint/Flint-Android

Length of output: 899


🏁 Script executed:

#!/bin/bash
# Search for usages of sharedViewModel extension function
rg -n --type=kt 'sharedViewModel' -C 3

Repository: imflint/Flint-Android

Length of output: 91


🏁 Script executed:

#!/bin/bash
# Search for sharedViewModel usages without type filter
rg -n 'sharedViewModel' -C 3

Repository: imflint/Flint-Android

Length of output: 7825


🏁 Script executed:

#!/bin/bash
# Search for any try-catch or error handling around getBackStackEntry in the codebase
rg -n 'getBackStackEntry' -C 5

Repository: imflint/Flint-Android

Length of output: 1088


getBackStackEntry()IllegalArgumentException을 던질 수 있습니다.

navController.getBackStackEntry(navGraphRoute)는 해당 경로가 백 스택에 없을 경우 예외를 던집니다. 네비게이션 전환 중이나 백 스택 상태가 변경될 때 런타임 크래시가 발생할 수 있습니다. 현재 코드는 부모 경로가 null인 경우만 방어하고 있어 실제 크래시 시나리오를 방지하지 못합니다.

try-catch로 감싸거나 runCatching을 사용하여 예외를 처리하는 것을 권장합니다.

🤖 Prompt for AI Agents
In `@app/src/main/java/com/flint/core/common/extension/NavBackStackEntryExt.kt`
around lines 17 - 21, Wrap the call to
navController.getBackStackEntry(navGraphRoute) in a try-catch (or runCatching)
that handles IllegalArgumentException and falls back to returning
hiltViewModel() without a parent; specifically, protect the remember block that
initializes parentEntry (and the subsequent return hiltViewModel(parentEntry))
so that if getBackStackEntry throws or cannot find navGraphRoute you return
hiltViewModel() instead, using the symbols navController.getBackStackEntry,
navGraphRoute, parentEntry, and hiltViewModel to locate and update the code.

@ckals413 ckals413 changed the title Feat/#151 onboarding contnet api [Feat] Onboarding Content API 연동 Jan 21, 2026
@nahy-512 nahy-512 merged commit bda579e into develop Jan 21, 2026
2 checks passed
@nahy-512 nahy-512 deleted the feat/#151-onboarding-contnet-api branch January 21, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔖 API feat - API 연동 Feat ✨ 신규 기능을 추가하거나 기존 기능의 동작, 정책을 변경

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants