Navigation
Every visit's page object carries the page (page: its route and layout), the session (user, session) and the site layout (shared: the menu with each entry's access, quick actions, modules). The site layout is most of that object, and the same from page to page, so it travels as an Inertia once prop.
See the built-in dashboard for the shell and its command-palette capture. To add UI around a page, the dashboard chrome guide shows a real playground side panel. The rules below describe how navigation loads that UI, not how to register menu entries or panels.
The site layout, once
- The server sends the layout when the browser does not hold it for the session's account and workspace, then asks the backend for the page alone (
/dms/page?path=…&shared=false) while the browser's copy is less than five minutes old. - Signing in, signing out, or switching account or workspace changes the key the copy is held under, so the next visit brings the new session's layout.
router.reload({ only: ["shared"] })reloads it at once.onlyandexceptname any ofpage,shared,userandsession, and the server fetches only what is named. The DMS reloads the menu this way when the backend announces a change.
Navigations that stay in the browser
A navigation that changes only the query or the hash of the page on screen, through useDmsRouter().push({ query }), navigateDms or DmsLink, is an Inertia client-side visit. The URL and the history entry change, the page stays mounted with its props, and no request is made, since the page props depend on the path alone.
Pass a server-only option (only, data, headers, onStart…) to make the request anyway. An error page is always left through the server.
Prefetching
DmsLink prefetches the page it points to on hover. Once Inertia has the props, the page, its layout and its block components start loading, so following the link waits for neither. A change of account or workspace, and signing out, drop the prefetched pages.
Rendering model
How a page is server-rendered, hydrated and then navigated with Inertia, following a request from the browser to the backend and back.
Data loading
useDmsAsyncData, useDmsFetch, useDmsPagedData and useDmsState, how a server render waits for and transfers their data, and how the browser revalidates it.