Skip to content

Continue Learning

The Continue Learning card in the sidebar picks up your most recent learning session and brings you back to it in one click. It runs whenever you have an active EchoSession and the player is not already showing something else.

What it shows

For the most recent active session, the card displays:

  • Thumbnail — the media's poster image, or a generated cover if the source has no poster
  • Title — the video or audio name
  • Language — two-letter language code, uppercased
  • Last activity — relative time (for example, "2 hours ago")
  • Progress bar — your position in the media, expressed as a percentage
  • Continue button — labelled with the same text as the card title

When it appears

The card only appears when all of these are true:

  1. The player is idle — there is no current session loaded in the player store
  2. There is at least one active echo session for the signed-in user
  3. The session's target media (video or audio) still exists in your library

If any of those is false, the card is hidden so it never points to a dead session or duplicates the player's own state.

How it finds the most recent session

The card uses a two-step lookup:

  1. It asks getMostRecentActiveEchoSession() for the newest active session.
  2. If that session's media has been deleted, it falls back to scanning all active sessions in lastActiveAt order and returns the first one whose media is still present.

This keeps the card useful even when your most recent video has been removed from the library.

How to resume

Click Continue. The card calls the same useLoadMedia hook the rest of the app uses, so resuming restores:

  • The correct media (video or audio)
  • The saved playhead position from the session
  • The player's transcript, vocabulary, and other media-bound state

If loading fails, the error is silenced (it is logged but not surfaced) so the card stays out of the way of normal browsing.

Data source

The card reads from the local IndexedDB store (EchoSession table) through Dexie. It does not make a network request on mount — the query is cached for 30 seconds, and the media lookup is cached for 60 seconds.

Translatable strings

The card title and button label both resolve to the continueLearning key in the home namespace. Add or override it in your locale's home.json to localize the surface:

json
{
  "continueLearning": "Continue Learning"
}
  • Shadow Reading — the feature that creates and updates the EchoSession records this card reads
  • Media Library — where the card's target videos and audios live