feat: 아카이브 공유 기능 - #109
Merged
Merged
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
서버 GroupResponse의 공유 필드를 화면 모델 Archive로 매핑한다. - Archive 인터페이스에 accessType, owner, shareToken 필드 추가 - ArchiveOwner 인터페이스 신규 추가 - toArchive 함수를 named export로 변경해 테스트 가능하게 함 - 기존 테스트 픽스처를 accessType: 'OWNED'로 업데이트 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
RedirectAuthenticated가 쿼리 파라미터 returnTo를 지원하여 로그인 후 원래 위치로 복귀한다. 앱 내부 경로만 허용하고, 오픈 리다이렉트(//) 방지. - toInternalPath() 검증 함수로 경로 필터링 - returnTo 없거나 유효하지 않으면 /map으로 폴백 - 3가지 시나리오 테스트 커버: 내부경로 복귀, 기본 폴백, 오픈리다이렉트 거절 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…at/archive-share main의 게스트 모드(#108)가 인증 라우트 가드를 RequireAuth(강제 리다이렉트)에서 AwaitSession(항상 통과, 화면 단위 useLoginGate/EntryLoginWall)로 교체했다. 로그인 복귀도 우리가 만든 ?returnTo= 쿼리 방식 대신 location.state.from 방식으로 이미 구현돼 있어 그쪽을 채택하고, 우리 쪽 returnTo/toInternalPath 로직과 테스트는 제거했다 (완전히 대체되는 구식 메커니즘이라 병행 유지하지 않음). - AuthRouteGuards.tsx: main 버전 채택 (AwaitSession + location.state.from) - AuthRouteGuards.test.tsx: 이제 성립하지 않는 returnTo 테스트 블록 제거 - guest.ts: GUEST_ARCHIVE 픽스처에 accessType: 'OWNED' 추가 (Task 1에서 Archive.accessType 이 필수 필드가 됨에 따른 병합 후 fallout) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
main 병합(06380b4) 이후 누락된 채로 남아있던 fallout — Task 1에서 Archive.accessType 이 필수 필드가 되면서 guest.ts 의 GUEST_ARCHIVE 가 타입 에러였다. 게스트용 "내 아카이브" placeholder 라 OWNED. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- /shared/:token 을 AwaitSession 으로 감싸 네이티브 콜드 스타트에서 세션 부트스트래핑 중 인증된 것처럼 취급되는 경합을 막는다 (useIsAuthenticated 의 anonymous-fallback 특성 때문). - SharedArchivePage 의 BackButton 이 히스토리 없는 딥링크 진입에서 죽은 컨트롤이 되지 않도록 EntryLoginWall 과 같은 goBack 패턴을 적용. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
['shared', token] 은 ['shared', token, 'posts'|'places'] 의 접두라서 훗날 meta invalidateQueries 를 추가하면 의도치 않게 posts/places 캐시까지 날아간다. 'meta' 세그먼트를 붙여 세 키를 서로 배타적으로 만든다. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
VITE_WEB_ORIGIN='' 처럼 정의는 됐지만 빈 값인 배포 설정에서 ?? 연산자는 폴백하지 않아 상대경로 공유 URL 이 조용히 만들어졌다. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
클릭 핸들러에서 만든 setTimeout 을 useRef 로 들고 있다가 useEffect 클린업에서 clearTimeout 한다. 타이머가 남아있는 동안 페이지를 벗어나면 엉뚱한 화면에 "앱이 설치되어 있지 않아요" 토스트가 뜨던 문제를 막는다. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
계획 문서는 Task 6·7이 병렬로 병합된 게스트 모드(#108)와 충돌해 실행 중 두 차례 코드에 맞춰 개정됐다 — 최종본을 커밋해 이 코드를 다시 볼 사람에게 그 경위를 남긴다. 스펙 §5·§11은 LoginPromptPopup/ShareErrorView 대신 실제로 재사용한 useLoginGate·shareErrorMessage+ArchiveEmpty로 갱신했다. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
공유 버튼을 클릭하면 시트가 열려 아카이브 이름·소유자·개수를 프리뷰 카드로 보여주는 것을 확인하는 테스트를 추가했다. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Task 3 커밋 이후 포매터가 남긴 import 순서·줄바꿈 차이를 정리한다. 동작 변경 없음. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
archive-share stage 3-4 최종 코드 리뷰에서 나온 Important 5건 + 승격된
should-fix + 드라이브바이 2건을 한 번에 반영한다.
- entry=share 쿼리 제거(SharedPostDetailPage 저장 성공 네비게이션): 이 마커는
네이티브 공유 딥링크 전용이라 재사용하면 뒤로가기가 /map 으로 튀어 공유
아카이브로 못 돌아왔다.
- SharedArchivePage 의 ?placeId= open/close 에 { replace: true } 추가: push 로
쌓이던 히스토리 때문에 시트를 닫아도 뒤로가기가 다시 열어버렸다
(MapPage 의 기존 컨벤션과 통일).
- SharedPlaceSheet 에 DrawerTitle(sr-only) 추가: 스크린리더에 라벨 없는
다이얼로그로 안내되던 접근성 공백을 형제 시트들과 동일하게 메움.
- saveSharedPost 의 메모 수정 실패를 저장 성공과 분리: 메모만 실패해도 전체
실패로 보고되면 사용자가 재시도하는데, 이미 저장된 공유 게시물의 재저장
동작은 서버 계약이 불확실해 위험하다.
- SharedPostDetailPage 의 goBack 에 히스토리 없음 폴백 추가: 북마크 등 콜드
스타트 진입 시 navigate(-1) 이 앱을 이탈시키던 문제를 SharedArchivePage 와
같은 가드로 해결.
- 라우트 문자열 테스트 커버리지 추가: /shared/... 로 가는 4곳의 네비게이션
중 어느 것도 검증되지 않고 있었다 — 각 파일에 최소 한 건씩 추가.
- 로그인 월 문구를 SharedArchivePage 와 통일(장소 보기 게이트), 에러 화면을
ArchiveEmpty 재사용으로 정리.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
단건 저장 후 postId 기반 전환 등 확정된 설계 결정을 스펙에 반영하고, Subagent-Driven Development로 실행한 구현 계획 문서를 함께 커밋한다. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
아카이브 상세에서 열면 탭바(z-60)가 시트(z-50) 하단을 덮어 버튼 일부가 가려졌다. ProtectedAppLayout 이 심어둔 --bottom-menu-inset 변수로 탭바 높이만큼(+여유 1rem) 띄우고, 탭바가 없는 화면(공유 링크로 연 페이지)에서는 safe-area 만큼만 띄운다. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- 공유 게시물 상세: 아카이브 저장 칩·메모 줄을 `게시물 정보(공유받은화면)` 시안대로 아이콘·칩 스타일로 교체. 이미 저장된 경우 칩에 실제 아카이브 색을 싣는다(재저장 시트를 열 postId가 이 응답엔 없어 탭은 열지 않는다 — §13). - 공유 드로어: 링크 복사 후에는 시트를 닫지 않는다(다른 공유 수단을 이어 고를 수 있게). - 처리 중·실패 게시물 카드는 상세로 진입하지 않는다 — SharedArchivePage 뿐 아니라 ArchiveDetailPage의 SHARED 분기에도 같은 가드가 빠져 있어 추가했다. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
bsy1141
commented
Aug 18, 2026
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.
0. 링크
1. 요약
2. 작업 내용
1·2단계 — 공유 링크·공개 열람·구독
ShareSheet)/shared/:token공개 열람 페이지(비로그인 접근 가능) + 에러 코드별 안내 문구AwaitSession부트스트래핑 이슈 수정3·4단계 — 게시물 단건 저장·공유 게시물/장소 상세
VITE_API_BASE_URL이중 경로 결합 버그 수정 (/api/v1/api/public/v1/...→ 정상화)navigator.share)SaveSharedPost) 데이터 레이어SavePostSheet) — 내 아카이브 다중 선택 + 메모/shared/:token/post/:postId) — 저장하면 기존 게시물 상세(/post/{id})로 전환/shared/:token?placeId=) — 읽기 전용 장소 정보 + 저장된 게시물 목록?placeId=히스토리 누적, 드로어 접근성(제목 누락), 저장 부분 실패 처리, 로그인 게이트 문구 통일테스트
apps/web: 전체 테스트 그린 (typecheck 포함)apps/mobile: 전체 테스트 그린참고
groups에 내 postId 포함 여부, (2) 이미 저장한 게시물 재저장 시 서버 동작, (3) 구독한 아카이브 장소가 기존 인증 장소 상세 게이트를 통과하는지🤖 Generated with Claude Code