Files
PodTui/src/utils
Michael Freno 1b55b7117c feat(player): restore the last player session at boot
Reload the episode that was loaded in the player when the previous run
ended (persisted on play/load and synchronously at exit) into the Player
tab paused at its saved position — never autostarted. Episodes at or
above 98% completion are skipped, as are empty-player and unsubscribed
episodes.

- useAudio gains load(episode) (sets currentEpisode/position/Now Playing
  without starting the backend) and restoreLastSession(), triggered once
  at boot and serialized through a chain so a late-finishing boot restore
  can't clobber later state.
- togglePlayback branches on a startedPlayback flag: a restored episode
  starts the backend from the saved position; a paused one resumes.
- stop() clears the marker; the exit teardown writes it synchronously
  (process.exit bypasses async writes).
- feed/progress stores expose whenReady() so restore waits for the async
  boot loads; feed store gains findEpisode().
- app-persistence serializes last-player marker writes and exposes
  waitForLastPlayerWrite() for deterministic tests.
- tests/restore-session.test.ts: real modules + local RSS feed server;
  the real useAudio is imported via a ?restore-test query suffix to
  bypass the suite's mock.module leak across shared bun workers.
2026-08-11 13:18:00 -04:00
..
2026-02-05 01:07:22 -05:00
2026-08-07 18:59:25 -04:00
2026-08-09 09:54:52 -04:00
2026-02-05 01:07:22 -05:00
2026-08-09 09:54:52 -04:00
2026-08-09 09:54:52 -04:00
2026-02-04 00:06:16 -05:00
2026-02-05 22:55:24 -05:00
2026-08-09 09:54:52 -04:00
2026-02-06 00:00:15 -05:00
2026-02-05 22:55:24 -05:00
2026-02-05 01:07:22 -05:00
2026-02-05 01:07:22 -05:00
2026-08-09 09:54:52 -04:00
2026-08-09 09:54:52 -04:00
2026-08-09 09:54:52 -04:00