Repository navigation
refactor(core): 추모 영상 실행 가드를 core:common 한 벌로 승격한다 (#1436) - #1522
Merged
Merged
Conversation
추모 영상 URL 을 외부 앱으로 여는 실행 가드가 작성자·수신자 2벌로 있었다. 도입 당시엔 본문 37줄이 문자 단위로 같았고, 이건 스타일 중복이 아니라 보안 가드다 — 허용 스킴·host 검증 규칙이 두 곳에 흩어져 있으면 한쪽만 고칠 때 다른 쪽이 뚫린다. 그리고 이미 갈라져 있었다. PR #1395 가 수신자 판의 안내 콜백을 원인별로 나눴는데 (onRejected = URL 불합격 / onUnavailable = 실행 거부) 작성자 판은 단일 콜백이라, URL 이 막힌 경우에도 «재생할 앱이 없습니다» 라는 거짓 안내가 develop 에 남아 있었다. core:common 에 한 벌을 세우고 두 정의를 지운다. Compose 비의존이고 Intent·Uri 만 쓰며 두 소비처가 이미 core:common 에 의존한다. 계약은 #1395 가 확정한 2콜백을 그대로 쓰고, 승격과 함께 작성자 호출처도 두 갈래로 갈라 거짓 안내를 없앤다 — URL 불합격용 문구 리소스를 1건 추가했다. 테스트도 1벌로 합친다. 거부 목록은 두 판의 합집합이다. 승격 전에는 목록이 갈릴 수 있어 한쪽에만 있는 스킴이 다른 쪽에서 회귀해도 아무도 몰랐다. core:common 에 robolectric 을 testImplementation 으로 더한다 — URL 검증이 Uri 파싱에 기대기 때문이다. 매니페스트는 읽지 않으므로 isIncludeAndroidResources 는 켜지 않는다.
Sadturtleman
approved these changes
Aug 30, 2026
Contributor
|
이 PR 은
|
…rial-video-launcher 수신자 상세는 develop 에서 #1391 이 스낵바 위임 구조로 바꾸면서 `launchReceivedMemorialVideo` 라는 세 번째 복제본을 만들어 뒀다(그 KDoc 이 «승격 시 작성자 판도 같이 갈아야 한다» 고 예고해 둔 그것이다). 이 PR 의 목적이 그 한 벌 통합이므로 병합 쪽 콜백 위임 구조는 그대로 두고 호출 대상만 `core:common` 승격본으로 맞췄다. - `.clickable { onVideoClick(url) }` 위임은 develop 판 유지 - `rememberReceivedMemorialVideoClickHandler` 가 `launchMemorialVideo` 를 부른다 - 복제본과 그 전용 테스트는 걷는다 — core:common 판이 같은 3케이스를 이미 덮는다
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1436
추모 영상 URL 을 외부 앱으로 여는 실행 가드가 작성자·수신자 2벌로 있었다. 이건 스타일 중복이 아니라 보안 가드다 — 허용 스킴(
http/https)·host 검증 규칙이 두 곳에 흩어져 있으면 한쪽만 고칠 때 다른 쪽이 뚫린다.그리고 이미 갈라져 있었다. PR #1395 가 수신자 판의 안내 콜백을 원인별로 나눴는데(
onRejected= URL 불합격 /onUnavailable= 실행 거부) 작성자 판은 단일 콜백이라, URL 이 막힌 경우에도 「영상을 재생할 수 있는 앱이 없습니다」라는 거짓 안내가 develop 에 남아 있었다.무엇을 했나
core:common에 한 벌(media/MemorialVideoLauncher.kt)을 세우고 두 정의를 지웠다. 이 함수는 Compose 비의존이고Intent/Uri만 쓰며, 두 소비처가 이미projects.core.common에 의존한다.feature_afternote_memorial_video_invalid_url를 1건 추가했다(문구는 수신자 쪽과 같은 「영상 주소가 올바르지 않아 재생할 수 없습니다.」).intent:·tel:)이 다른 쪽에서 회귀해도 아무도 몰랐다.MemorialVideoLauncherTest·ReceivedMemorialVideoLauncherTest는 제거했다.core:common에robolectric을testImplementation으로 더했다 — URL 검증이android.net.Uri파싱에 기대기 때문이다. 매니페스트는 읽지 않으므로isIncludeAndroidResources는 켜지 않았다(#369 에서 켰다가 targetSdk 로 기동이 깨진 전례가 있다).검증
:core:common:compileDebugKotlin→ BUILD SUCCESSFUL:core:common:testDebugUnitTest --tests '*MemorialVideoLauncherTest*'→ 3 tests / 0 failures (허용 2건 실행 · 거부 8건 · 실행 거부 3종):feature:afternote:presentation:compileDebugKotlin·compileDebugUnitTestKotlin→ BUILD SUCCESSFUL:feature:afternote:presentation:testDebugUnitTest→ 171 tests / 0 failures (기존 회귀 없음):core:common:ktlintCheck·:feature:afternote:presentation:ktlintCheck→ BUILD SUCCESSFUL리뷰어에게
public이다. 두 소비처가 서로 다른 패키지라internal로는 닫히지 않는다.CI Test Plan
{ "androidTest": { "mode": "selected", "reason": "author/navigation 아래 파일을 고쳐 규칙상 selected 가 필요하다. 이 PR 이 실제로 건드리는 화면은 추모 영상 상세이므로 그 라우팅을 실기기에서 확인하는 계측 테스트를 고른다. androidTest 소스는 건드리지 않았다.", "tests": [ { "path": "app/src/androidTest/java/com/afternote/afternote_fe/AppAndReceiverCompletionAndroidTest.kt", "selector": "com.afternote.afternote_fe.ReceiverRuntimeCompletionAndroidTest#receivedMemorialDetail_routesPlaylistContractAndForwardsExactId", "device": "api30" } ] } }