map: mount without waiting on the 500-call window; legend collapsible, hidden under open layers list
The Live map was held behind useCalls(500), measured at ~9.2s to first map paint on prod; it now mounts as soon as the saved view is known (nodes are awaited only when there is no view). The legend painted over the expanded Leaflet layers list (z-1001 vs the map's z-0 stacking context): it is now a <details> that hides while the list is open and starts folded on short viewports. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
7cd289874a
commit
36fdfb2758
@@ -560,7 +560,11 @@ export function LiveView() {
|
||||
{/* Degraded → grey the map and its incident rail (the rail lives inside
|
||||
MapView, so it is wrapped here rather than edited). */}
|
||||
<div className={`w-full h-full transition-[filter,opacity] ${health.degraded ? "grayscale opacity-60" : ""}`}>
|
||||
{nodesLoading || callsLoading || !mapState ? (
|
||||
{/* Mount the map as soon as its starting view is known. The 500-call
|
||||
window took ~9s on prod and used to hold the whole map back;
|
||||
calls and paths now stream in once it lands. Nodes are only
|
||||
awaited when there's no saved view, since they pick the centre. */}
|
||||
{!mapState || (!mapState.view && nodesLoading) ? (
|
||||
<div className="w-full h-full flex items-center justify-center text-ink-muted text-sm">Loading map…</div>
|
||||
) : (
|
||||
<MapView
|
||||
|
||||
Reference in New Issue
Block a user