Files
sodalive-ios/docs/20260327_캐릭터리스트콘텐츠설정이동안내표시개선.md

6.8 KiB

20260327 캐릭터 리스트 콘텐츠 설정 이동 안내 표시 개선

개요

  • 채팅 캐릭터 리스트에서 isAdultContentVisible == false로 인해 콘텐츠 보기 설정으로 이동할 때 안내 토스트/팝업이 사용자에게 보이지 않는 문제를 수정한다.
  • 이동 시점과 안내 표시 시점을 조정해 사용자가 안내 문구를 실제로 확인할 수 있도록 한다.

요구사항 요약

  • 대상 흐름: 캐릭터 리스트 상세 진입 가드에서 non-KR + 민감 콘텐츠 OFF 분기
  • 문제: 현재는 현재 화면에 토스트를 띄우고 곧바로 화면 전환되어 안내가 체감되지 않음
  • 목표: 콘텐츠 보기 설정 화면 전환 후에도 안내 메시지가 사용자에게 명확히 보이도록 처리

완료 기준 (Acceptance Criteria)

  • AC1: non-KR + 민감 콘텐츠 OFF 분기에서 콘텐츠 설정으로 이동 동작은 유지된다.
  • AC2: 안내 메시지가 실제로 보이는 시점으로 표시 로직이 조정된다.
  • AC3: KR 인증 분기/기존 인증 플로우에는 영향이 없다.
  • AC4: 관련 화면에서 빌드/진단 결과가 문서에 기록된다.

구현 체크리스트

  • 팝업 렌더링 위치/생명주기 확인
  • 기존 이동 + 메시지 설정 순서의 문제 원인 확정
  • 최소 수정으로 안내 메시지 표시 시점 조정
  • 수정 파일 진단 및 워크스페이스 빌드/테스트 실행
  • 검증 결과 문서화

검증 계획

  • 정적 진단: 수정 파일 lsp_diagnostics
  • 빌드:
    • xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" -configuration Debug build
    • xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build
  • 테스트 시도:
    • xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" test
    • xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" test

검증 기록

  • 일시: 2026-03-27

    • 무엇: 캐릭터 리스트 콘텐츠 설정 이동 시 안내 표시 개선 작업 계획 문서 작성
    • 왜: 구현 전 변경 범위/완료 기준/검증 절차를 고정해 요청사항을 정확히 반영하기 위함
    • 어떻게: docs 규칙에 맞춰 요구사항/체크리스트/검증계획을 정리
    • 실행 명령/도구: apply_patch(문서 생성)
    • 결과: 구현 계획 문서 생성 완료
  • 일시: 2026-03-27

    • 무엇: 채팅 캐릭터 리스트의 non-KR + 민감 콘텐츠 OFF 분기에서 콘텐츠 설정 이동 안내 표시 시점 조정
    • 왜: 토스트를 먼저 띄우고 즉시 화면 전환하면 사용자가 안내 메시지를 보기 어려워 UX가 손실되기 때문
    • 어떻게:
      • analyze-mode 요구에 맞춰 병렬 탐색 수행
        • explore: Trace error popup lifecycle, Find message-after-navigation patterns
        • direct: grep/ast-grep/lsp_symbolsAppState.errorMessage, isShowErrorPopup, .contentViewSettings, sodaToast 렌더링 위치 확인
      • ChatTabView에서 non-KR 분기를 if !isKoreanCountry && !UserDefaults.isAdultContentVisible()로 유지
      • 기존의 “토스트 세팅 후 즉시 이동” 대신 moveToContentSettingsWithGuideToast()
        • 먼저 .contentViewSettings로 이동
        • DispatchQueue.main.asyncAfter(0.2) 후 안내 토스트 표시
      • scope 최소화를 위해 요청 대상인 채팅 캐릭터 리스트 경로(ChatTabView)만 수정
    • 실행 명령/도구:
      • lsp_diagnostics("SodaLive/Sources/Chat/ChatTabView.swift")
      • xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" -configuration Debug build
      • xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build
      • xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" test
      • xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" test
    • 결과:
      • 두 스킴 Debug 빌드 모두 BUILD SUCCEEDED
      • 테스트는 두 스킴 모두 Scheme ... is not currently configured for the test action으로 실행 불가(테스트 액션 미구성)
      • lsp_diagnostics는 SourceKit 환경에서 No such module 'Bootpay'를 보고했으나, 실제 빌드 통과로 컴파일 정상 확인
      • 수동 QA는 CLI 환경 제약으로 미실행(실기기/시뮬레이터에서 non-KR + 민감 콘텐츠 OFF 시 콘텐츠 설정 화면에서 안내 토스트 노출 확인 필요)
  • 일시: 2026-03-27

    • 무엇: 재현 보고(토스트 미노출) 기반 2차 수정 — 콘텐츠 설정 화면에서 안내 토스트를 직접 소비하도록 변경
    • 왜: 기존 방식은 전환 타이밍/전역 토스트 상태 의존으로 인해 사용자 환경에서 안내가 보이지 않는 케이스가 재현되었기 때문
    • 어떻게:
      • 원인 확인: ContentSettingsView는 로컬 토스트(viewModel.isShowPopup)만 표시하고, 캐릭터 리스트 경로는 AppState 전역 토스트 상태 타이밍에 의존
      • AppState에 일회성 전달 상태 추가
        • pendingContentSettingsGuideMessage
        • setPendingContentSettingsGuideMessage(_:)
        • consumePendingContentSettingsGuideMessage()
      • ChatTabView.moveToContentSettingsWithGuideToast()에서 전역 토스트 토글 대신
        • 안내 문구를 pending 상태로 저장
        • .contentViewSettings 이동만 수행
      • ContentSettingsView.onAppear에서 pending 문구를 consume하여
        • viewModel.errorMessage 설정
        • viewModel.isShowPopup = true로 로컬 토스트 즉시 노출
      • analyze-mode 병렬 탐색 결과(Trace content settings toast suppression, Find reliable post-redirect notice patterns)를 반영해 최소 변경으로 해결
    • 실행 명령/도구:
      • lsp_diagnostics("SodaLive/Sources/App/AppState.swift")
      • lsp_diagnostics("SodaLive/Sources/Chat/ChatTabView.swift")
      • lsp_diagnostics("SodaLive/Sources/Settings/Content/ContentSettingsView.swift")
      • xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" -configuration Debug build
      • xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build
      • xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" test
      • xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" test
    • 결과:
      • 두 스킴 Debug 빌드 모두 BUILD SUCCEEDED
      • 테스트는 두 스킴 모두 Scheme ... is not currently configured for the test action으로 실행 불가(테스트 액션 미구성)
      • lsp_diagnostics는 SourceKit 환경 한계로 모듈/스코프 미해결 오류를 보고했으나 실제 빌드는 통과
      • 수동 QA는 CLI 환경 제약으로 미실행(실기기/시뮬레이터에서 non-KR + 민감 콘텐츠 OFF → 캐릭터 탭 → 콘텐츠 설정 진입 직후 안내 토스트 노출 확인 필요)