Skip to content

Simplify Reschedule by leveraging HistoricalMemoryStates for graded replay #53

@cantalupo555

Description

@cantalupo555

Current State

Reschedule takes []ReviewHistory (Rating + Review timestamp + State + Due + S + D) and replays every review through Next() or handleManualRating(). It handles both graded reviews and manual ratings (set due date, suspension, reset) in a single pass.

HistoricalMemoryStates takes ReviewEntries (Rating + DeltaT) and computes []MemoryState (S/D per review) via nextStateInner. It is simpler and only handles graded reviews.

Proposed Enhancement

Explore using HistoricalMemoryStates internally within Reschedule for the graded review portion of the replay. This could:

  • Reduce the complexity of Reschedule for the common case (graded-only history)
  • Provide a simpler entry point for users who only need S/D reconstruction
  • Keep the full ReviewHistory path only when manual ratings are present

Expected Improvement

  • Simpler API surface for the majority use case
  • Better separation between "compute memory state" and "reconstruct full card with scheduling"
  • Lower barrier to entry for non-advanced users

Context

Suggested by @ishiko732 during review of PR #52 (Reschedule feature).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions