learn

Habits

Types, schedules, check-offs, and history.

Check-off, quantity, duration, and counter habits share one completion contract: at most one entry per local date, targets decide done, archives keep history while deletes remove it. Detail screens add streaks, completion rate, and a month calendar where any date can gain or lose a check-in.

What it owns

  • Four types with targets and units
  • Every-day and weekday schedules
  • Archive, restore, and explicit delete
  • Detail calendars with history editing

Files

File list and purposes from the folder README.

FilePurpose
src/app/(tabs)/habits.tsxFiltered habit list route.
src/app/habit/[id].tsxHabit detail route.
src/features/habits/HabitForm.tsxCreate and edit form.
src/features/habits/HabitRow.tsxCheck-off row.
src/features/habits/domain.tsStreak and completion rules.
Habits slice
ScreensFeaturesLocal dataDeviceCloudon-device datacloud sync

Talks to

Sources: src/features/habits/HabitForm.tsx, src/features/habits/HabitRow.tsx, src/features/habits/domain.ts (documented at commit 99a2c3d)

On this page