-
-
Notifications
You must be signed in to change notification settings - Fork 2
Add Attack-Free Streak Counter & Cycle Analytics #137
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Users want to see their attack-free streaks and cycle patterns to better understand remission periods.
User Feedback
- "Like a current cycle streak, or how many days in total you've had headaches instead of having to manually count the entries one by one"
- "Adding cycle streak or count"
- "Cycle information (length, triggers, etc)"
Proposed Features
-
Attack-Free Streak Counter
- Display current consecutive days without attacks
- Show longest streak achieved
- Visual calendar heatmap
-
Cycle Detection
- Automatically detect cluster periods vs remission
- Show cycle start/end dates
- Average cycle length
- Time between cycles
-
Statistics Enhancement
# app/models/user.rb def current_streak_days last_attack = headache_logs.order(start_time: :desc).first return 0 unless last_attack (Date.current - last_attack.start_time.to_date).to_i end def longest_streak # Calculate from historical data end
-
Display locations
- Add to existing stats panel
- New "Patterns" tab with detailed cycle analysis
- Widget on dashboard
Technical Approach
- Add service object for cycle detection
- Cache computations for performance
- Use Stimulus for live updates
Priority
High - Multiple users requested this feature
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request