Skip to content

Add SPA episode navigation to avoid rerun WASM reload#345

Open
vertix wants to merge 2 commits intoPositronic-Robotics:mainfrom
vertix:rerun-spa-navigation
Open

Add SPA episode navigation to avoid rerun WASM reload#345
vertix wants to merge 2 commits intoPositronic-Robotics:mainfrom
vertix:rerun-spa-navigation

Conversation

@vertix
Copy link
Copy Markdown
Contributor

@vertix vertix commented Mar 13, 2026

Summary

  • Replace full page reloads with in-place RRD data swapping via rerun's WebHandle API (remove_receiver/add_receiver), keeping the 35MB WASM alive across episode navigation
  • Add a Service Worker with cache-first strategy for /static/rerun/ assets, so the WASM persists across hard refreshes even with self-signed certs
  • Add /api/episode/{id} JSON endpoint for SPA metadata fetching
  • Fix sidebar content accumulating on repeated navigation
  • Add jinja2 dependency (required by starlette's Jinja2Templates)

Test plan

  • Navigate between episodes using prev/next buttons and verify rerun viewer updates without full reload
  • Hard refresh the page and verify WASM loads from Service Worker cache
  • Use browser back/forward and verify correct episode loads
  • Test filtered episode navigation from the episodes table
  • Dismiss filter and verify nav controls restore correctly

vertix added 2 commits March 13, 2026 15:51
Use rerun viewer's `add_receiver`/`remove_receiver` API to swap RRD
data without reloading the iframe. Adds Service Worker to cache WASM
assets and `/api/episode/{id}` endpoint for client-side navigation.
- Reset `viewerReady` on iframe fallback reload
- Use `replaceState` in popstate handler to avoid double history entries
- Clear sidebar content before re-rendering on SPA navigation
- Restore `input.maxLength` in `updateNavControls()` for both modes
- Add `jinja2` to dependencies (required by starlette's Jinja2Templates)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant