Overview
Currently, the Attendance management views (src/pages-desktop/dashboard/attendance.tsx and src/pages-mobile/dashboard/attendance.tsx) calculate class requirements and allowed skips based strictly on a fixed 75% minimum threshold.
However, many students target higher attendance percentages (such as 80%, 85%, or 90%) for academic honors or margin of safety, or want to project how planned future absences will impact their overall percentage.
Adding an Interactive Attendance Target Predictor will allow students to customize target thresholds and simulate attendance scenarios dynamically.
Current State Analysis
- Hardcoded Threshold: In
AttendanceHint (src/pages-mobile/dashboard/attendance.tsx), calculations use hardcoded formulas fixed to 75% (3 * total - 4 * attended).
- Static Output: Students cannot change the target percentage or model future unattended classes.
Proposed Features
1. Dynamic Target Goal Slider (75% - 95%)
- Add an interactive target percentage selector (e.g. 75%, 80%, 85%, 90%, 95%) in the Attendance overview.
- Dynamically recalculate the number of required classes or allowed skips based on the selected target goal.
2. Absence & Attendance Simulator Drawer / Modal
- Provide a "Simulate Attendance" calculator where students can input hypothetical upcoming classes (e.g. "If I miss 3 classes next week, what will my percentage be?").
- Instantly recalculate projected percentages and display status badges (Safe / Warning / Critical).
Technical Implementation Plan
- Helper Function Refactor:
- Update attendance utility functions to accept a dynamic
targetPercentage parameter instead of hardcoded 75%.
- UI Integration:
- Add target goal slider / pill selector to src/pages-desktop/dashboard/attendance.tsx and src/pages-mobile/dashboard/attendance.tsx.
- Create interactive simulation modal/drawer for custom absence projections.
- Persistence:
- Save preferred attendance target goal in
localStorage under deskly::attendance::target_pct.
Verification Criteria
Overview
Currently, the Attendance management views (src/pages-desktop/dashboard/attendance.tsx and src/pages-mobile/dashboard/attendance.tsx) calculate class requirements and allowed skips based strictly on a fixed 75% minimum threshold.
However, many students target higher attendance percentages (such as 80%, 85%, or 90%) for academic honors or margin of safety, or want to project how planned future absences will impact their overall percentage.
Adding an Interactive Attendance Target Predictor will allow students to customize target thresholds and simulate attendance scenarios dynamically.
Current State Analysis
AttendanceHint(src/pages-mobile/dashboard/attendance.tsx), calculations use hardcoded formulas fixed to 75% (3 * total - 4 * attended).Proposed Features
1. Dynamic Target Goal Slider (75% - 95%)
2. Absence & Attendance Simulator Drawer / Modal
Technical Implementation Plan
targetPercentageparameter instead of hardcoded75%.localStorageunderdeskly::attendance::target_pct.Verification Criteria