The drawing rail's option bar covered the Transform button. ol-ext positions
the flyout with `left: 100%`, which is meant to clear the whole rail; the rule
that makes that work sets the rail's controls to `position: static`, and it
only tied with ol-ext's own `.ol-control.ol-bar .ol-control` on specificity, so
stylesheet order decided it and ol-ext's injected sheet came last. The flyout
was therefore measured against the Select button and landed on the second
column. The selector now carries enough classes to win outright. This is the
same failure as v16, in a second place.
The local database did not open when the device was offline. The fetch handler
skipped every request whose destination was 'worker', to stay clear of the Vite
dev server's module plumbing — but in a build SQLocal's worker is a hashed file
under /assets/, so it was never cached either. With the network down the
request failed, initSchema() never resolved, and everything waiting on the
database stopped without an error. The shell, the map and the tiles all worked,
so the application looked like it was surviving offline while nothing could be
saved or read. The skip now covers only the dev server's own paths; a built
worker is cached like any other asset. Verified both ways against a production
build with the preview server stopped: before, the schema hangs and the table
list is empty; after, the schema completes and all twelve tables are listed.
The service worker is no longer registered on the development server. It cannot
do its job there anyway — the modules it would need come from node_modules,
which it deliberately keeps clear of — while it does cache main.js and src/*.js
cache-first, so it can serve a stale module and fight hot reloading. In Safari
it also costs the local database outright: a worker script that reaches the
browser through a controlling service worker loses its cross-origin-isolation
headers, and SQLocal's worker is refused. Because switching registration off
does nothing for a worker already installed, initPWA now unregisters whatever
it finds and clears the app caches when registration is off. That clearing runs
on every load rather than only on the one that unregistered: an unregistered
worker goes on controlling its page until the next navigation and refills the
caches behind us. The tile caches are left alone — they hold what an officer
downloaded for field work.
CACHE_VERSION goes to v27 for the first two.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Major:
- GPS trail recording: reusable, dependency-free engine in src/geotracker/
(GeoTracker + geo-utils) with pluggable storage/sync adapters; LUPMIS
wiring in src/geotracker-lupmis.js. Expandable My Location control
(Locate Me + Record Trail), live navbar GPS readout, on-map trail/position
rendering, gps_trails/gps_trail_points SQLocal tables, and store-and-forward
sync via pushGpsTrail() -> save_gps_trail.php (server side documented, not
yet built).
- SSO authentication: public/index.php entry point validates the LUSPA SSO
cookie and injects window.LUPMIS_SESSION; remotedb district_id is now a
session-resolved getter. Adds public/.htaccess (DirectoryIndex).
- Account menu offcanvas (navbar burger) with sign-in/out states.
UI / fixes:
- LayerSwitcher modernisation; base-map "None" option in picker + settings.
- Mobile drawing toolbar wraps to two rows below 576px and shows only in
Draw mode; second row right-aligned and clears the Select option bar.
- Safari bottom-dock clipping fixed (app-container 100dvh -> 100svh).
- Rename public/icons -> app-icons to dodge Apache's default /icons/ alias.
- Service Worker bumped to v8 (network-first HTML, per-provider tile clear).
Docs: reusable-mapping and OSM-3D-buildings concept notes; ignore Office
lock files (~$*). Rebuilt dist/.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>