Skip to content

feat(11-home-credits): 홈 · 크레딧 — 7일 채우기 · 홈 다섯 칸 · 내 정보 탭 · 만들 수 없음 안내 - #43

Merged
tkdwls4453 merged 32 commits into
mainfrom
feat-11-home-credits
Nov 25, 2026
Merged

tkdwls4453 merged 32 commits into
mainfrom
feat-11-home-credits

Conversation

@tkdwls4453

Copy link
Copy Markdown
Collaborator

요약

SCHEDULE §3 #11 홈 · 크레딧이에요. 크레딧이 처음으로 7일마다 다시 채워지고, 승인된 사람의 / 가 자리 화면에서 실제 홈이 되고, 내 정보 탭에서 남은 크레딧과 다음에 채워지는 날을 봐요.

  • 7일 주기 · 한 주 몫(ADR-189) — 한 달 주기를 7일로 바꿨어요. 한 주 몫 = 한 달 예산 ÷ 10 × 7/30, 설정은 app.credit.weekly-amount 한 곳이고 지금은 임시 값 25예요. 승인 SQL 은 승인한 날 + 7일의 서울 04:00 을 넣어요.
  • 크레딧 채우기 — CreditRefillService 가 매일 서울 04:00 과 서버 기동 때 돌아요. 사람마다 새 트랜잭션에서 사용자 행을 잠그고 「채울 때가 지났나」를 다시 확인한 뒤, 잔액을 한 주 몫으로 맞추고 REFILL 기록(차액 — 0 · 음수도 남김)을 써요. 서버 여러 대 · 같은 실행 두 번이어도 한 번만 채우고(금지 22), 밀린 주기는 한 번 채운 뒤 다음 때만 7일씩 옮겨요.
  • 「나」의 크레딧 — GET /api/me 에 APPROVED 일 때만 credit: {balance, nextRefillDate}(서울 yyyy-MM-dd). 요청마다 users 에서 읽어요(금지 23).
  • 홈 칸 다섯 — /api/home/reviews · streak · continue-learning · todos · jobs 를 칸마다 따로 읽어요(ADR-144). 스트릭은 저장하지 않고 복습 · 강의 완료 날짜로 계산하고(ADR-178), 이어서 배우기 · 할 일 · 만드는 중은 코스 · 로드맵 · 작업 화면이 쓰는 판정과 변환을 그대로 불러요.
  • 화면 — 홈(한 칸 실패는 그 칸만 · 비면 숨김 · 오늘 복습은 늘 보임), 내 정보 탭(계정 「구글 계정」 · 남은 크레딧 · 날짜 · 로그아웃 · 처리방침), 만드는 네 곳의 「지금은 만들 수 없어요」 공통 안내(크레딧 부족일 때만 내 정보 링크).

무엇이 바뀌었나

커밋 내용
docs 계약 먼저 — ADR-189 · 01 §5 · 02 §8.2 · §8.7 · 04 §7 · §8 · §10 · 06 §2.5 · §4 · §13 · §15 · 07 §1 · GLOSSARY · SCHEDULE · design README
step 0 weekly-cycle weekly-amount 25 · CreditProperties.weeklyAmount · 승인 SQL + 7
step 1 credit-refill CreditRefillService · CreditRefillConfiguration(cron · 기동 · refill-enabled) · 실패 로그
step 2 me-credits MeReadService · MeResponse.credit · SeoulClock.calendarDate
step 3 home-review-streak /api/home/reviews · /api/home/streak · StreakActivityRepository
step 4 home-course-todo /api/home/continue-learning · /api/home/todos · CourseReadService.nextLesson 공유
step 5 home-jobs /api/home/jobs · JobReadService.unfinished(같은 JobResponse 변환)
step 6 home-screen HomePage · useHome
step 7 profile-tab ProfilePage · PlaceholderPage 제거
step 8 creation-blocked-notice CreationBlockedNotice — 새로 배우기 · 강의 · 코스 · 로드맵
docs 브랜치 리뷰 — 05 §3 nextLesson 생략 · UI_GUIDE §6 · 04 §8 · §10 · ADR-173 · 하네스 기록
step 9 identity-heading 내 정보 탭의 계정 제목 「구글 계정」
step 10 me-refetch-keep 「나」 다시 읽기가 실패해도 이전 값으로 화면 유지(처음 읽기 실패만 오류 화면)
  • 서버 테스트 2,624 → 2,764개 · 화면 테스트 533 → 607개 통과 · build · lint 통과
  • 11개 step 모두 첫 시도 승인 — 반려 0 · blocked 0
  • 마이그레이션 없음(credit_refill_at · credit_entries 는 이미 있음)

병합 전에 사람이 할 일

없음. 참고로 —

  • 배포하면 서버가 뜰 때 크레딧 채우기가 한 번 돌아요. 이미 30일 주기로 들어가 있는 운영자 계정의 credit_refill_at 은 옮기지 않았어요 — 그 날짜에 한 번 채워진 뒤부터 7일 주기예요.
  • 한 주 몫 25 와 종류별 값 1 은 임시 값이에요. M2 뒤 11a 에서 예산과 호출 기록(llm_calls)으로 정해요.
  • 화면은 jsdom 시험으로만 확인했어요 — 실제 브라우저의 모바일 · 데스크톱 모양은 시안과 나란히 한 번 보면 좋아요.

🤖 Generated with Claude Code

tkdwls4453 and others added 30 commits November 25, 2026 17:02
…금은 만들 수 없음」

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
05 §3 이어서 배우기의 nextLesson 생략 · UI_GUIDE §6 공통 카드 미정 표기 복원 ·
04 §10 정한 크레딧 채우기 줄 삭제 · 04 §8 · ADR-173 의 TASK 에서 정한다 표기 갱신

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

vercel Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
mogum Ready Ready Preview Nov 25, 2026 9:54pm UTC

@coderabbitai

coderabbitai Bot commented Nov 25, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a59d35db-a184-439a-921a-699f957c36e6
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@sonarqubecloud

Copy link
Copy Markdown

@tkdwls4453
tkdwls4453 merged commit 422a1d3 into main Nov 25, 2026
8 checks passed
@tkdwls4453
tkdwls4453 deleted the feat-11-home-credits branch November 25, 2026 22:03
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