Skip to content

feat: 활동 점수 디스코드→웹 전환 + 대시보드 점수 카드#47

Merged
bbbang105 merged 5 commits intodevfrom
feature/usermode-qa
Mar 16, 2026
Merged

feat: 활동 점수 디스코드→웹 전환 + 대시보드 점수 카드#47
bbbang105 merged 5 commits intodevfrom
feature/usermode-qa

Conversation

@bbbang105
Copy link
Owner

@bbbang105 bbbang105 commented Mar 16, 2026

Summary

  • 디스코드 활동 점수(message/thread/reaction) → 웹 활동 점수(board_post/post_comment/board_comment)로 전환
  • 대시보드에 '내 활동 점수' 카드 추가 (오늘 진행 상황 + 최근 활동 피드)
  • /profile/activity 활동 내역 페이지 신규 (타입별 필터, 무한 로드)
  • 점수 배점: 게시판 글 +10(20), 포스트 댓글 +5(20), 게시판 댓글 +2(10), 포스트 조회 +3(15)

Changes

Schema

  • ActivityScoreType: discord_message/thread/reactionboard_post/post_comment/board_comment

Bot (제거)

  • activity-handler.ts 삭제, GuildMessageReactions intent 제거
  • SCORE_CONFIG, weekly ranking 쿼리/라벨 업데이트

Web (추가)

  • lib/score.tsgrantWebScore() (원자적 CTE, active 멤버 체크)
  • lib/score-config.ts — 점수 타입 메타데이터 Single Source of Truth
  • api/scores/my — 대시보드 점수 API
  • api/scores?type= 필터 파라미터 (allowlist 검증)
  • api/posts/[id]/view — 단일 CTE로 post_views + 점수 부여 원자적 처리
  • 게시판 글/댓글, 포스트 댓글 API에 점수 부여 로직 추가
  • 대시보드 점수 카드 (프로그레스 바 + 최근 활동)
  • /profile/activity 페이지 (AbortController, aria-pressed)

보안/품질

  • active 멤버만 점수 부여
  • description sanitizeDescription() 적용
  • fire-and-forget 에러 로깅
  • 다크모드 뱃지 컬러 대응
  • type 파라미터 allowlist 검증

Test plan

  • 대시보드 점수 카드 렌더링 확인 (라이트/다크모드)
  • 게시판 글 작성 → board_post 점수 부여 확인
  • 포스트 댓글/게시판 댓글 → 점수 부여 확인
  • 포스트 조회 → post_view 점수 + 중복 조회 차단 확인
  • 일일 상한 초과 시 점수 미부여 확인
  • /profile/activity 페이지 필터 동작 확인
  • 랭킹 페이지 활동 탭 라벨 변경 확인

🤖 Generated with Claude Code

@bbbang105 bbbang105 requested a review from choihooo as a code owner March 16, 2026 05:16
@vercel
Copy link

vercel bot commented Mar 16, 2026

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

Project Deployment Actions Updated (UTC)
study-admin-web Ready Ready Preview, Comment Mar 16, 2026 6:27am

@bbbang105 bbbang105 added 🌱 style 코드 의미에 영향을 주지 않는 변경사항 (코드 포맷팅, 오타 수정, 변수명 변경, 에셋 추가) 🚀 feat 새로운 기능 추가 / 일부 코드 추가 / 일부 코드 수정 (리팩토링과 구분) / 디자인 요소 수정 labels Mar 16, 2026
@bbbang105 bbbang105 added the 🚨 fix 버그 수정 / 에러 해결 label Mar 16, 2026
bbbang105 and others added 5 commits March 16, 2026 15:25
- 디스코드 활동 점수(message/thread/reaction) → 웹 활동 점수(board_post/post_comment/board_comment)로 전환
- 대시보드에 '내 활동 점수' 카드 추가 (오늘 진행 상황 + 최근 활동 피드)
- /profile/activity 활동 내역 페이지 신규 (타입별 필터, 무한 로드)
- 점수 배점: 게시판 글 +10(20), 포스트 댓글 +5(20), 게시판 댓글 +2(10), 포스트 조회 +3(15)
- post view scoring 원자적 CTE로 통합 (race condition 해결)
- 점수 메타데이터 Single Source of Truth (score-config.ts)
- active 멤버만 점수 부여 (보안)
- description sanitize 적용
- 다크모드 뱃지 컬러 대응
- 봇 activity-handler 제거, GuildMessageReactions intent 제거

Co-Authored-By: Claude <noreply@anthropic.com>
@blog-study/shared (postgres) import → 문자열 상수로 변경하여
클라이언트 컴포넌트 번들에서 postgres 모듈 참조 제거

Co-Authored-By: Claude <noreply@anthropic.com>
Errors.conflict() 응답은 { error: { message } } 구조인데
result.message로 읽어서 '등록에 실패했습니다' 폴백이 표시되던 문제 수정
→ result.error?.message 우선 참조하도록 변경

Co-Authored-By: Claude <noreply@anthropic.com>
- 게시판 댓글: 본인 글에 댓글 달면 점수 미부여
- 포스트 댓글: 본인 글 제외 + 같은 포스트에 중복 댓글 시 점수 미부여 (포스트당 1회)
- description에서 타입 prefix 제거 (칩이 이미 표시하므로 중복)

Co-Authored-By: Claude <noreply@anthropic.com>
@bbbang105 bbbang105 force-pushed the feature/usermode-qa branch from 5f0f767 to 77690b4 Compare March 16, 2026 06:25
@bbbang105 bbbang105 merged commit c302ac6 into dev Mar 16, 2026
7 checks passed
@bbbang105 bbbang105 deleted the feature/usermode-qa branch March 16, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚀 feat 새로운 기능 추가 / 일부 코드 추가 / 일부 코드 수정 (리팩토링과 구분) / 디자인 요소 수정 🚨 fix 버그 수정 / 에러 해결 🌱 style 코드 의미에 영향을 주지 않는 변경사항 (코드 포맷팅, 오타 수정, 변수명 변경, 에셋 추가)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant