Skip to content

feat: wire feed promotion roles settlement#17

Merged
seoJing merged 1 commit into
mainfrom
feat/feed-spot-promotion-roles-settlement
Jun 6, 2026
Merged

feat: wire feed promotion roles settlement#17
seoJing merged 1 commit into
mainfrom
feat/feed-spot-promotion-roles-settlement

Conversation

@seoJing

@seoJing seoJing commented Jun 6, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능
    • 피드 상세 페이지에 스팟 전환 현황 UI 추가
    • 채팅에서 정산 액션 항목 표시 및 정산 승인/제출 기능 추가
    • 참가자 목록에 역할 배지(오너/서포터/파트너) 표시
    • 정산 상태, 금액, 남은 인원 정보 표시

@vercel

vercel Bot commented Jun 6, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
frontend Ready Ready Preview, Comment Jun 6, 2026 4:10am

@seoJing seoJing merged commit bc1ebd3 into main Jun 6, 2026
4 of 5 checks passed
@coderabbitai

coderabbitai Bot commented Jun 6, 2026

Copy link
Copy Markdown

Looking for one thing? Review this PR in Change Stack to search files, summaries, diffs, and code without losing your place.

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 15e67b91-8eac-4093-a4cb-eef39cff5290

📥 Commits

Reviewing files that changed from the base of the PR and between c92eb1d and 1deab3d.

📒 Files selected for processing (16)
  • src/app/(detail)/feed/[id]/page.tsx
  • src/entities/spot/types.ts
  • src/features/chat/client/MainChatPageClient.tsx
  • src/features/chat/model/spot-action-items.ts
  • src/features/chat/model/types.ts
  • src/features/chat/model/use-main-chat-store.ts
  • src/features/chat/ui/ChatCreationPanel.tsx
  • src/features/chat/ui/lifecycle/ClosedPhasePanel.tsx
  • src/features/chat/ui/lifecycle/MatchedPhasePanel.tsx
  • src/features/feed/api/feed-api.ts
  • src/features/feed/model/types.ts
  • src/features/feed/ui/detail/FeedParticipationActions.tsx
  • src/features/spot/api/spot-api.ts
  • src/features/spot/client/detail/SettlementSubmitSheet.tsx
  • src/features/spot/client/detail/SpotSettlementActions.tsx
  • src/lib/endpoint.ts

📝 Walkthrough

Walkthrough

스팟 정산 기능을 Chat과 Feed에 통합하고, Feed 페이지의 역할 배지 및 스팟 전환 현황 UI를 추가했습니다. 정산은 스팟 종료 후 제출/승인 프로세스를 지원하며, Feed에서는 신청 수락 시 스팟 생성 여부를 감지하여 팀 채팅으로 라우팅합니다.

Changes

Settlement Workflow

Layer / File(s) Summary
Settlement 타입 및 엔티티 계약
src/entities/spot/types.ts, src/features/chat/model/types.ts
SpotMemberRole, SpotDetail.settlement, SpotSettlementApproval, ChatActionKind, SpotActionItem 타입을 정의하여 정산 데이터 구조를 계약합니다.
Settlement 액션 모델
src/features/chat/model/spot-action-items.ts
정산 액션 아이템 생성 헬퍼(createSettlementActionItem, getSpotSettlementActionId)를 추가하고, 스팟 상태가 CLOSED일 때 정산 아이템을 생성하며, settlement kind를 지원 목록에 추가합니다.
Settlement API 통합
src/features/spot/api/spot-api.ts, src/lib/endpoint.ts
백엔드 settlement 구조를 클라이언트 타입(SpotSettlementApproval)으로 변환하는 toSettlement 함수를 추가하고, 제출/승인 API를 실제 호출로 구현하며, 정산 엔드포인트를 정의합니다.
Chat 정산 UI 표시
src/features/chat/client/MainChatPageClient.tsx, src/features/chat/ui/ChatCreationPanel.tsx, src/features/chat/ui/lifecycle/ClosedPhasePanel.tsx
MainChatPageClient에서 settlement 버튼을 렌더링하고, ChatCreationPanel에 SettlementActionPanel을 추가하며, ClosedPhasePanel에서 정산 상태와 SpotSettlementActions를 표시합니다.
Settlement 상태 동기화 및 콜백
src/features/chat/model/use-main-chat-store.ts, src/features/spot/client/detail/SettlementSubmitSheet.tsx, src/features/spot/client/detail/SpotSettlementActions.tsx
스팟 detail을 추가로 조회하여 author 정보를 보강하고, 정산 제출/승인 완료 후 콜백을 통해 상태를 동기화합니다.

Feed UI 개선

Layer / File(s) Summary
멤버 역할 배지 및 타입
src/features/feed/model/types.ts, src/app/(detail)/feed/[id]/page.tsx, src/features/chat/ui/lifecycle/MatchedPhasePanel.tsx
FeedAuthorRole에 OWNER를 추가하고, RoleBadge 컴포넌트로 역할을 표시하며, ParticipantsTile에서 스팟 멤버의 역할 배지를 렌더링합니다.
스팟 전환 현황 표시
src/app/(detail)/feed/[id]/page.tsx
SpotPromotionProgress 컴포넌트를 추가하여 OFFER/REQUEST 본문에 스팟 전환 진행률, 펀딩 현황, 남은 금액 또는 인원을 표시합니다.
Feed 신청 수락 및 응답 처리
src/features/feed/api/feed-api.ts, src/features/feed/model/types.ts, src/features/feed/ui/detail/FeedParticipationActions.tsx
FeedApplication에 spotConverted/spotId 필드를 추가하고, 수락 응답을 기반으로 스팟 생성 시 팀 채팅으로 라우팅하거나 잔여 정보를 토스트로 표시합니다.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • spot-platform/frontend#8: 동일하게 enrichSpotRoomWithBackend의 스팟 방 데이터 조회 및 author 정보 합성 로직을 수정하여 코드 레벨에서 직접 겹칩니다.
✨ 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/feed-spot-promotion-roles-settlement

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.

@seoJing seoJing deleted the feat/feed-spot-promotion-roles-settlement branch June 6, 2026 04:11
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