Skip to content

feat(profile): Implement preference-based filtering #314

@arunderwood

Description

@arunderwood

Summary

Use user preferences to personalize the dashboard experience by boosting relevant activities in the priority calculation.

Parent Epic

Part of #309 (User Profiles & Personalization)

Dependencies

  • Depends on: Preferences UI issue

Deliverables

Priority Calculation Updates

  • Update usePriorityCalculation.ts to accept user preferences
  • Implement preference-based scoring boosts:
    // Boost for matching preferred bands
    if (userPreferences.preferredBands?.includes(activity.band)) {
      score += PREFERRED_BAND_BOOST; // e.g., +15 points
    }
    
    // Boost for matching preferred modes
    if (userPreferences.preferredModes?.includes(activity.mode)) {
      score += PREFERRED_MODE_BOOST; // e.g., +10 points
    }

Band Activity Highlighting

  • Highlight preferred bands in band activity card
  • Visual indicator (border, badge, or glow) for preferred bands

Contest Filtering

  • Filter or boost contests matching preferred modes
  • Show mode relevance indicator on contest cards

Grid-Based Features (Foundation)

  • Add grid square to DashboardData context
  • Prepare for future satellite pass filtering (grid-based visibility)
  • Prepare for future propagation predictions (grid-based paths)

Testing

  • Unit tests for preference-based scoring in usePriorityCalculation.test.ts
  • Tests for boost calculations
  • Tests for filtering logic

Scoring Adjustments

Preference Match Score Boost
Preferred band +15
Preferred mode +10
Both band and mode +25 (cumulative)
User's grid relevant (future) +20

Acceptance Criteria

  • Dashboard prioritizes activities matching user preferences
  • Preferred bands visually highlighted in band activity
  • Contests filtered/boosted by preferred modes
  • Scoring changes are testable and configurable
  • Performance not degraded (preference lookup is O(1))

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions