• feat: add SPA navigation with view transitions

    ryan released this 2026-02-12 23:52:47 +00:00 | 37 commits to main since this release

    Swap page content over the existing SSE connection without full page
    loads. A persistent Context resets its page-specific state (signals,
    actions, intervals, subscriptions) on navigate while preserving the
    SSE stream, CSRF token, and session.

    • c.Navigate(path) for programmatic SPA navigation from actions
    • Injected JS intercepts same-origin clicks (opt out with
      data-via-no-boost) and handles popstate for back/forward
    • v.Layout() wraps pages in a shared shell for DRY nav/chrome
    • View Transition API integration via WithViewTransitions() on
      PatchElements and h.DataViewTransition() helper
    • POST /_navigate endpoint with CSRF validation and rate limiting
    • pageStopChan cancels page-level OnInterval goroutines on navigate
    • Includes SPA example with layout, counter, and live clock pages
    Downloads