cleanup: centralize geocoding provider config #350

Merged
barrettruth merged 1 commit from cleanup/geocoding-provider-config-315-v2 into main 2026-05-11 20:29:39 +00:00
Owner

Problem

  • Geocoding provider IDs, labels, token fields, lookup behavior, and credential tests were split across the settings UI and API routes.
  • Location lookup failures were easy to lose in the task panel, even though task creation/editing should remain usable.

Solution

  • Add a small geocoding provider contract and core helper while preserving Photon, Mapbox, and Google Maps choices.
  • Keep the runtime geocoding token contract current-only with api_key; no old token/payload aliases are accepted.
  • Route /api/geocode, settings provider selection, and integration credential tests through the shared geocoding helpers.
  • Keep blank no-credential instances on Photon, preserve Mapbox env fallback, and let an explicit Photon selection override that env fallback.
  • Surface geocoding failures in the task panel suggestions without blocking manual task creation or editing.

Verification

  • nix develop --command pnpm exec vitest run tests/core/geocoding.test.ts tests/api/geocode.test.ts tests/api/integrations-test-route.test.ts tests/lib/calendar-settings-section.test.ts --reporter=verbose
  • nix develop --command just lint
  • nix develop --command just test
  • nix develop --command just build

Closes #315

Problem - Geocoding provider IDs, labels, token fields, lookup behavior, and credential tests were split across the settings UI and API routes. - Location lookup failures were easy to lose in the task panel, even though task creation/editing should remain usable. Solution - Add a small geocoding provider contract and core helper while preserving Photon, Mapbox, and Google Maps choices. - Keep the runtime geocoding token contract current-only with `api_key`; no old token/payload aliases are accepted. - Route `/api/geocode`, settings provider selection, and integration credential tests through the shared geocoding helpers. - Keep blank no-credential instances on Photon, preserve Mapbox env fallback, and let an explicit Photon selection override that env fallback. - Surface geocoding failures in the task panel suggestions without blocking manual task creation or editing. Verification - `nix develop --command pnpm exec vitest run tests/core/geocoding.test.ts tests/api/geocode.test.ts tests/api/integrations-test-route.test.ts tests/lib/calendar-settings-section.test.ts --reporter=verbose` - `nix develop --command just lint` - `nix develop --command just test` - `nix develop --command just build` Closes #315
cleanup: centralize geocoding provider config
All checks were successful
quality / Test (pull_request) Successful in 16s
quality / Lint (pull_request) Successful in 20s
quality / Build (pull_request) Successful in 44s
666c60e3f7
barrettruth deleted branch cleanup/geocoding-provider-config-315-v2 2026-05-11 20:29:39 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
barrettruth/delta!350
No description provided.