공유 뷰어에 '웹에서 계속 보기' CTA — 웹앱 연결 - #128
Merged
Merged
Conversation
앱 웹 버전(pmdart docs/web-port.md)으로 잇는 2차 동선. share-view 페이지 자체는 그대로 둔다 — 웹앱으로 대체하면 OG 링크 미리보기(크롤러가 빈 셸을 받음), 즉시 페인트(JS 0 → CanvasKit 2MB), 퍼널 계측을 모두 잃는다. 1차 CTA(스토어)도 그대로고, 게시글 공유에만 붙인다(케어리포트·업체 미리보기는 웹앱에 대응 화면이 없다 — 시설 상세는 지도 딸림, 지도는 웹 범위 밖). · share_view_load 의 post 분기에 'id' 추가. 웹앱은 anon 이라 이 함수를 못 부르고 (service_role 전용), 새 anon RPC 를 파는 대신 이미 서버가 아는 post id 를 응답에 실어 Edge Function 이 CTA 주소를 만든다. 권한 변경 없음. 노출 확대도 아니다 — 게시글은 v_post_feed 로 이미 anon 열람 가능하다. · 이 함수는 마이그레이션 5개가 나눠 고쳐왔다. 위 정의는 과거 파일 합성이 아니라 프로덕션 현재 정의(pg_get_functiondef)에 한 줄만 더한 것이다(병렬 변경 유실 방지). 적용 시점 기준 마이그레이션 파일과 드리프트 없음을 확인했다. · WEB_APP_URL 미설정이면 CTA 를 그리지 않는다 — 웹앱 배포 전 죽은 링크 방지. 적용 순서(웹앱 배포 이후): 1) 마이그레이션 적용 → ./scripts/dump_schema.sh 로 스냅샷 갱신·커밋 2) supabase functions deploy share-view 3) 시크릿 WEB_APP_URL=https://app.pawmate.kr → 이 시점에 CTA 노출 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
seizeh
force-pushed
the
feat/share-view-web-cta
branch
from
July 27, 2026 05:18
2ef70b2 to
22d4d28
Compare
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.
앱 웹 버전(pmdart #196)으로 잇는 2차 동선. 1차 CTA(스토어)는 그대로다.
share-view 를 웹앱으로 대체하지 않는 이유
지금 페이지는 빈 껍데기가 아니라 서버 렌더링 퍼널 페이지다. 그대로 웹앱으로 바꾸면:
share_view/store_click을 RPC 가 원자적으로 기록 중그래서 페이지는 유지하고 CTA 한 줄만 추가한다.
게시글 공유에만 붙인다 — 케어리포트·업체 미리보기는 웹앱에 대응 화면이 없다(시설 상세는 지도에 딸려 있고 지도는 웹 범위 밖).
새 anon RPC 없이
share_view_load는 service_role 전용이라(revoke execute … from anon, authenticated) 웹앱(anon)이 토큰을 못 읽는다. 새 RPC 를 파는 대신 이미 서버가 아는 post id 를 응답에 실어 Edge Function 이 CTA 주소를 만든다. 권한 변경 없음.노출 확대도 아니다 — 게시글은
v_post_feed로 이미 anon 열람 가능하다(비로그인 둘러보기와 같은 경로). 좌표·전화·지역코드는 여전히 미노출.마이그레이션 주의
share_view_load는 마이그레이션 5개(hero·photo_first·owner_verified·review_photos·post_share)가 나눠 고쳐왔다. 이 파일의 정의는 과거 파일 합성이 아니라 프로덕션 현재 정의(pg_get_functiondef)에'id', p.id한 줄만 더한 것이다(병렬 변경 유실 방지). 작성 시점에 마이그레이션 파일과 드리프트가 없음도 확인했다.적용 순서 (웹앱 배포 이후)
./scripts/dump_schema.sh로 스냅샷 갱신·커밋 (DB 테스트가 스냅샷 기준)supabase functions deploy share-viewWEB_APP_URL=https://app.pawmate.krWEB_APP_URL미설정이면 CTA 를 아예 그리지 않는다 — 웹앱 배포 전 죽은 링크가 노출되지 않게 하는 스위치다. 즉 1·2 를 먼저 적용해도 사용자 노출 변화는 0 이고, 3 을 넣는 순간 CTA 가 나타난다.🤖 Generated with Claude Code