Skip to content

[NDGL-102] 앱 설정 기능 구현#33

Merged
jihee-dev merged 2 commits into
developfrom
feature/NDGL-102/impl-app-settings
Feb 22, 2026
Merged

[NDGL-102] 앱 설정 기능 구현#33
jihee-dev merged 2 commits into
developfrom
feature/NDGL-102/impl-app-settings

Conversation

@jihee-dev
Copy link
Copy Markdown
Member

@jihee-dev jihee-dev commented Feb 22, 2026

앱 설정 기능 구현


연관 문서

디자인

스크린샷 (Optional)

스크린샷 스크린샷
image

변경사항

  • Splash 리팩토링
    • UiIntent 대신 SplashUiIntent sealed interface 도입으로 타입 안전성 확보
    • handleIntent 불필요한 주석 제거
  • 설정 화면
    • SettingsContract: 메뉴 항목을 SettingsMenu sealed interface로 타입 분리
      • OpenUrl: FAQ, 콘텐츠 추천 링크, 서비스 약관, 개인정보처리방침 → 외부 브라우저 오픈
      • CopyIdentifierCode: 내 식별코드 → 클립보드 복사
      • AppVersion: 버전 정보 표시 (클릭 불가)
    • SettingsViewModel: AppVersionProvider 주입으로 앱 버전 조회를 Compose 외부로 분리
    • AuthRepository.getIdentifierCode() 추가

테스트 체크 리스트

  • FAQ
  • 콘텐츠 추천 링크 넣기
  • 내 식별코드
  • 서비스 약관
  • 개인정보 처리 방침
  • 버전 정보

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능

    • 설정 화면 추가: 자주 묻는 질문, 추천 링크, 이용약관, 개인정보 보호정책, 앱 버전 정보 메뉴 포함
    • 홈 및 여행 화면에서 설정 화면으로 이동할 수 있는 네비게이션 아이콘 추가
    • 설정 화면에서 식별 코드 복사 기능 추가
  • 리팩토링

    • 인증 저장소 공개 API 추가로 식별 코드 접근 방식 개선

@jihee-dev jihee-dev self-assigned this Feb 22, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 22, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

설정(Settings) 기능을 새로 추가하여 홈 및 여행 모듈에서 접근 가능하게 하였습니다. 설정 화면에서 URL 메뉴, 앱 버전, 식별 코드 복사 기능을 제공하며, AuthRepository에 식별 코드 조회 메서드를 노출했습니다.

Changes

Cohort / File(s) Summary
AuthRepository API 확장
data/auth/.../AuthRepository.kt
식별 코드를 조회하는 public 메서드 getIdentifierCode() 추가. 기존 initSession에서 직접 호출하던 localAuthDataSource.getUuid()를 새 public 메서드로 래핑.
Settings 기능 구현
feature/home/.../settings/SettingsContract.kt, feature/home/.../settings/SettingsScreen.kt, feature/home/.../settings/SettingsViewModel.kt, feature/home/.../util/AppVersionProvider.kt
새로운 Settings 화면 구현. SettingsState/Intent/SideEffect 계약 정의, Compose UI 렌더링, ViewModel에서 URL 오픈 및 식별 코드 복사 처리. AppVersionProvider로 앱 버전 정보 조회.
Home 모듈 네비게이션 및 UI 업데이트
feature/home/build.gradle.kts, feature/home/.../HomeContract.kt, feature/home/.../HomeScreen.kt, feature/home/.../HomeViewModel.kt, feature/home/.../navigation/HomeEntry.kt, feature/home/.../res/values/strings.xml
Settings로 이동하는 인텐트/사이드이펙트 추가. HomeRoute에 navigateToSettings 콜백 추가. 설정 아이콘 클릭 시 ClickSettings 인텐트 발행. auth 의존성 추가. Settings 관련 문자열 리소스 추가.
Travel 모듈 네비게이션 업데이트
feature/travel/.../MyTravelContract.kt, feature/travel/.../MyTravelScreen.kt, feature/travel/.../MyTravelViewModel.kt, feature/travel/.../navigation/TravelEntry.kt
MyTravel 화면에서도 Settings로 이동 가능하도록 ClickSettings/NavigateToSettings 추가. MyTravelRoute에 navigateToSettings 콜백 연결. 설정 아이콘 클릭 처리.
Splash 기능 리팩토링
feature/splash/.../SplashContract.kt, feature/splash/.../SplashViewModel.kt
SplashUiIntent 새로 정의. SplashViewModel의 제네릭 파라미터를 UiIntent에서 SplashUiIntent로 변경하여 타입 안정성 강화.
라우팅 API 확장
navigation/.../Route.kt
Settings 라우트를 Route sealed interface에 추가.

Sequence Diagram

sequenceDiagram
    participant User as 사용자
    participant HomeUI as Home/Travel UI
    participant ViewModel as SettingsViewModel
    participant AuthRepo as AuthRepository
    participant AppProvider as AppVersionProvider
    participant System as 시스템<br/>(ClipboardManager/<br/>Browser)

    User->>HomeUI: 설정 아이콘 클릭
    HomeUI->>ViewModel: ClickSettings Intent 발행
    
    alt URL 메뉴 클릭
        User->>ViewModel: ClickUrlMenu(menu) Intent
        ViewModel->>ViewModel: postOpenUrl(menu)
        ViewModel->>System: OpenUrl SideEffect 발행
        System->>System: 브라우저에서 URL 열기
    else 식별 코드 복사 클릭
        User->>ViewModel: ClickCopyIdentifierCodeMenu Intent
        ViewModel->>ViewModel: postCopyIdentifierCode()
        ViewModel->>AuthRepo: getIdentifierCode() 호출
        AuthRepo-->>ViewModel: identifier code 반환
        ViewModel->>System: CopyIdentifierCode SideEffect 발행
        System->>System: 클립보드에 코드 복사
    end
    
    ViewModel->>HomeUI: SideEffect 수신 처리
    HomeUI->>User: UI 업데이트
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested labels

기능 ✈️

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
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 (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 NDGL-102 이슈 ID와 핵심 변경사항인 '앱 설정 기능 구현'을 명확히 요약하고 있으며, 풀 리퀘스트의 주요 목표와 일치합니다.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/NDGL-102/impl-app-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.

Copy link
Copy Markdown

@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: 3

🧹 Nitpick comments (1)
feature/home/src/main/java/com/yapp/ndgl/feature/home/settings/SettingsContract.kt (1)

39-59: URL 하드코딩에 대한 향후 고려사항.

현재 URL이 enum에 하드코딩되어 있어 URL 변경 시 앱 업데이트가 필요합니다. 현 단계에서는 괜찮지만, 향후 Remote Config 등을 통해 서버에서 URL을 관리하는 방안을 고려해 보시면 좋겠습니다.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@feature/home/src/main/java/com/yapp/ndgl/feature/home/settings/SettingsContract.kt`
around lines 39 - 59, The UrlMenu enum currently hardcodes URL strings (see
UrlMenu enum and its url property), which forces app updates for URL changes;
replace hardcoded URLs by reading them from a configurable source (e.g., Remote
Config, BuildConfig, or string resources) at runtime: keep UrlMenu entries for
labelRes and a key/identifier for the URL, change the enum to expose a urlKey or
resource id instead of a literal, and update callers to resolve the actual URL
via the chosen config provider (RemoteConfigProvider.getUrl(key) or
context.getString(resId)) so URL values can be changed without rebuilding the
app.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@feature/home/src/main/java/com/yapp/ndgl/feature/home/settings/SettingsScreen.kt`:
- Around line 62-66: Handle potential null from context.getSystemService and
replace the hardcoded clipboard label with a string resource: in the
SettingsSideEffect.CopyIdentifierCode branch, obtain the ClipboardManager via
context.getSystemService(ClipboardManager::class.java) and guard with a
null-check before calling setPrimaryClip; if null, log or return gracefully.
Also replace the literal "NDGL Identifier Code" passed to ClipData.newPlainText
with a string resource (e.g., context.getString(R.string.ndgl_identifier_code))
so the label is not hardcoded and is localized/managed via resources.

In
`@feature/home/src/main/java/com/yapp/ndgl/feature/home/settings/SettingsViewModel.kt`:
- Around line 40-45: postCopyIdentifierCode currently calls
authRepository.getIdentifierCode() inside viewModelScope.launch without error
handling, so exceptions silently fail; wrap the suspend call in a try/catch or
use suspendRunCatching/runCatching around authRepository.getIdentifierCode()
inside postCopyIdentifierCode (the coroutine launched by viewModelScope.launch)
and on success call postSideEffect(SettingsSideEffect.CopyIdentifierCode(uuid))
while on failure post an error side effect (e.g.,
SettingsSideEffect.ShowCopyError or similar) and optionally log the exception so
the UI gets feedback when getIdentifierCode() fails.

In
`@feature/home/src/main/java/com/yapp/ndgl/feature/home/util/AppVersionProvider.kt`:
- Around line 10-14: getAppVersion uses the deprecated getPackageInfo(String,
Int) signature on API 33+, causing lint warnings; update getAppVersion to branch
on Build.VERSION.SDK_INT: for API >= Build.VERSION_CODES.TIRAMISU call
context.packageManager.getPackageInfo(context.packageName,
PackageManager.PackageInfoFlags.of(0)) and for older APIs keep the existing
getPackageInfo(context.packageName, 0) path, preserving the existing
runCatching/getOrDefault behavior and returning the same versionName fallback.

---

Nitpick comments:
In
`@feature/home/src/main/java/com/yapp/ndgl/feature/home/settings/SettingsContract.kt`:
- Around line 39-59: The UrlMenu enum currently hardcodes URL strings (see
UrlMenu enum and its url property), which forces app updates for URL changes;
replace hardcoded URLs by reading them from a configurable source (e.g., Remote
Config, BuildConfig, or string resources) at runtime: keep UrlMenu entries for
labelRes and a key/identifier for the URL, change the enum to expose a urlKey or
resource id instead of a literal, and update callers to resolve the actual URL
via the chosen config provider (RemoteConfigProvider.getUrl(key) or
context.getString(resId)) so URL values can be changed without rebuilding the
app.

@jihee-dev jihee-dev force-pushed the feature/NDGL-102/impl-app-settings branch from 49df0c6 to ec2c5ae Compare February 22, 2026 15:59
@jihee-dev jihee-dev force-pushed the feature/NDGL-102/impl-app-settings branch from ec2c5ae to 312d7f0 Compare February 22, 2026 16:02
@jihee-dev jihee-dev merged commit 8a029a4 into develop Feb 22, 2026
4 checks passed
@jihee-dev jihee-dev deleted the feature/NDGL-102/impl-app-settings branch February 22, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant