ENGLISH·COURSE API
    Preparing search index...

    The browser's ProgressTracker: reads the learner store, writes through the completion Server Actions.

    Writes are optimistic — the mark appears at once — and a refused or failed request puts it back as it was. The requests are injected so this adapter never imports a "use server" module and can be tested with plain fakes.

    const tracker = new LearnerStoreProgressTracker({
    mark: async (lessonId) => (await markLessonCompleteAction({ lessonId }))?.data?.completed === true,
    unmark: async (lessonId) => (await unmarkLessonCompleteAction({ lessonId }))?.data?.unmarked === true,
    });

    Implements