feat(map): address search jumps the map in placement mode #1134 - #1338
feat(map): address search jumps the map in placement mode #1134#1338escapedcat wants to merge 2 commits into
Conversation
The storyboard's address-first path: people who know the street but not the map type it into a pill above the crosshair and jump there — the pin stays centered, so the jump IS the placement, and dedupe still runs at confirm. Explicit submit only (one Nominatim /search per ask, the old form-search footprint); results list, no-match and failure states; new add_place_address_jump event; four i18n keys ×9 locales. searchAddress returns to $lib/geocoding alongside reverseGeocode. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NjZ7qPmjDm85vTn9MbS2uS
✅ Deploy Preview for btcmap ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
|
Warning Review limit reachedNext included review available in 30 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (16)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🟡 Changes recommended
It introduces new forward-geocoding logic without the corresponding unit tests in the existing geocoding.test.ts, and there are a couple of correctness/determinism issues (keyed list uniqueness, locale-dependent e2e assertions) that should be fixed first.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds an address-search “pill” to map placement mode so users can type an address, pick a result, and have the map ease to that location while keeping the placement pin centered (making the jump itself the placement).
Changes:
- Introduces
PlacementSearchBarUI for explicit-submit forward geocoding and result selection during placement. - Adds
searchAddressforward-geocoding helper to$lib/geocodingand a new analytics event (add_place_address_jump). - Adds a new Playwright spec covering jump/no-match behavior and pill unmounting, plus i18n strings for all supported locales.
File summaries
| File | Description |
|---|---|
| tests/map-placement-search.spec.ts | New e2e coverage for placement-mode address search and map hash changes. |
| src/routes/map/components/PlacementSearchBar.svelte | New placement-mode search UI with explicit submit, results dropdown, and analytics tracking. |
| src/routes/map/components/AddPlaceMode.svelte | Wires the placement search pill into placement mode and adds “jump” easing behavior. |
| src/lib/i18n/locales/*.json (9 files) | Adds translated strings for the placement search UI. |
| src/lib/geocoding.ts | Adds searchAddress forward-geocoding helper and result typing. |
| src/lib/analytics.ts | Extends EventName union with add_place_address_jump. |
Review details
- Files reviewed: 14/14 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Review findings, all taken: searchAddress gets the unit tests its
sibling reverseGeocode has (URL/params, coordinate filtering, rejection
on failure) — and writing them exposed that Number("") is 0, so an
empty Nominatim coordinate mapped to a Null-Island-adjacent value;
empty strings are now rejected before parsing. Result rows key by the
full lat/lon/name tuple since Nominatim can repeat display names. The
suite pins locale to en-US in the Playwright config — every spec
asserts English strings, so runs on non-English machines were only
deterministic by luck.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NjZ7qPmjDm85vTn9MbS2uS

What
The storyboard's address-first placement path (#1134, screen 1): a search pill above the crosshair while placing a pin — type an address, pick a result, the map eases there. The pin stays centered, so the jump is the placement, and the duplicate check still runs at confirm.
/searchrequest per search the user asks for, the same footprint the old form's address search had (no rate concerns, per precedent)searchAddressreturns to$lib/geocodingnext toreverseGeocode; newadd_place_address_jumpfunnel event; fourmap.placement.search*keys across all nine localesScreenshot
Testing
map-placement-search.spec.ts: jump moves the hash to the result, no-match message without a jump, pill unmounts with placement🤖 Generated with Claude Code