Skip to content

feat(balanse): HOT 인기 급상승 드롭다운 추가 · trending API 통합 응답 대응 - #156

Merged
Emithen merged 1 commit into
mainfrom
feat/hot-trending-bar-main
Aug 26, 2026
Merged

feat(balanse): HOT 인기 급상승 드롭다운 추가 · trending API 통합 응답 대응#156
Emithen merged 1 commit into
mainfrom
feat/hot-trending-bar-main

Conversation

@Emithen

@Emithen Emithen commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

개요

develop에만 있던 HotTrendingBar(밸런스 목록 상단 HOT 인기 급상승 드롭다운)를 main으로 백포트합니다.

변경 사항

파일 내용
balanse/hotTrendingBar.tsx 신규 — HOT 드롭다운. 접힘 시 1위 제목, 펼침 시 1~5위 랭킹
balanse/balansePage.tsx FilterTabs 아래에 <HotTrendingBar /> 렌더
api/pages/valanse/trendingVoteApi.ts hotissue/trending 통합 API 대응
main/mainPage.tsx 변경된 응답 형태에 맞춰 res?.votes[0] 사용
main/homeVoteCard.tsx TrendingVoteResponseTrendingVoteItem 타입 교체
docs/screens/SCR-BALANSE-001_balanse.md 화면 명세 동기화 (AGENTS.md §0~4)

⚠️ 리뷰 포인트 — API 응답 형태 변경

maintrendingVoteApi구 API 형태(GET /votes/trending → 투표 1건 객체)를 기대하고 있었습니다.
HotTrendingBar는 votes[] 배열이 필요하므로, 컴포넌트만 옮길 수 없어 API 레이어까지 함께 백포트했습니다.

- fetchTrendingVotes()            // → TrendingVoteResponse (단건)
+ fetchTrendingVotes(days)        // → { votes: TrendingVoteItem[], ... }

이에 따라 기존 소비처인 mainPage / homeVoteCard도 함께 수정했습니다.
로컬 검증 결과 백엔드는 이미 통합 응답을 반환하고 있어, 홈의 "뜨고 있는 밸런스" 카드는 이 PR 이후 정상 동작합니다.

main 고유 규약 보존

main에는 develop에 없는 신고 콘텐츠 숨김(useReportedContent)이 모든 투표 목록에 적용돼 있습니다.
develop 원본을 그대로 옮기면 HOT 랭킹만 이 규약을 우회하므로, HotTrendingBar에도 동일하게 적용했습니다.

  • 내가 신고한 투표는 HOT 랭킹에서 제외
  • 전부 제외되면 바 자체를 렌더하지 않음

mainPage의 기존 useReportedContent 로직도 그대로 유지했습니다.

검증

  • tsc --noEmit 통과
  • eslint 통과 (변경 파일 전체)
  • 로컬 dev 서버 /balanse — HOT 바 접힘 상태 HOT | 살까 말까 테스트 2 렌더 확인
  • 펼침 토글 시 1~5위 + /poll/{voteId} 링크 정상 동작 확인
  • 홈 featured 카드 정상 렌더 확인
  • 콘솔 에러 없음

🤖 Generated with Claude Code

develop의 HotTrendingBar를 main으로 백포트한다.

- hotTrendingBar: 밸런스 목록 상단 HOT 드롭다운 (접힘 1위 / 펼침 1~5위)
- trendingVoteApi: hotissue/trending 통합 API 대응
  (days 파라미터 · 단건 응답 -> votes[] 배열)
- mainPage/homeVoteCard: 변경된 응답 형태에 맞춰 votes[0] 사용
- hotTrendingBar에도 useReportedContent 적용해 main의 신고 숨김 규약 유지
- SCR-BALANSE-001 화면 명세 동기화

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
valan-se-web Ready Ready Preview Aug 26, 2026 3:29pm
valan-se-web-cms-19s6 Ready Ready Preview Aug 26, 2026 3:29pm
valanse-origin-repo Ready Ready Preview Aug 26, 2026 3:29pm

@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: cb95f359-f765-4100-9089-2594190c1e10

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

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