Skip to content

v4.28.1

Choose a tag to compare

@rodrigoslayertech rodrigoslayertech released this 24 Sep 14:40
· 11 commits to main since this release

Focus: the sidebar menu of server-rendered pages now follows the first navigation after a reload.

Changes

  • 🛠️ Fixed the sidebar menu of server-rendered (SSR) pages staying on the previous route after a reload: it hydrated only on interaction, so switching book, following previous/next or any link left the old book's tree on screen, and a later hover hydrated it with stale links and highlights. The menu now hydrates right before the first client-side navigation, while the route still matches the server markup, and follows every navigation after it.
  • ⏳ A navigation that starts before the menu's code has arrived waits for it (at most five seconds, and not at all when the download fails or the page has no sidebar), so a quick click on a slow connection gets a correct menu too.
  • 🪶 Same-page navigations (table-of-contents and heading anchors) keep the menu asleep, and an error while waking it no longer cancels the navigation.
  • ✅ Validated with 726 unit tests, mutation checks, and SSR fixture builds in a headless browser: book switch and next-page click after a reload, a held and a stalled menu chunk, and a first page without a sidebar.