Navigation
How the site layout travels as an Inertia once prop, which navigations skip the server, and how DmsLink prefetches.
Every visit's page object carries three parts. The page (page) holds its route and layout. The session is user and session. The site layout (shared) holds the menu with each entry's access, the quick actions and the modules. The site layout is most of that object and stays 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. To add UI around a page, the dashboard chrome guide shows a real playground side panel. This page describes 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. The browser keeps that copy for five minutes. Until it expires, the server asks the backend for the page alone, at /dms/page?path=…&shared=false.
Signing in, signing out, or switching account or workspace changes the key that the copy is held under. The next visit then brings the new session's layout.
router.reload({ only: ["shared"] }) reloads the layout at once. only and except name any of page, shared, user and session, and the server fetches only what they name. When the backend announces a menu change, the DMS reloads the layout and the page together with only: ["shared", "page"].
The access that a menu entry shows is for display. The backend checks access on every request, whatever the menu says.
Navigations that stay in the browser
Some navigations change only the query or the hash of the page on screen. When they go through useDmsRouter().push({ query }), navigateDms or DmsLink, they are Inertia client-side visits. The URL and the history entry change, the page stays mounted with its props, and the browser sends no request.
To send the request anyway, pass an option that only the server can honour, such as only, data, headers or onStart. Leaving an error page always goes 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 none of them. Switching account or workspace, and signing out, drop the prefetched pages.