Skip to content

fix(setting): 화면 종료 시 저장소 호출 취소를 전파 (#1501) - #2128

Merged
OnlyReadOneBook merged 2 commits into
developfrom
fix/1501-current-setting-cancellation
Oct 5, 2026
Merged

OnlyReadOneBook merged 2 commits into
developfrom
fix/1501-current-setting-cancellation

Conversation

@OnlyReadOneBook

@OnlyReadOneBook OnlyReadOneBook commented Sep 20, 2026 •

Copy link
Copy Markdown
Collaborator

핵심 파일: ConnectedAccountsViewModel.kt, SettingViewModel.kt, PushNotificationViewModel.kt, SettingCoroutineCancellationTest.kt.

변경

화면 종료 시 설정 저장소 요청의 취소가 오류 상태나 실패 로그로 처리되던 5개 호출에 기존 runCatchingCancellable을 적용했습니다. 계정 조회·연결·해제 3곳, 설정 프로필 조회와 마케팅 동의 조회가 대상입니다. 프로필 편집 2곳은 선행 #2180에 포함되어 이 PR diff에서 빠졌고, 종료 시 UiState가 유지되는 회귀 검증을 함께 유지합니다.

취소를 제외한 Throwable의 기존 실패 처리와 성공 동작, 상태·이벤트 갱신 순서를 유지했습니다. 실제 소비가 setting 모듈 안에 있는 수정 ViewModel과 직접 노출하는 화면의 공개 범위를 internal로 제한했습니다.

검증

  • 실제 ViewModelStore 종료로 7개 진행 중 호출을 취소하고 상태·실패 이벤트 및 마케팅 조회의 진단·실패 로그 부재를 확인했습니다.
  • Nav3·MVI 선행 위에서 setting presentation 96개와 ktlint, 앱 main/androidTest 컴파일을 다시 검증했습니다.
  • 기존 취소 회귀는 실제 ViewModelStore 종료를 통해 호출 취소와 상태 유지, 실패 진단 부재를 검사합니다. 프로필 수정 검증은 선행 MVI의 Intent·UiState 계약으로 적응했습니다.
  • 앱 main·unit test·androidTest Kotlin 컴파일, setting presentation ktlint와 모듈 담당 검사를 통과했습니다.

의존 관계

🧪 CI Test Plan

{
  "androidTest": {
    "mode": "none",
    "reason": "현재 설정 ViewModel의 취소 전파 5곳과 같은 모듈 내 공개 범위만 수정합니다. 실제 ViewModelStore 종료 시 취소·상태·실패 이벤트·진단·Logcat을 Robolectric 단위 테스트로 확인하고 앱 main·unit test·androidTest 컴파일로 Hilt 연결을 검증합니다. 화면 구성이나 네비게이션 변경은 없습니다.",
    "tests": []
  }
}

@Sadturtleman Sadturtleman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

MVI 프로필 계약에 맞춘 취소 회귀 테스트 적응과 나머지 runCatchingCancellable 적용을 확인했습니다. 최신 head 기준으로 다시 승인합니다.

Base automatically changed from refactor/1691-setting-save-usecases to develop October 5, 2026 08:29
@OnlyReadOneBook
OnlyReadOneBook force-pushed the fix/1501-current-setting-cancellation branch from 2c65cd4 to 4b0a25d Compare October 5, 2026 08:29
@OnlyReadOneBook
OnlyReadOneBook added this pull request to the merge queue Oct 5, 2026
Merged via the queue into develop with commit 35eaac8 Oct 5, 2026
25 checks passed
@OnlyReadOneBook
OnlyReadOneBook deleted the fix/1501-current-setting-cancellation branch October 5, 2026 09:06
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.

fix(setting): ViewModel 저장소 호출의 취소 전파 잔여를 마무리한다 (#661 후속)

2 participants