Skip to content

feat: build location-selection task with privacy-safe location preview#428

Draft
digital-pro wants to merge 15 commits intomainfrom
feature/location-selection-task-scaffold
Draft

feat: build location-selection task with privacy-safe location preview#428
digital-pro wants to merge 15 commits intomainfrom
feature/location-selection-task-scaffold

Conversation

@digital-pro
Copy link
Collaborator

@digital-pro digital-pro commented Mar 5, 2026

Summary

NOTE: THIS IS JUST A POC OF GEO PLUMBING. NOT TO BE MERGED, BUT TO BE THE BASIS OF A REAL TASK

  • Add a new location-selection task flow with three input paths (GPS, US map pick, and city/postal autocomplete), improved onboarding UI, and review/confirm UX.
  • Compute and display a privacy-safe location_v1 payload preview (H3-based center, baseline/effective cells, threshold metadata) while hiding raw coordinates.
  • Add dev-server population lookup endpoints with Kontur-first and WorldPop fallback wiring to power effective-cell selection in preview, plus robust selection and layout fixes discovered during QA.
  • Add a debug-only save UI to send location payloads to the functions emulator or -dev, and expose the Firebase app/config for that flow.
  • Cap H3 max resolution at 7 for location computations and align emulator ports with the functions repo.

Test plan

  • Run npm run build in task-launcher.
  • Run npm run dev:db and open ?task=location-selection&lng=en.
  • Verify intro/mode selection, GPS auto-capture flow, US-constrained map picking, and city/postal explicit selection behavior.
  • Verify review screen layout and confirm payload preview includes populationSource and no raw coordinates.
  • Validate preview channel link for team testing.
  • Run ?task=locationselection&locationSaveDebug=true and save to emulator; confirm locations doc appears in emulator UI.

digital-pro added 6 commits March 4, 2026 13:26
Add a new location-selection task scaffold with mode selection and placeholder GPS/map/city-postal trials, and wire task launcher safeguards so the task runs without corpus or assets-per-task entries.
Handle missing media prefixes gracefully and align getMediaAssets argument ordering so new task scaffolds can run without pre-provisioned bucket assets.
Add production-like location-selection behavior with browser GPS capture, US-constrained map picking with contextual labels, and country-scoped city/postal autocomplete. Improve participant-facing instructions and persist selected location drafts through review for end-to-end task testing.
Upgrade the location-selection flow with a first-screen mode chooser, improved layout readability, and a computed Location schema preview that hides raw coordinates. Add real Kontur-first and WorldPop fallback population APIs for effective H3 resolution selection in review.
Center and normalize location-selection panel layout across trials, simplify GPS flow, and tighten city/postal selection so explicit user picks are respected. Improve population-source attribution and config plumbing so Kontur-first fallback behavior is reflected in the computed commit preview.
Parse WorldPop total_population responses and add direct API fallback for preview/static environments where local middleware is unavailable. Enable vertical scrolling for location-selection screens and include candidate diagnostics rendering on review.
@digital-pro digital-pro marked this pull request as draft March 5, 2026 16:42
digital-pro added 9 commits March 5, 2026 09:52
Enable a debug save UI for location selection, cap H3 resolution at 7, and expose the Firebase app/config to support emulator saves.
Document the location-selection save debug URL and emulator ports.
Load a compressed Kontur cache from levante-assets-dev, add batch lookup endpoint, and enable optional batched population lookup.
Load compressed kontur shards from levante-assets-dev/maps/kontur-h3-r5 and document shard layout.
Add a repeatable script to download the kontur dataset and generate R5 shards, plus README instructions.
Ignore venv/data/log files and update the kontur shard builder docs.
Ignore local venv/data/log artifacts in the task-launcher folder.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant