Function
The course the lesson belongs to, for the link's route
Finishing a lesson and starting the next one are one moment for the learner, so they share one surface: the card sits at the end of the center column, right after the lesson's own content, and offers the next lesson as a control-sized target instead of a line of text in the rail.
The card is the page's only next-lesson affordance and renders the same at every width. It began as a phone-only block — the desktop collapsed it to a bare button and pointed at a rail card instead — until the learner asked for the same closing surface everywhere; the rail card went with the collapse, so the next lesson is still offered exactly once.
Up next is a different question from "continue": it is simply the lesson
after this one in the course, whatever the learner has watched. Where to
continue — which may skip finished videos — is answered only by
findContinueTarget, used by the course overview, the module overview and
My learning.
The completion control arrives as children rather than being rendered
here, so this component stays presentational — it knows nothing of the
Server Action, the lesson id or the progress store, and nothing of whether
the lesson is complete. The control owns that state and the copy that
changes with it; the card owns the surface and the next lesson.
The end-of-lesson block: the "Mark as complete" action and the next lesson as one closing surface.