Skip to content

refactor(platform): 알림 권한 ViewModel과 Effect를 MVI로 전환 #1809

Closed

Description

@OnlyReadOneBook

작업 유형

refactor — 동작 변경 없는 구조·책임·경계 개선

주 담당 모듈

app — 앱 셸·루트 네비게이션·앱 모듈 공통

개요

현재 계약으로 독립 완료할 수 있는 NotificationPermissionViewModel과 직접 소비 Effect의 MVI 전환만 남긴다. MainViewModel 라우팅 판정과 전체 모듈 전환 종료 검사는 #2022로 분리했다.

현재 확정 계약은 로그인 확정 뒤 API 33+ 알림 권한을 기기당 한 번 요청하고, 허용·거부 결과를 저장하며, 이미 권한이 있으면 기록만 남기는 동작이다. 로그인/hasRequested의 구독은 화면이 사라진 뒤 5초 유예 후 중단된다. 저장 실패 시 다음 실행에서 다시 물을 수 있고 CancellationException은 전파된다.

독립 범위:

  • NotificationPermissionViewModel을 기존 core MviViewModel, UiState, Intent, 순수 reducer로 전환한다.
  • NotificationPermissionEffect의 실제 상태 수집·요청 완료 배선을 최종 Intent 계약으로 연결한다.
  • 로그인·스토어 흐름, 5초 구독 유예, API 33 경계, 이미 허용된 경우, 거부 안내와 시스템 설정 이동, 취소 전파를 보존한다.
  • konsist 임시 예외에서는 이 ViewModel만 제거한다. 다른 모듈·MainViewModel 예외는 건드리지 않는다.
  • 새 선언은 실제 production 호출 범위로 visibility를 정하고 테스트만을 위해 공개하지 않는다.

#1702는 AppNavigation의 루트 내비게이션을 바꾸지만 이 Effect 호출은 snackbarHostState만 받는다. 목적지·라우팅·백스택을 이 변경에 도입하지 않으므로 최종 NavDisplay로 바뀌어도 NotificationPermission 계약을 다시 쓸 필요가 없다. 기존 core MVI 계약은 이미 develop에 있다.

완료 조건:

  • 기존 NotificationPermission 행동 테스트 및 구독 중단·재시작·빠른 복귀 회귀 통과.
  • 실제 Effect의 UiState/Intent 소비 컴파일과 API 33+ 요청·결과 경로 검증.
  • app main/unit/androidTest 컴파일, ktlint, MVI 구조 검사 통과.
  • 다른 모듈 전환을 기다리지 않고 이 변경만으로 완료할 수 있다.

참고

2026-09-13 최신 develop 816e9272c의 직접 소비는 NotificationPermissionEffect 하나이며 AppNavigation은 Effect만 호출한다. 전체 MVI 전환 종료와 MainViewModel 판단은 #2022가 맡는다. 이 이슈는 다른 모듈 전환 완료를 기다리지 않는다.

Activity

  1. added
    refactor
    area:platform
    on Sep 3, 2026
  2. changed the title [-]refactor(platform): MVI 전환 잔여분 정리 — app ViewModel 2개 + konsist allowlist 종료[/-] [+]refactor(platform): 알림 권한 ViewModel과 Effect를 MVI로 전환[/+] on Sep 13, 2026
  3. added
    area:app
    pr-open
    and removed
    area:platform
    on Sep 13, 2026
  4. removed
    pr-open
    on Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area:apprefactor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions