add habit leveling/XP system, explicit fail marking for missed habits, and scrollable habit tabs

- Habits and the account now accumulate XP and levels from check streaks, with
  streak/level-up celebration banners and push notifications.
- The "yesterday missed" banner on /today now lets a habit be explicitly marked
  failed (not just checked done), backed by a new HabitLog.status column so
  completion-rate/streak calculations never count a failed day as done.
- The habit management tabs scroll horizontally on narrow screens instead of
  wrapping to two lines, with a pure-CSS edge shadow indicating more content.
This commit is contained in:
2026-07-20 18:18:56 +09:00
parent 4a7ef5cc29
commit 800f42eab1
18 changed files with 665 additions and 42 deletions
+4
View File
@@ -2,6 +2,8 @@ from datetime import date, datetime
from pydantic import BaseModel, ConfigDict
from app.schemas.level import LevelInfo
class HabitLogOut(BaseModel):
model_config = ConfigDict(from_attributes=True)
@@ -22,6 +24,7 @@ class TodayItem(BaseModel):
completion_rate: float
current_streak: int
scheduled_days: int
level_info: LevelInfo
class MonthlySummaryDay(BaseModel):
@@ -43,3 +46,4 @@ class HabitStats(BaseModel):
current_streak: int # 오늘(또는 어제)부터 거슬러 올라가며 끊기지 않고 체크한 예정일 수
scheduled_days: int
checked_days: int
level_info: LevelInfo