feat(spa): collapse sidebar to Dashboard-only while server is down #417
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/MAPPS-358-server-down-sidebar"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
While mokosh-server is unreachable, the data-driven pages already swap in the MAPPS-351 ContentUnavailable "cannot connect / return to dashboard" body (retrofitted across pages in MAPPS-357) and the MAPPS-333 outage banner sits above the layout. The sidebar, however, still offered every section, so a user could click into any destination during an outage only to land on the same "can't load this page" state - dead-end navigation.
Collapse the sidebar to just the Dashboard entry whenever the server is unreachable, leaving the one coherent place to keep the user (matching the outage page's "return to dashboard" affordance). SidebarContent reads the MAPPS-333 reachability flag via use_server_reachable, so the rail collapses the instant the server goes down and every section returns the instant the recovery poll flips the flag back. Both the desktop rail and the mobile drawer inherit this since they share SidebarContent.
The down/recovery decision is factored into the pure full_nav_visible(server_reachable) predicate, mirroring the classify_remote idiom, so the transitions are unit-testable without a renderer. A test walks reachable -> down (Dashboard-only) -> recovered (full nav restored).
#MAPPS-358