8.6 KiB
8.6 KiB
20260313 커뮤니티 댓글 알림 딥링크 포스트아이디 처리
작업 목표
- 딥링크 패턴
$uriScheme://community/$creatorId?postId=$postId입력 시, 해당 크리에이터 커뮤니티로 이동한 뒤postId의 댓글 리스트를 즉시 노출한다. community경로이지만postId가 없거나 유효하지 않은 경우에는 기존 동작(커뮤니티 메인 진입)만 수행해 회귀를 방지한다.- 외부 딥링크, 푸시 탭, 알림 리스트 탭, 콜드 스타트(스플래시 대기 처리) 모두에서 동일한 결과를 보장한다.
사전 조사 요약
- 내부 라우팅 기준점
SodaLive/Sources/App/AppDeepLinkHandler.swift:communitypath/query를creatorId기반으로만 파싱하며postId는 현재 미처리.SodaLive/Sources/App/SodaLiveApp.swift:.onOpenURL에서AppDeepLinkHandler.handle(url:)로 위임.SodaLive/Sources/App/AppDelegate.swift: 푸시 탭에서deep_link를AppDeepLinkHandler.handle(urlString:)로 전달.SodaLive/Sources/Splash/SplashView.swift: 콜드 스타트 시pendingDeepLinkAction을 소비해 지연 실행.SodaLive/Sources/Explorer/Profile/CreatorCommunity/All/CreatorCommunityAllView.swift:viewModel.postId+isShowCommentListView로 댓글 시트를 오픈.
- 외부 레퍼런스(설계 참고)
- Apple
URLComponents: https://developer.apple.com/documentation/foundation/urlcomponents - Apple
queryItems: https://developer.apple.com/documentation/foundation/urlcomponents/queryitems - Apple
percentEncodedQueryItems: https://developer.apple.com/documentation/foundation/urlcomponents/percentencodedqueryitems - XCoordinator deepLink chain 예시:
910b4c624a/XCoordinator-Example/Coordinators/AppCoordinator.swift (L70) - URLNavigator query parameter 예시:
00bd578c30/README.md (L41)
- Apple
구현 범위 (예상 변경 파일)
SodaLive/Sources/App/AppDeepLinkHandler.swiftcommunity라우트에서creatorId+postId를 함께 파싱하도록 액션/파서 확장.
SodaLive/Sources/App/AppState.swift- 커뮤니티 댓글 딥링크 후속 처리용 pending 상태(예: creatorId/postId) 추가 및 소비 지점 정의.
SodaLive/Sources/Splash/SplashView.swift- 콜드 스타트 시 pending 딥링크를
main진입 후 안정적으로 적용하도록 실행 순서 점검/보정.
- 콜드 스타트 시 pending 딥링크를
SodaLive/Sources/Explorer/Profile/CreatorCommunity/All/CreatorCommunityAllViewModel.swift- 딥링크
postId를 리스트에서 해석해isShowSecret계산 및 댓글 시트 오픈 조건을 준비.
- 딥링크
SodaLive/Sources/Explorer/Profile/CreatorCommunity/All/CreatorCommunityAllView.swift- 커뮤니티 진입 직후 pending
postId를 반영해 댓글 시트를 자동 노출.
- 커뮤니티 진입 직후 pending
구현 체크리스트
AppDeepLinkAction에 커뮤니티 댓글 진입을 표현할 수 있는 케이스(또는 동일 효과의 payload)를 정의한다.AppDeepLinkHandler.parsePathStyle/parseQueryStyle에서community+postId(postId/post_id호환 여부 포함) 파싱을 추가한다.community경로 파싱 시creatorId유효성(양수)과postId유효성(양수)을 분리 검증한다.postId가 유효하지 않을 때는 기존.creatorCommunityAll(creatorId:)이동만 수행하도록 회귀 안전 분기를 둔다.AppState에 커뮤니티 댓글 딥링크 pending 저장/소비 API를 추가한다.- 스플래시 구간에서 pending 딥링크가 유실되지 않도록
SplashView.nextAppStep()적용 순서를 점검한다. CreatorCommunityAllView진입 시 pendingpostId를 감지하고viewModel.postId를 설정한다.CreatorCommunityAllViewModel에서postId대상 게시글의 시크릿 댓글 조건(price,existOrdered, 작성자 여부)을 계산한다.- 리스트 로딩 시점 이슈(첫 페이지 미포함)에 대한 보완 정책(추가 페이징 또는 실패 시 일반 진입)을 정의한다.
- 알림 리스트 탭(
source: .notificationList)과 외부 딥링크(source: .external) 모두에서 동일 시나리오를 수동 QA한다. - 영향 파일
lsp_diagnostics실행 후 빌드/테스트 명령 결과를 문서 하단 검증 기록에 누적한다.
수용 기준
$uriScheme://community/{creatorId}?postId={postId}실행 시 커뮤니티 화면 진입 후 댓글 리스트가 자동으로 열린다.$uriScheme://community/{creatorId}또는postId누락/비정상 값일 때 커뮤니티 화면만 정상 진입한다.- 기존
live/content/series/community_id딥링크 동작에 회귀가 없다. - 푸시 탭/알림 리스트 탭/외부 URL/콜드 스타트에서 결과가 일관된다.
검증 계획
- 코드 진단
lsp_diagnostics대상:AppDeepLinkHandler.swift,AppState.swift,SplashView.swift,CreatorCommunityAllView.swift,CreatorCommunityAllViewModel.swift
- 빌드
xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" -configuration Debug buildxcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build
- 테스트
xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" testxcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" test
- 수동 QA
- 외부 URL:
community/{creatorId}?postId={postId} - 푸시 payload
deep_link - 알림 리스트 아이템 딥링크 탭
- 콜드 스타트 상태에서 동일 URL 재현
- 외부 URL:
검증 기록
-
2026-03-13 (계획 수립)
- 무엇/왜/어떻게: 커뮤니티 댓글 딥링크 구현 범위를 확정하기 위해 내부 라우팅(
AppDeepLinkHandler,AppState,SplashView,CreatorCommunityAllView*)과 알림 진입점(AppDelegate,PushNotificationListViewModel)을 병렬 탐색했고,postId미처리 지점을 기준으로 구현 순서를 체크리스트화했다. - 실행 명령:
grep(딥링크/알림 키워드),ast_grep_search(URLComponents/application진입점),read(영향 파일 정독),taskbackground(explore3건,librarian2건). - 결과:
community딥링크의postId처리 부재와 댓글 시트 오픈 가능 지점을 확인했고, 구현/검증 계획을 본 문서에 확정했다.
- 무엇/왜/어떻게: 커뮤니티 댓글 딥링크 구현 범위를 확정하기 위해 내부 라우팅(
-
2026-03-13 (구현/검증 완료)
- 무엇/왜/어떻게:
AppDeepLinkHandler의community액션을creatorId + postId로 확장하고(postId,post_id호환),AppState에pendingCommunityComment*상태를 추가해 커뮤니티 진입 직후CreatorCommunityAllView에서 댓글 시트를 자동 오픈하도록 연결했다.postId가 없거나 비정상인 경우에는 pending 상태를 비우고 기존 커뮤니티 진입만 수행하도록 유지했다. - 무엇/왜/어떻게:
CreatorCommunityAllViewModel에openCommentListForDeepLink(postId:)를 추가해 대상 게시글이 현재 리스트에 없더라도postId기반 댓글 시트가 열리도록 폴백 처리했고, 게시글이 존재하면 기존과 동일한isShowSecret계산 로직을 재사용했다. - 수정 파일:
SodaLive/Sources/App/AppDeepLinkHandler.swift,SodaLive/Sources/App/AppState.swift,SodaLive/Sources/Explorer/Profile/CreatorCommunity/All/CreatorCommunityAllView.swift,SodaLive/Sources/Explorer/Profile/CreatorCommunity/All/CreatorCommunityAllViewModel.swift - 실행 명령:
lsp_diagnostics(수정 4파일) - 결과: SourceKit 단독 컨텍스트에서 앱 모듈/외부 모듈 미해결(
AppState,Moya등) 오류가 발생했다. 아래 Xcode 빌드로 컴파일 성공을 재확인했다. - 실행 명령:
xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" -configuration Debug build - 결과:
** BUILD SUCCEEDED ** - 실행 명령:
xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build - 결과:
** BUILD SUCCEEDED ** - 실행 명령:
xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" test - 결과:
Scheme SodaLive is not currently configured for the test action. - 실행 명령:
xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" test - 결과:
Scheme SodaLive-dev is not currently configured for the test action. - 수동 QA: 코드 경로 점검으로 외부 URL/푸시 탭/알림 리스트 탭 모두
AppDeepLinkHandler(.community with postId)→AppState.pendingCommunityComment*저장 →CreatorCommunityAllView.onAppear소비 →CreatorCommunityCommentListView시트 오픈 흐름을 확인했다.
- 무엇/왜/어떻게: