Skip to content

feat : 산 상세 맛집 탭 시 네이버 지도로 이동 - #145

Merged
JioCoder merged 2 commits into
mainfrom
feat/restaurant-map-link
Jul 27, 2026
Merged

feat : 산 상세 맛집 탭 시 네이버 지도로 이동#145
JioCoder merged 2 commits into
mainfrom
feat/restaurant-map-link

Conversation

@JioCoder

@JioCoder JioCoder commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

개요

산 상세 정보 조회 API에 맛집 mapUrl 필드가 추가됨에 따라, 산 상세 화면에서 맛집을 누르면 네이버 지도로 이동하도록 구현합니다.

변경 사항

  • types/api.generated.tsRestaurantInfomapUrl?: string 필드 추가
  • features/mountains-detail/components/restaurant-tab.tsx
    • 맛집 아이템을 Pressable로 감싸 탭 시 Linking.openURL(item.mapUrl)로 네이버 지도 열기
    • mapUrl이 없는 항목은 disabled 처리, 열기 실패는 로그만 남기고 무시
    • 미구현 상태로 주석 처리돼 있던 "더보기" 블록(죽은 코드) 제거

변경 파일

  • types/api.generated.ts
  • features/mountains-detail/components/restaurant-tab.tsx

체크리스트

  • TypeScript 타입체크 통과
  • Prettier 포맷 통과
  • 실기기 — 맛집 탭 시 네이버 지도(앱/웹)로 정상 이동
  • mapUrl 없는 맛집은 탭해도 아무 동작 안 하는지

참고 — 타입 재생성 관련

types/api.generated.ts는 원래 npm run typegen으로 재생성하는 파일이나, 전체 재생성 시 백엔드 스펙 드리프트로 관련 없는 타입 242줄 변경 + SlopeSegmentResponse optional화로 인한 tracking.tsx 타입 에러가 발생합니다. 이 PR을 깨끗하게 유지하기 위해 mapUrl 필드만 최소 추가했습니다.
→ 추후 전체 typegen 재생성은 tracking.tsx(mergeShortSegments) 대응과 함께 별도 PR로 진행 필요.

Summary by CodeRabbit

  • 새로운 기능

    • 맛집 카드에서 지도 URL이 제공된 경우, 카드를 눌러 외부 지도 앱 또는 웹페이지를 열 수 있습니다.
    • 지도 URL이 없는 맛집 카드는 클릭할 수 없습니다.
  • 버그 수정

    • 지도 링크를 열지 못할 때 오류를 기록하도록 개선했습니다.

JioCoder added 2 commits July 27, 2026 11:34
맛집 아이템을 Pressable로 감싸 mapUrl로 Linking.openURL. RestaurantInfo
타입에 mapUrl 필드 추가. mapUrl 없으면 disabled 처리.
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

맛집 카드가 지도 URL이 있을 때만 눌릴 수 있도록 변경되었으며, 클릭 시 외부 지도 URL을 열고 실패하면 경고를 기록합니다.

Changes

맛집 지도 링크

Layer / File(s) Summary
맛집 카드 지도 링크 동작
features/mountains-detail/components/restaurant-tab.tsx
View 기반 맛집 카드 래퍼를 Pressable로 변경하고, mapUrl이 없는 항목은 비활성화하며 지도 URL 열기와 실패 경고 로깅을 추가했습니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: casebread

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 산 상세의 맛집 탭을 눌렀을 때 네이버 지도로 이동하도록 바꾼 핵심 변경을 잘 요약합니다.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/restaurant-map-link

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 `@features/mountains-detail/components/restaurant-tab.tsx`:
- Around line 34-37: Update the restaurant list rendering around the Pressable
keyed by item.restaurantId so it never uses an optional or undefined
restaurantId directly as the React key. If the API guarantees an ID, make
restaurantId required in the generated type contract; otherwise, use a stable
unique fallback field for items without an ID, preserving unique keys across all
rendered restaurants.
🪄 Autofix (Beta)

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: 0d4ddf4c-c9c3-4b91-bcb4-d3c6f2d9d670

📥 Commits

Reviewing files that changed from the base of the PR and between 1e8ff06 and bd737be.

⛔ Files ignored due to path filters (1)
  • types/api.generated.ts is excluded by !**/*.generated.*
📒 Files selected for processing (1)
  • features/mountains-detail/components/restaurant-tab.tsx

Comment on lines +34 to +37
<Pressable
key={item.restaurantId}
className="gap-2"
disabled={!item.mapUrl}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

optional한 restaurantId를 그대로 key로 사용하지 마세요.

types/api.generated.ts:554-560에서 restaurantId가 optional이므로, ID가 없는 항목들은 모두 동일한 undefined key를 갖게 될 수 있습니다. API에서 ID가 항상 보장된다면 계약을 required로 변경하고, 그렇지 않다면 불변의 고유 필드를 사용하는 fallback key를 추가하세요.

🤖 Prompt for 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.

In `@features/mountains-detail/components/restaurant-tab.tsx` around lines 34 -
37, Update the restaurant list rendering around the Pressable keyed by
item.restaurantId so it never uses an optional or undefined restaurantId
directly as the React key. If the API guarantees an ID, make restaurantId
required in the generated type contract; otherwise, use a stable unique fallback
field for items without an ID, preserving unique keys across all rendered
restaurants.

@JioCoder
JioCoder merged commit e600d0f into main Jul 27, 2026
3 checks passed
@JioCoder
JioCoder deleted the feat/restaurant-map-link branch July 27, 2026 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant