Skip to content

feat : 곡 상세 댓글 정보 구현 - #106

Merged
kim3360 merged 7 commits into
developfrom
feat/82-pin-song-detail-page
Jul 30, 2026
Merged

kim3360 merged 7 commits into
developfrom
feat/82-pin-song-detail-page

Conversation

@kim3360

@kim3360 kim3360 commented Jul 25, 2026 •

Copy link
Copy Markdown
Member

변경 내용

  • 핀에 등록된 곡의 상세 정보 페이지를 구현했습니다.
  • 곡 정보(앨범 커버·제목·아티스트·좋아요), 등록 피드 목록, 정렬 전환, 신고 플로우를 포함합니다.

주요 작업

  • PinDetailPage 추가 (/app/pins/:pinId)
    • 블러 커버 배경 + 앨범 이미지·곡 정보 헤더
    • 좋아요 토글 (아이콘 색상·카운트 반영)
    • 최신순 / 인기순 정렬 전환 (인기순은 추천 수 기준)
  • SongFeedCard 추가
    • 작성자·작성 시각·본문·태그·추천·미리듣기 UI
    • 더보기 메뉴에서 신고하기 노출 (외부 클릭 시 닫힘)
    • 신고하기 클릭 시 ReportModal 연결
  • PinListSheet의 카드 클릭 시 곡 상세로 이동
  • 곡 상세 mock 데이터 및 PinDetail·PinFeedEntry 타입 추가
  • 상세 페이지 스크롤 동작을 위해 레이아웃 높이 구조 정리

관련 이슈

Closes #82

변경 사항

  • 새로운 기능 추가
  • 버그 수정
  • UI/UX 개선
  • 리팩토링
  • 문서 업데이트

테스트

  • 브라우저에서 정상 동작 확인
  • 기존 기능에 영향 없음 확인

스크린샷 (UI 변경시)

image image image

체크리스트

  • 코드가 정상적으로 동작합니다
  • 새로운 에러나 경고가 없습니다
  • 필요시 문서를 업데이트했습니다
  • 코드 포맷팅을 실행했습니다 (pnpm format)
  • ESLint 검사를 통과했습니다 (pnpm lint:fix)

코드 품질 확인
PR 제출 전에 다음 명령어를 실행하여 코드 품질을 확인해주세요:

pnpm lint:fix
pnpm format

Summary by CodeRabbit

  • 새 기능

    • 핀 상세 페이지와 핀별 상세 경로를 추가했습니다.
    • 핀 상세에서 좋아요 상태와 개수를 변경하고, 피드를 최신순·인기순으로 정렬할 수 있습니다.
    • 내 게시물에는 수정·삭제 메뉴가, 다른 게시물에는 신고 메뉴가 표시됩니다.
    • 피드 신고 시 신고 모달을 이용할 수 있습니다.
  • 버그 수정

    • 곡 카드와 상세 화면에서 아티스트 이미지 대신 곡 커버 이미지가 표시됩니다.
    • 모바일·동적 뷰포트 환경의 레이아웃 높이와 지도 영역 표시를 개선했습니다.

@kim3360
kim3360 requested review from JeongGyul, L0521 and onebone July 25, 2026 14:26
@kim3360 kim3360 self-assigned this Jul 25, 2026
@coderabbitai

coderabbitai Bot commented Jul 25, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

핀 곡 상세 페이지와 라우트가 추가되었고, 상세 피드의 정렬·좋아요·신고 및 소유자별 수정/삭제 메뉴가 구현되었습니다. 곡 이미지 필드가 coverUrl로 통일되었으며, 동적 뷰포트 레이아웃이 적용되었습니다.

Changes

핀 곡 상세 흐름

Layer / File(s) Summary
상세 데이터 계약과 이미지 필드
src/features/pin/types.ts, src/features/pin/data/*, src/features/pin/components/SongCard.tsx, src/pages/SongDetailPage.tsx
PinDetail과 피드 타입 및 목 데이터가 추가되고, 곡 이미지가 coverUrl을 사용하도록 변경되었습니다.
상세 화면과 피드 인터랙션
src/pages/PinDetailPage.tsx, src/features/pin/components/SongFeedCard.tsx
상세 화면의 좋아요·정렬·신고 상태와 피드 메뉴의 신고·수정·삭제 동작이 구현되었습니다.
핀 상세 라우팅
src/routes/index.tsx
/app/pins/:pinId 경로에서 PinDetailPage가 렌더링되도록 라우팅이 추가되었습니다.
동적 뷰포트 레이아웃
src/index.css, src/layouts/RootLayout.tsx, src/layouts/MapLayout.tsx
루트 및 지도 컨테이너의 높이와 플렉스 레이아웃 클래스가 동적 뷰포트 기준으로 변경되었습니다.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Router
  participant PinDetailPage
  participant SongFeedCard
  participant ReportModal
  Router->>PinDetailPage: pins/:pinId 경로로 페이지 렌더링
  PinDetailPage->>SongFeedCard: 정렬된 피드와 메뉴 콜백 전달
  SongFeedCard->>PinDetailPage: 신고 대상 id 전달
  PinDetailPage->>ReportModal: 신고 모달 열기
  ReportModal->>PinDetailPage: 모달 닫기
Loading

Possibly related PRs

Suggested reviewers: onebone, l0521

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning 수정/삭제 메뉴와 본인 여부 분기 추가는 #82의 상세·피드·신고 범위를 넘어선 추가 기능입니다. 이 기능은 별도 이슈로 분리하거나, #82 범위에 포함할 근거를 명시해 주세요.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 곡 상세 댓글/피드 정보 구현이라는 핵심 변경을 잘 요약합니다.
Linked Issues check ✅ Passed 곡 상세 페이지, 피드 목록, 최신/인기 정렬, 좋아요, 라우팅, 신고 모달이 #82 요구를 충족합니다.
✨ 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/82-pin-song-detail-page

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.

@kim3360 kim3360 changed the title Feat/82 pin song detail page feat : 곡 상세 정보 구현 Jul 25, 2026
@kim3360 kim3360 changed the title feat : 곡 상세 정보 구현 feat : 곡 상세 댓글 정보 구현 Jul 25, 2026
@github-actions

Copy link
Copy Markdown

https://pr-106.plimap.kr

@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: 6

🧹 Nitpick comments (1)
src/features/pin/components/SongFeedCard.tsx (1)

91-94: 🚀 Performance & Scalability | 🔵 Trivial

cn 유틸 사용 일관성

같은 기능(조건부 클래스 결합)에 다른 파일들(PinDetailPage.tsx 등)은 cn() 유틸을 쓰는데 여기는 템플릿 리터럴을 직접 사용합니다. 통일하면 가독성과 일관성이 좋아집니다.

♻️ 제안 수정
+import { cn } from '`@/lib/utils`';
...
-          <LikeIcon
-            className={`size-5 ${entry.liked ? 'text-grayscale-100' : 'text-grayscale-400'}`}
-            aria-hidden
-          />
+          <LikeIcon
+            className={cn('size-5', entry.liked ? 'text-grayscale-100' : 'text-grayscale-400')}
+            aria-hidden
+          />
🤖 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 `@src/features/pin/components/SongFeedCard.tsx` around lines 91 - 94, Update
the LikeIcon className in SongFeedCard to use the existing cn() utility for
combining the static size-5 class with the conditional liked-state color class,
matching the established pattern used by related components.
🤖 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/SongCard.tsx`:
- Around line 15-17: Update the image source in the SongCard component to use
the existing rectangleBg fallback when song.coverUrl is missing, matching the
song.coverUrl || rectangleBg pattern used by SongDetailPage. Keep the current
alt text and image styling unchanged.

In `@src/features/pin/data/mockPinSearchPlaces.ts`:
- Around line 104-158: Update MOCK_SONG_DETAIL_LOVE_ATTACK so registerCount
matches the intended unique registrant count and the feeds data reflects that
count consistently. Adjust the feed entries or their nicknames as needed,
preserving the existing PinDetail structure and ensuring the displayed
registration total aligns with the rendered feed cards and authors.

In `@src/pages/MapPage.tsx`:
- Around line 162-178: Update PinListSheet to derive its open state from
selectedMapPinId and clear that state in onClose so the sheet can close. Replace
the hardcoded place object with selectedPlaceForSheet, deriving the actual
selected place from selectedMapPinId and the map pin data while preserving the
existing pin navigation behavior.

In `@src/pages/PinDetailPage.tsx`:
- Line 27: 알 수 없는 pinId를 조용히 MOCK_SONG_DETAIL_LOVE_ATTACK으로 대체하지 않도록
PinDetailPage의 pinDetail 처리에서 “정보를 찾을 수 없음” 상태를 표시하거나 최소한 콘솔 경고를 남기도록 수정하고,
src/features/pin/data/mockPinSearchPlaces.ts 160-202행의 MOCK_PIN_CARD_DATA가 참조하는
'toxic-till-the-end'에 대해서는 MOCK_SONG_DETAILS에 PinDetail 목업을 추가하거나 카드 pinId를 실제
존재하는 값으로 변경하세요.
- Line 110: PinDetailPage의 ReportModal 사용부에서 ReportModal.onSubmit(reason,
detail?)를 연결하고, 제출 시 현재 reportFeedId를 신고 API 또는 저장 로직에 전달하도록 수정하세요. 신고 제출이 완료되면
기존 onClose와 동일하게 상태를 정리하고, reportFeedId가 없는 경우에는 제출을 진행하지 않도록 처리하세요.
- Around line 100-107: Update the sortedFeeds rendering in PinDetailPage so
SongFeedCard receives a real like-toggle handler that updates each feed’s liked
state and likeCount using the same pattern as the top-song like control, and
pass an onPlay handler for preview playback. Preserve the existing onReport
behavior and ensure both card interactions produce the corresponding local UI
updates.

---

Nitpick comments:
In `@src/features/pin/components/SongFeedCard.tsx`:
- Around line 91-94: Update the LikeIcon className in SongFeedCard to use the
existing cn() utility for combining the static size-5 class with the conditional
liked-state color class, matching the established pattern used by related
components.
🪄 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: 3d06335c-cbb8-4bec-b6de-2de437ac6fea

📥 Commits

Reviewing files that changed from the base of the PR and between 09d091f and 1502022.

⛔ Files ignored due to path filters (5)
  • src/assets/icons/change.svg is excluded by !**/*.svg
  • src/assets/icons/like.svg is excluded by !**/*.svg
  • src/assets/icons/more.svg is excluded by !**/*.svg
  • src/assets/icons/soundwaves.svg is excluded by !**/*.svg
  • src/assets/images/Hype-Boy.png is excluded by !**/*.png
📒 Files selected for processing (12)
  • src/features/pin/components/SongCard.tsx
  • src/features/pin/components/SongFeedCard.tsx
  • src/features/pin/data/mockPinSearchPlaces.ts
  • src/features/pin/data/songPreview.ts
  • src/features/pin/types.ts
  • src/index.css
  • src/layouts/MapLayout.tsx
  • src/layouts/RootLayout.tsx
  • src/pages/MapPage.tsx
  • src/pages/PinDetailPage.tsx
  • src/pages/SongDetailPage.tsx
  • src/routes/index.tsx

Comment thread src/features/pin/components/SongCard.tsx
Comment thread src/features/pin/data/mockPinSearchPlaces.ts
Comment thread src/pages/MapPage.tsx Outdated
Comment thread src/pages/PinDetailPage.tsx
Comment thread src/pages/PinDetailPage.tsx
Comment thread src/pages/PinDetailPage.tsx
@onebone onebone added the feature Feature implementation label Jul 25, 2026
@onebone
onebone removed request for JeongGyul and L0521 July 30, 2026 11:10

@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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/features/pin/data/mockPinSearchPlaces.ts (1)

161-163: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

모든 핀 카드에 대응하는 상세 데이터를 추가해 주세요.

MOCK_SONG_DETAILS에는 love-attack만 등록되어 있지만 MOCK_PIN_CARD_DATA에는 toxic-till-the-end 카드가 포함되어 있습니다. 해당 카드를 선택해 pinId로 상세 페이지를 열면 조회 결과가 없어 상세 흐름이 깨질 수 있습니다. Toxic 곡의 PinDetail mock을 추가하거나, 상세 mock이 준비될 때까지 해당 카드를 목록에서 제외해야 합니다.

Also applies to: 177-197

🤖 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 `@src/features/pin/data/mockPinSearchPlaces.ts` around lines 161 - 163, Update
MOCK_SONG_DETAILS and the related mock data so every entry in MOCK_PIN_CARD_DATA
has matching PinDetail data, including toxic-till-the-end. Prefer adding the
Toxic song’s PinDetail mock and registering it in MOCK_SONG_DETAILS; otherwise
remove that card from MOCK_PIN_CARD_DATA until its detail mock exists, ensuring
every selectable pinId resolves successfully.
src/pages/PinDetailPage.tsx (1)

29-32: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

다른 핀으로 이동할 때 각 핀별 상태를 초기화하세요.

likes, likeCount, sort, reportFeedId는 마운트 시에만 적용되는 useState 초기값으로 설정됩니다. pins/:pinId 라우트에서 pinId가 바뀌더라도 컴포넌트가 언마운트되지 않으면 이전 핀의 좋아요, 개수, 정렬, 신고 상태가 그대로 남아 현재 핀 데이터와 어긋납니다. 해당 상태들을 pinId/pinDetail 변경 시 재설정하거나 key={pinId}로 컴포넌트를 새로 마운트하세요.

수정 예시
-import { useMemo, useState } from 'react';
+import { useEffect, useMemo, useState } from 'react';
...
+  useEffect(() => {
+    setSort('latest');
+    setLiked(Boolean(pinDetail.liked));
+    setLikeCount(pinDetail.likeCount);
+    setReportFeedId(null);
+  }, [pinId, pinDetail.liked, pinDetail.likeCount]);
🤖 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 `@src/pages/PinDetailPage.tsx` around lines 29 - 32, Reset the per-pin state in
PinDetailPage when pinId or pinDetail changes, including sort, liked, likeCount,
and reportFeedId, so navigation between pins cannot retain the previous pin’s
values. Alternatively, remount the component with key={pinId}, while preserving
initialization from the current pinDetail.
🤖 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/pages/PinDetailPage.tsx`:
- Around line 106-107: Update the owner actions in PinDetailPage’s SongFeedCard
usage so onEdit and onDelete invoke the existing edit and delete flows instead
of empty callbacks; if those flows are not available, remove or hide the owner
menu until they are implemented.

---

Outside diff comments:
In `@src/features/pin/data/mockPinSearchPlaces.ts`:
- Around line 161-163: Update MOCK_SONG_DETAILS and the related mock data so
every entry in MOCK_PIN_CARD_DATA has matching PinDetail data, including
toxic-till-the-end. Prefer adding the Toxic song’s PinDetail mock and
registering it in MOCK_SONG_DETAILS; otherwise remove that card from
MOCK_PIN_CARD_DATA until its detail mock exists, ensuring every selectable pinId
resolves successfully.

In `@src/pages/PinDetailPage.tsx`:
- Around line 29-32: Reset the per-pin state in PinDetailPage when pinId or
pinDetail changes, including sort, liked, likeCount, and reportFeedId, so
navigation between pins cannot retain the previous pin’s values. Alternatively,
remount the component with key={pinId}, while preserving initialization from the
current pinDetail.
🪄 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: ae8271f2-26f6-4bb0-a54f-43f9b913c227

📥 Commits

Reviewing files that changed from the base of the PR and between 1502022 and 58191b7.

📒 Files selected for processing (5)
  • src/features/pin/components/SongFeedCard.tsx
  • src/features/pin/data/mockPinSearchPlaces.ts
  • src/features/pin/types.ts
  • src/pages/PinDetailPage.tsx
  • src/routes/index.tsx

Comment thread src/pages/PinDetailPage.tsx
@kim3360
kim3360 merged commit 8bfcd7f into develop Jul 30, 2026
4 checks passed
@kim3360
kim3360 temporarily deployed to preview-maintenance July 30, 2026 13:49 — with GitHub Actions Inactive

This branch was successfully deployed

1 active and 1 inactive deployments
preview-maintenance — 58191b76 Deployed Jul 30, 2026 by kim3360 via cleanup #141
preview — 58191b76 Deployed Jul 30, 2026 by kim3360 via deploy #140
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Feature implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

곡 상세 댓글 정보 구현

3 participants