The AI chat side panel lived inside each per-page layout
(SettingsPageLayout and the record body container), so React unmounted
and remounted it on every navigation — the chat reloaded and lost its
state whenever you opened another record or settings page.
Hoist the side panel into a new persistent layout route,
MainAppLayoutWithSidePanel, that wraps every main-app route (records,
page layouts, settings). The panel is now a stable sibling of the routed
Outlet, so it stays mounted — and the AI chat keeps its state — while
only the page content reloads. PageChangeEffect already exempts the AI
chat from its close-on-navigation logic, so the panel now genuinely
persists instead of just re-opening.
- MainAppLayoutWithSidePanel owns the side panel + command-menu hotkeys;
SettingsPageLayout and the record body container no longer render their
own panel.
- MainContainerLayoutWithSidePanel renamed to MainContainerLayout since
it no longer owns a panel.
- SidePanelForDesktop carries its own margin so it floats correctly as a
top-level sibling; the margin collapses with the panel when closed, so
pages render unchanged while it is closed.
- On a full reload the settings route shows the rounded-card skeleton
(matching in-app navigation) instead of the legacy page skeleton.