Skip to content

Add offline presentation cache fallback#15

Merged
merval merged 1 commit into
mainfrom
codex/cache-presentation-with-speaker-notes
May 31, 2026
Merged

Add offline presentation cache fallback#15
merval merged 1 commit into
mainfrom
codex/cache-presentation-with-speaker-notes

Conversation

@merval

@merval merval commented May 31, 2026

Copy link
Copy Markdown
Member

Motivation

  • Ensure the speaker view has the full presentation slides, thumbnails and notes available even if the connection to ProPresenter is lost so the speaker can continue advancing slides with access to notes.
  • Provide a graceful offline UX by falling back to previously cached presentations and by letting local navigation advance notes when trigger calls fail.

Description

  • Add browser storage keys and helpers in propresenter_notes/static/app.js to persist the presentation list and per-presentation cached slide payloads (presentationsStorageKey, presentationCacheStoragePrefix, readStoredJson, writeStoredJson, readStoredPresentationCache, and writeStoredPresentationCache).
  • Persist the presentation list after successful /api/presentations and fall back to the saved list when the live request fails, showing an explanatory cache status message.
  • Save the server-provided presentation cache from /api/presentation-cache/:id to browser storage (stripping the large raw payload) and fall back to that cached slide set when live caching fails, with the UI entering an offline mode message.
  • Make triggerSlide resilient by catching failures from the trigger endpoint and returning false so navigation UI (Previous/Next, keyboard, swipe, thumbnails) still advances notes locally from the cached slides while showing an offline status.
  • Wrap initial loading of presentations/cache in try/catch so startup surfaces a helpful offline message instead of failing silently and document the offline behavior in README.md.

Testing

  • Static JS syntax check with node --check propresenter_notes/static/app.js succeeded.
  • Ran the full Python unit test suite with python -m unittest discover -s tests -v, which ran 59 tests and all passed (OK).

Codex Task

@merval merval merged commit ed6cd02 into main May 31, 2026
1 check passed
@merval merval deleted the codex/cache-presentation-with-speaker-notes branch May 31, 2026 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant