Skip to content

Feat/prediction matchmaking improve#29

Merged
umsungjun merged 2 commits into
mainfrom
feat/prediction-matchmaking-improve
Jun 22, 2026
Merged

Feat/prediction matchmaking improve#29
umsungjun merged 2 commits into
mainfrom
feat/prediction-matchmaking-improve

Conversation

@umsungjun

@umsungjun umsungjun commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

릴리스 노트

  • New Features
    • 확정된 경기 카드 표시 기능 추가. 상대 선수 정보 및 경기 일정을 한눈에 확인 가능합니다.
    • 경기 매칭 알고리즘 개선. 선수 랭킹 범위를 대칭으로 확대하고 최근 전적 기반 모멘텀을 고려하여 더 정확한 매칭을 제공합니다.

- ConfirmedFightCard 컴포넌트 신설 — 메인 프리뷰의 인라인 확정 경기 JSX 추출
- 예측 상세 페이지에 confirmedFight 분기 추가 — 확정 경기 시 AI 예측 대신 확정 카드 우선 표시
- 두 페이지가 동일 데이터·동일 카드를 렌더해 표시 불일치 제거
- 랭킹 범위를 상위 한정(−20~−1)에서 고석현 기준 ±15 양방향으로 변경
- 모멘텀 매칭(위너 vs 위너) 규칙 추가 — describeMomentum 헬퍼로 현재 연승/연패를 프롬프트에 주입
- 레슬러 강제 편향 제거 — 유력하되 비레슬러도 동등 후보로 선별
- 활동성·예약 가능 여부·스타일/내러티브·팀메이트 제외 기준 반영
- matchReasoning에 매치업 성사 근거(레벨·모멘텀·스타일) 설명 지시 추가
- FightMatrix 후보 크롤러를 대칭 ±15 구간으로 확대하고 본인 랭킹 행 제외함
Copilot AI review requested due to automatic review settings June 22, 2026 07:57
@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
lets-ko Ready Ready Preview, Comment Jun 22, 2026 7:57am

@umsungjun umsungjun merged commit deea5fd into main Jun 22, 2026
3 checks passed
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 3c551883-1e94-4e47-8e38-a9800c0ffc77

📥 Commits

Reviewing files that changed from the base of the PR and between c28a3ab and 13cec82.

📒 Files selected for processing (5)
  • src/components/fighter/PredictionPreview.tsx
  • src/components/predictions/ConfirmedFightCard.tsx
  • src/components/predictions/PredictionDetail.tsx
  • src/lib/crawl/fightmatrix-crawler.ts
  • src/lib/gemini.ts

📝 Walkthrough

Walkthrough

ConfirmedFightCard 컴포넌트를 신규 파일로 추출하여 PredictionPreviewPredictionDetail 두 곳에 통합하고, fightmatrix-crawler의 랭킹 탐색 범위를 상하 대칭으로 변경하며 Gemini 매치메이킹 프롬프트에 모멘텀 기반 로직을 추가했습니다.

Changes

ConfirmedFightCard 컴포넌트 분리 및 통합

Layer / File(s) Summary
ConfirmedFightCard 컴포넌트 구현
src/components/predictions/ConfirmedFightCard.tsx
fight/locale props 인터페이스, FighterPlaceholder SVG 실루엣, useInView(0.1) 기반 진입 애니메이션, locale별 상대명/장소 선택, 이미지 URL 유효성에 따른 조건부 렌더링을 포함하는 클라이언트 컴포넌트를 신규 파일로 정의합니다.
PredictionPreview / PredictionDetail 통합
src/components/fighter/PredictionPreview.tsx, src/components/predictions/PredictionDetail.tsx
PredictionPreview에서 confirmedFight 분기의 인라인 UI를 ConfirmedFightCard 위임으로 교체하고, PredictionDetail에서 confirmedFight 존재 시 나머지 UI를 건너뛰고 ConfirmedFightCard만 반환하는 조기 반환 분기를 추가합니다.

크롤러 및 Gemini 매치메이킹 로직 개선

Layer / File(s) Summary
fightmatrix 크롤러 대칭 범위 및 자기 제외
src/lib/crawl/fightmatrix-crawler.ts
rangeAbove(기본 20, 상위만) 파라미터를 range(기본 15, 상하 대칭)로 변경하고, minRank/maxRanktargetRank ± range로 재계산하며, 파싱 시 rank === targetRank인 본인 행을 명시적으로 제외하는 조건을 추가합니다.
Gemini 모멘텀 헬퍼 및 프롬프트 개선
src/lib/gemini.ts
FightHistoryEntry 타입 import 추가, 연승/연패를 계산하는 describeMomentum 헬퍼 신규 추가, selectOpponents 프롬프트를 koRank ±15 범위와 우선순위 기반 매치메이킹 규칙(레벨 유사성, 모멘텀 매칭, 활동성, 스타일, 제외 조건)으로 재작성합니다.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • umsungjun/lets-ko#9: AI 예측 기능의 기반을 구축한 PR으로, 본 PR에서 수정하는 PredictionPreview, PredictionDetail, fightmatrix-crawler, gemini.ts 코드 경로를 최초 도입했습니다.
  • umsungjun/lets-ko#14: 동일하게 PredictionDetail.tsx를 수정하며, 본 PR의 조기 반환 분기가 해당 PR에서 추가된 상대 영상/모달 UI 로직을 건너뛸 수 있습니다.
  • umsungjun/lets-ko#15: src/lib/gemini.tsselectOpponents 내부를 동시에 수정하며, lastFightDate 추가와 본 PR의 모멘텀 프롬프트 변경이 같은 코드 경로에서 겹칩니다.

Poem

🐇 토끼가 링에 뛰어올라 말했지,
확정 카드엔 새 컴포넌트가 생겼네~
랭킹 범위 위아래로 넓혀보고,
연승·연패 모멘텀도 AI에 담았어!
쏙쏙 뽑힌 코드, 깔끔하게 정리됐다 🥊✨

✨ 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/prediction-matchmaking-improve

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 and usage tips.

Copilot AI 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.

Pull request overview

이번 PR은 고석현 다음 상대 예측(매치메이킹) 품질을 높이기 위해 현실적인 랭킹 범위(상·하위 ±15)최근 전적 기반 모멘텀(연승/연패) 반영을 프롬프트에 추가하고, 확정된 경기(confirmedFight)가 있을 때 예측 UI 대신 확정 정보 카드를 공통 컴포넌트로 재사용하도록 개선합니다.

Changes:

  • 최근 전적을 기반으로 모멘텀 문구를 생성해 “위너 vs 위너” 매치메이킹 규칙을 프롬프트에 반영
  • FightMatrix 크롤링 후보 범위를 “상위만”에서 “상·하위 대칭(±range)”으로 확장
  • 확정 경기 표시 UI를 ConfirmedFightCard로 공통화하고 예측 상세/프리뷰에서 재사용

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/lib/gemini.ts 모멘텀/랭킹 대칭 범위 기반 매치메이킹 프롬프트 강화
src/lib/crawl/fightmatrix-crawler.ts 후보 크롤링 범위를 상·하위 ±range로 확장 및 본인 랭크 행 제외
src/components/predictions/PredictionDetail.tsx 확정 경기 우선 표시로 UX 일관성 강화
src/components/predictions/ConfirmedFightCard.tsx 확정 경기 카드 공통 컴포넌트 신규 추가
src/components/fighter/PredictionPreview.tsx 프리뷰에서 확정 경기 UI를 공통 컴포넌트로 대체

Comment on lines +8 to +11
interface ConfirmedFightCardProps {
fight: ConfirmedFight; // 확정된 다음 경기 정보
locale: string; // "ko" | "en"
}
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.

2 participants