project-nomad/admin
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
..
app changed the color sort to use hue so that when custom colors are introduced it will sort in a way that is logically consistent. 2026-04-28 10:03:38 -04:00
bin feat: curated content system overhaul 2026-02-11 15:44:46 -08:00
commands fix(Jobs): improved error handling and robustness 2026-04-03 14:26:50 -07:00
config fix: cache docker list requests, aiAssistantName fetching, and ensure inertia used properly 2026-04-03 14:26:50 -07:00
constants feat(Kiwix): migrate to Kiwix library mode for improved stability (#622) 2026-04-03 14:26:50 -07:00
database fix(qdrant): disable anonymous telemetry by default (#747) 2026-04-20 15:25:58 -07:00
docs docs: add map markers to API reference (#783) 2026-04-27 22:21:06 -07:00
inertia fix(maps): null-island bug + persist view across refresh 2026-04-30 15:49:31 -07:00
providers fix(RAG): add start button in kb modal and ensure restart policy exists (#700) 2026-04-27 22:26:46 -07:00
public feat: switch all PNG images to WEBP (#575) 2026-04-03 14:26:50 -07:00
resources/views feat: switch all PNG images to WEBP (#575) 2026-04-03 14:26:50 -07:00
start fix(RAG): add start button in kb modal and ensure restart policy exists (#700) 2026-04-27 22:26:46 -07:00
tests feat: initial commit 2025-06-29 15:51:08 -07:00
types Addressed further pr comments about the api, onSave async, and adding a comment about rehypeRaw 2026-04-29 02:57:37 -04:00
util feat: display model download progress 2026-02-06 16:22:23 -08:00
views feat: initial commit 2025-06-29 15:51:08 -07:00
.editorconfig feat: initial commit 2025-06-29 15:51:08 -07:00
.env.example feat: Add Windows Docker Desktop support for local development 2026-01-19 10:29:24 -08:00
ace.js feat: initial commit 2025-06-29 15:51:08 -07:00
adonisrc.ts fix(RAG): add start button in kb modal and ensure restart policy exists (#700) 2026-04-27 22:26:46 -07:00
eslint.config.js feat: openwebui+ollama and zim management 2025-07-09 09:08:21 -07:00
package-lock.json Updated the map markers so they can be edited as well as to permit markdown in the notes field. 2026-04-27 16:02:21 -04:00
package.json build(deps-dev): bump vite from 6.4.1 to 6.4.2 in /admin (#677) 2026-04-17 14:47:31 -07:00
tailwind.config.ts feat: initial commit 2025-06-29 15:51:08 -07:00
tsconfig.json feat: initial commit 2025-06-29 15:51:08 -07:00
vite.config.ts fix(Maps): ensure proper parsing of hostnames (#640) 2026-04-03 14:26:50 -07:00