You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds attendance tracking and the "how many classes can I still miss"
count, ported from the legacy app.
## What's new
- **Presence** table (`subjectId`, `date`) + a v2→v3 SQLDelight
migration so existing installs upgrade cleanly. `PresenceRepository`
records/clears attendance and exposes it per subject.
- **`AbsenceCalculator`** (pure, heavily unit-tested): a scheduled class
counts as *missed* unless attendance was recorded for that day; only
classes strictly before today are counted, so today's still-confirmable
class never shows as a miss.
- `SubjectsViewModel` exposes a `SubjectSummary` per subject (missed
count, remaining allowance, has-class-today, present-today).
- `SubjectsPage` shows **"Faltas: missed/max"** (red once the allowance
is used up) and a **"Presente hoje"** switch for subjects with a class
today.
## Tests
- `AbsenceCalculatorTest` — no class times, brand-new subject, weekly
misses, recorded attendance, multiple class times, negative remaining.
- `PresenceRepositoryTest` — record/clear/toggle, dedupe per day.
- `SubjectsViewModelTest` — summaries, attendance lowering the count,
today's toggle.
## Screenshot
<img
src="https://github.com/JopiterApp/JopiterAndroid/raw/5455587cf7ca90dea1204a49e5c9edd245ddc621/docs/screenshots/07-presence-tracking.png"
width="280">
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01X5cqJDzZvxqTxMTWcN2jvm
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments