Skip to content

feat: Enhanced skip functionality with reason tracking and smart behavior #244

@smithrashell

Description

@smithrashell

Summary

Implement a comprehensive skip functionality that tracks skip reasons and responds intelligently based on user feedback - no database migration required.

Current Behavior

  • Skip button just removes problem from session
  • No tracking of why problems are skipped
  • No intelligent response to skip reasons

Proposed Behavior

Skip Reason Modal

When user clicks "Skip", show a modal with 4 options:

  • Too difficult - Problem is above current skill level
  • Don't understand - Problem statement or concept is unclear
  • Not relevant - Problem doesn't fit learning goals
  • Other - With optional text input

Smart Skip Responses

Reason Action
Too difficult Weaken problem's graph relationships (algorithm will naturally adjust difficulty)
Don't understand Find and suggest a prerequisite (easier related) problem as replacement
Not relevant Just remove from session
Other Just remove from session

Free Skip for Isolated Problems

Problems with zero relationships to user's attempted problems are considered "isolated/low-value" and can be skipped without graph penalty.

Files to Modify

  • src/content/features/problems/ProblemDetail.jsx - Add SkipReasonModal component
  • src/background/handlers/problemHandlers.js - Update handler with reason-based logic
  • src/shared/services/session/sessionService.js - Enhance skipProblem method
  • src/shared/db/stores/problem_relationships.js - Add weaken/prerequisite functions

Technical Details

Graph Weakening (too_difficult)

async function weakenRelationshipsForSkip(problemId) {
  const recentSuccesses = await getRecentSuccessfulAttempts(5);
  for (const recent of recentSuccesses) {
    const currentStrength = await getRelationshipStrength(problemId, recent.leetcode_id);
    const newStrength = Math.max(0.5, (currentStrength || 2.0) - 0.4);
    await updateRelationshipStrength(problemId, recent.leetcode_id, newStrength);
  }
}

Prerequisite Finding (dont_understand)

Find problems that:

  1. Share tags with skipped problem
  2. Are easier difficulty
  3. Have relationship strength >= 2.0
  4. Not already in session

Acceptance Criteria

  • Skip button opens modal with 4 reason options
  • "Too difficult" weakens graph relationships (if problem has relationships)
  • "Don't understand" finds and suggests prerequisite problem
  • "Not relevant" / "Other" just removes problem
  • Problems with no relationships get "free skip" (no graph penalty)
  • Unit tests for new functions

Labels

enhancement, no-migration

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