mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 18:41:08 +02:00
The mana-geocoding wrapper now returns `notice: 'fallback_used' | 'sensitive_local_unavailable'` alongside results so the UI can show the user *why* a query had unusual behavior. This commit wires that all the way through the Places module's address-autocomplete inputs. Geocoding client (lib/geocoding/index.ts): - Add `GeocodingNotice` and `SearchOutcome` types - Add `searchAddressDetailed` and `reverseGeocodeDetailed` — same semantics as the existing functions but return the wrapper's provider/notice metadata. Existing `searchAddress`/`reverseGeocode` stay backward-compatible (they call the detailed variants under the hood and discard the metadata). - Extend GeocodingResult with optional `provider` field. Places ListView (the only current consumer that exposes typed addresses to users): - Both autocomplete inputs (tracking-edit + main address-search) now use searchAddressDetailed and surface notices inline. - 'sensitive_local_unavailable' renders an amber explainer block in the dropdown — title + body — so the user knows why their medical query returned 0 hits without leaking the search to a public API. - 'fallback_used' renders a small "≈ ungefähr" footer badge so users understand the result came from public OSM (less precise but still valid). - The dropdown opens when EITHER results exist OR a notice is present — sensitive blocked queries with empty results still surface their explainer. i18n: new `places.geocoding_notice.*` sub-namespace in all 5 locales (de/en/es/fr/it) — 4 strings each. All validators green. Other consumers (places DetailView, events, photos, contacts) keep the existing searchAddress/reverseGeocode calls — they don't need the privacy notices today and would just add noise. They can adopt the detailed variant if/when the use case warrants it. |
||
|---|---|---|
| .. | ||
| api | ||
| calc/packages/shared | ||
| calendar | ||
| cards | ||
| chat | ||
| citycorners | ||
| contacts | ||
| context | ||
| docs | ||
| food | ||
| guides | ||
| inventory | ||
| mana | ||
| manavoxel | ||
| memoro | ||
| moodlit | ||
| mukke | ||
| news | ||
| photos | ||
| picture | ||
| plants | ||
| presi | ||
| questions | ||
| quotes/packages/content | ||
| skilltree | ||
| storage | ||
| times | ||
| todo | ||
| traces | ||
| uload | ||