From 7f03b046ab6b32fafbb18d8d112054840de21d5b Mon Sep 17 00:00:00 2001 From: rouggy Date: Mon, 7 Sep 2026 12:07:12 +0200 Subject: [PATCH] fix(sat): the locator was already set, and the map was on top of everything MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two things reported together on the new tab. The locator: the station's is on the ACTIVE PROFILE, not in a settings key. keyStationMyGrid is a legacy key that EnsureDefault migrated into the profile long ago and nothing writes any more, so reading it told an operator with a perfectly good locator on screen that he had not set one — and refused every pass prediction on the strength of it. The map: Leaflet stacks its panes and controls up to z-index 1000, which without a stacking context of their own float over the whole application — Preferences opened behind the map, its Save and Close buttons under it. The other three maps in OpsLog each carry `isolate` for exactly this reason; this one was missing it. --- app_sat.go | 11 +++++++++-- frontend/src/components/SatellitePanel.tsx | 8 ++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/app_sat.go b/app_sat.go index cc77e51..8cc4805 100644 --- a/app_sat.go +++ b/app_sat.go @@ -339,8 +339,15 @@ func (a *App) SaveSatSettings(s SatSettings) error { func (a *App) satObserver() (sat.Observer, error) { set := a.satSettings() grid := set.Grid - if grid == "" && a.settings != nil { - grid, _ = a.settings.Get(a.ctx, keyStationMyGrid) + if grid == "" && a.profiles != nil { + // The station locator lives on the ACTIVE PROFILE, not in a settings key. + // keyStationMyGrid is a legacy key that EnsureDefault migrated into the + // profile years ago and nothing writes any more — reading it told an + // operator with a perfectly good locator on screen that he had not set + // one. + if p, err := a.profiles.Active(a.ctx); err == nil { + grid = p.MyGrid + } } grid = strings.TrimSpace(grid) lat, lon, ok := gridToLatLon(grid) diff --git a/frontend/src/components/SatellitePanel.tsx b/frontend/src/components/SatellitePanel.tsx index d7b8d2b..a45c1a3 100644 --- a/frontend/src/components/SatellitePanel.tsx +++ b/frontend/src/components/SatellitePanel.tsx @@ -415,8 +415,12 @@ export function SatellitePanel({ myGrid }: { myGrid: string }) { {err &&
{err}
}
- {/* The map. */} -
+ {/* The map. isolate is load-bearing, not tidiness: Leaflet stacks its + own panes and controls up to z-index 1000, which without a stacking + context of their own float over Preferences and every dialog in the + app — the map ends up on top of the very buttons that would close + it. */} +