Skip to content

feat: Skip analytics store for long-term tracking (optional) #245

@smithrashell

Description

@smithrashell

Summary

Add a skips store to IndexedDB for long-term skip analytics and pattern tracking.

Note: This is an optional enhancement that builds on #244. It requires a database migration.

Context

Issue #244 implements skip functionality without persistence. This issue adds optional long-term tracking to enable analytics.

Would Enable

  • Track skip frequency per problem
  • Analyze which problems are commonly skipped
  • Skip patterns over time
  • Insights into problem difficulty calibration
  • Dashboard analytics for skip behavior

Schema

// New store: 'skips'
{
  id: auto-increment,
  leetcode_id: number,
  session_id: string,
  reason: 'too_difficult' | 'dont_understand' | 'not_relevant' | 'other',
  other_text: string | null,
  timestamp: ISO string,
  had_relationships: boolean // for "free skip" tracking
}

Requirements

  • Database version increment (47 → 48)
  • Migration handling in src/shared/db/index.js
  • New skipService.js for analytics queries
  • Dashboard integration (optional)

Files to Create/Modify

  • src/shared/db/index.js - Add skips store, increment version
  • src/shared/services/session/skipService.js (new) - Analytics queries
  • src/background/handlers/problemHandlers.js - Persist skips

Potential Analytics Queries

// Get most skipped problems
async function getMostSkippedProblems(limit = 10) { ... }

// Get skip reasons distribution
async function getSkipReasonDistribution() { ... }

// Get skips by time period
async function getSkipsByDateRange(startDate, endDate) { ... }

Priority

Low - This is a nice-to-have enhancement. The core skip functionality (#244) works without it.

Labels

enhancement, database, future, low-priority

Depends On

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions