fix : 500m 이내 타인 곡 상세 열람 허용 - #308
Conversation
📝 WalkthroughWalkthrough현재 위치 조회 결과를 기준으로 지도 상세 화면의 위치 전달을 변경했습니다. 현재 위치 500m 이내 장소의 곡 상세 접근 조건을 추가했습니다. Changes핀 상세 접근 및 표시
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant MapPage
participant useOpenPinPlaceOnMap
participant PinListSheet
participant TrackDetail
MapPage->>useOpenPinPlaceOnMap: 장소 및 사용자 위치 조회
useOpenPinPlaceOnMap-->>MapPage: 장소 정보와 userCoordinate 반환
MapPage->>PinListSheet: detailLocation 및 사용자 좌표 전달
PinListSheet->>PinListSheet: 접근 조건 확인
PinListSheet->>TrackDetail: 조건 충족 시 곡 상세 화면 이동
PinListSheet-->>MapPage: 조건 불충족 시 차단 안내 표시
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/features/pin/components/PinListSheet.tsx`:
- Around line 427-431: Update useOpenPinPlaceOnMap and the PinListSheet
canOpenTrackDetail flow to track whether getCurrentPosition() succeeded, avoid
using the target pin coordinates as the userCoordinate or detailLocation
fallback, and only honor placeDetailQuery.data?.withinAccessRange when a real
user location is available; preserve access through allowTrackDetailAccess and
resolvedPlace.isMine.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 9532eee8-a75a-464f-bfea-3373c892d52f
📒 Files selected for processing (4)
src/features/pin/components/PinCard.tsxsrc/features/pin/components/PinFeedCard.tsxsrc/features/pin/components/PinListSheet.tsxsrc/features/pin/types.ts
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/features/pin/hooks/useOpenPinPlaceOnMap.ts`:
- Around line 78-81: 위치 조회 상태와 장소 곡 목록 조회에 사용할 좌표를 별도 계약으로 분리하세요.
src/features/pin/hooks/useOpenPinPlaceOnMap.ts의 useOpenPinPlaceOnMap 반환값에 목록 조회용
좌표 키를 추가하고, src/pages/MapPage.tsx 537-567 및 596-614의 지도 핀·피드/내 장소 선택 경로가 위치 실패
시에도 해당 좌표를 사용해 PinSearchPlace를 생성하도록 수정하세요. PinListSheet의 detailLocation은 위치 성공
여부를 계속 반영하되, usePlaceDetail·usePlaceTrack이 비활성화되지 않도록 목록 조회 좌표는 별도 키로 전달해야 합니다.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: c8d4d1ea-4560-4feb-9fd7-485e0f13d3bb
📒 Files selected for processing (3)
src/features/pin/components/PinListSheet.tsxsrc/features/pin/hooks/useOpenPinPlaceOnMap.tssrc/pages/MapPage.tsx
변경 내용
관련 이슈
Closes #307
변경 사항
테스트
스크린샷 (UI 변경시)
체크리스트
pnpm format)pnpm lint:fix)코드 품질 확인
PR 제출 전에 다음 명령어를 실행하여 코드 품질을 확인해주세요:
Summary by CodeRabbit
새로운 기능
개선 사항
0으로 표시됩니다.