project-nomad/admin/inertia/components
Chris Sherwood 6f8b2e289a fix(maps): null-island bug + persist view across refresh
Two issues from manual testing of the v1.32 maps bundle on NOMAD3:

1. Refresh of /maps flew to (0, 0) at zoom 12 — Gulf of Guinea / null island.
   Root cause: getMapLocationParams() was reading lat/lng with Number(params.get('lat')),
   but Number(null) === 0 and Number('') === 0. When URL had no params (the typical
   refresh case), both lat and lng silently parsed as 0, validation passed (0 is finite
   and in bounds), and handleMapLoad triggered a flyTo (0, 0, 12).

   Fix: check that lat and lng params are present and non-empty before parsing.

2. User expectation: refresh should preserve current map position and zoom.
   Add localStorage persistence (key 'nomad:map-view'). Save on onMoveEnd; restore
   from initialViewState on mount. Priority order: URL params -> saved view -> default.
   Removed now-redundant flyToLocationParams + handleMapLoad — initialViewState handles
   URL params directly.

3. UX improvement: when /maps loads with ?lat=X&lng=Y, pre-fill the page's
   coordinate search input with "lat,lng" so the user can immediately click the
   marker button to drop a pin at that location without re-typing.

Files:
  admin/inertia/components/maps/MapComponent.tsx
    - getMapLocationParams: hard-fail on null/empty params (export now)
    - getSavedMapView: new helper for localStorage view restore (with bounds check)
    - initialViewState: lazy useState picking URL > saved > default
    - onMoveEnd: persist current view to localStorage
    - removed flyToLocationParams + handleMapLoad
  admin/inertia/pages/maps.tsx
    - import getMapLocationParams
    - lazy useState pre-fills coordinateSearch from URL params
2026-04-30 15:49:31 -07:00
..
chat fix(RAG): add start button in kb modal and ensure restart policy exists (#700) 2026-04-27 22:26:46 -07:00
file-uploader feat(KnowledgeBase): support up to 5 files upload of 100mb each per req 2026-04-03 14:26:50 -07:00
inputs feat(UI): add Night Ops dark mode with theme toggle 2026-03-20 11:46:10 -07:00
layout feat(UI): add Night Ops dark mode with theme toggle 2026-03-20 11:46:10 -07:00
maps fix(maps): null-island bug + persist view across refresh 2026-04-30 15:49:31 -07:00
markdoc feat(UI): add Night Ops dark mode with theme toggle 2026-03-20 11:46:10 -07:00
systeminfo feat(UI): add Night Ops dark mode with theme toggle 2026-03-20 11:46:10 -07:00
ActiveDownloads.tsx feat(downloads): rich progress, friendly names, cancel, and live status (#554) 2026-04-03 14:26:50 -07:00
ActiveEmbedJobs.tsx feat(UI): add Night Ops dark mode with theme toggle 2026-03-20 11:46:10 -07:00
ActiveModelDownloads.tsx fix(AI): allow cancelling in-progress model downloads and ensure consistent progress UI (#701) 2026-04-17 14:43:41 -07:00
Alert.tsx fix(UI): manual import map for DynamicIcon to avoid huge bundle of Tabler icons 2026-04-03 14:26:50 -07:00
BouncingDots.tsx feat(UI): add Night Ops dark mode with theme toggle 2026-03-20 11:46:10 -07:00
BouncingLogo.tsx feat: switch all PNG images to WEBP (#575) 2026-04-03 14:26:50 -07:00
BuilderTagSelector.tsx fix(UI): switch to tabler icons only for consistency 2026-01-31 20:39:49 -08:00
CategoryCard.tsx feat: curated content system overhaul 2026-02-11 15:44:46 -08:00
CuratedCollectionCard.tsx feat: curated content system overhaul 2026-02-11 15:44:46 -08:00
DebugInfoModal.tsx fix(UI): minor styling fixes for Night Ops 2026-03-20 11:46:10 -07:00
DownloadURLModal.tsx feat(UI): add Night Ops dark mode with theme toggle 2026-03-20 11:46:10 -07:00
DynamicIcon.tsx fix(UI): manual import map for DynamicIcon to avoid huge bundle of Tabler icons 2026-04-03 14:26:50 -07:00
Footer.tsx feat(UI): add Debug Info modal for bug reporting 2026-03-20 11:46:10 -07:00
HorizontalBarChart.tsx feat(UI): add Night Ops dark mode with theme toggle 2026-03-20 11:46:10 -07:00
InfoTooltip.tsx fix(UI): switch to tabler icons only for consistency 2026-01-31 20:39:49 -08:00
InstallActivityFeed.tsx fix(UI): constrain install activity feed height with auto-scroll (#611) 2026-04-03 14:26:50 -07:00
LoadingSpinner.tsx fix(ui): support proper size override of LoadingSpinner 2026-03-20 11:46:10 -07:00
MarkdocRenderer.tsx feat(docs): polish docs rendering with desert-themed components 2026-02-06 14:41:30 -08:00
ProgressBar.tsx feat(UI): add Night Ops dark mode with theme toggle 2026-03-20 11:46:10 -07:00
StorageProjectionBar.tsx feat(UI): add Night Ops dark mode with theme toggle 2026-03-20 11:46:10 -07:00
StyledButton.tsx feat(UI): add Night Ops dark mode with theme toggle 2026-03-20 11:46:10 -07:00
StyledModal.tsx feat(UI): add Night Ops dark mode with theme toggle 2026-03-20 11:46:10 -07:00
StyledSectionHeader.tsx feat: curated zim collections 2025-12-05 15:47:22 -08:00
StyledSidebar.tsx fix: cache docker list requests, aiAssistantName fetching, and ensure inertia used properly 2026-04-03 14:26:50 -07:00
StyledTable.tsx feat(UI): add Night Ops dark mode with theme toggle 2026-03-20 11:46:10 -07:00
ThemeToggle.tsx fix(UI): improve version display in Settings sidebar (#547) 2026-03-25 16:30:35 -07:00
TierSelectionModal.tsx fix(UI): use StyledButton in TierSelectionModal for consistency (#543) 2026-03-25 16:30:35 -07:00
UpdateServiceModal.tsx feat(UI): add Night Ops dark mode with theme toggle 2026-03-20 11:46:10 -07:00
WikipediaSelector.tsx fix(ui): support proper size override of LoadingSpinner 2026-03-20 11:46:10 -07:00