Skip to content

feat(map): address search jumps the map in placement mode #1134 - #1338

Open
escapedcat wants to merge 2 commits into
mainfrom
feat/placement-address-search
Open

feat(map): address search jumps the map in placement mode #1134#1338
escapedcat wants to merge 2 commits into
mainfrom
feat/placement-address-search

Conversation

@escapedcat

@escapedcat escapedcat commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

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.

  • Explicit submit only — one Nominatim /search request per search the user asks for, the same footprint the old form's address search had (no rate concerns, per precedent)
  • Result list (limit 5), distinct no-match and lookup-failed states; dropdown clears after the jump; zoom-in-only easing like the other point-intent entries
  • searchAddress returns to $lib/geocoding next to reverseGeocode; new add_place_address_jump funnel event; four map.placement.search* keys across all nine locales
  • The pill leaves with the base placement state (hidden during the interrupt and the form)

Screenshot

Placement mode with the search pill open showing two address results above the crosshair pin

image

Testing

🤖 Generated with Claude Code

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
@netlify

netlify Bot commented Sep 5, 2026

Copy link
Copy Markdown

Deploy Preview for btcmap ready!

Name Link
🔨 Latest commit f06ace8
🔍 Latest deploy log https://app.netlify.com/projects/btcmap/deploys/6a9c4d4617f177000790dbee
😎 Deploy Preview https://deploy-preview-1338--btcmap.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 52 (🔴 down 40 from production)
Accessibility: 97 (no change from production)
Best Practices: 92 (🔴 down 8 from production)
SEO: 96 (no change from production)
PWA: 90 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@qodo-code-review

Copy link
Copy Markdown
Contributor

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 30 minutes.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 655084b9-9c56-4cb6-9c03-b93e5946f311

📥 Commits

Reviewing files that changed from the base of the PR and between 01f5838 and f06ace8.

📒 Files selected for processing (16)
  • playwright.config.ts
  • src/lib/analytics.ts
  • src/lib/geocoding.test.ts
  • src/lib/geocoding.ts
  • src/lib/i18n/locales/bg.json
  • src/lib/i18n/locales/de.json
  • src/lib/i18n/locales/en.json
  • src/lib/i18n/locales/es.json
  • src/lib/i18n/locales/fr.json
  • src/lib/i18n/locales/it.json
  • src/lib/i18n/locales/nl.json
  • src/lib/i18n/locales/pt-BR.json
  • src/lib/i18n/locales/ru.json
  • src/routes/map/components/AddPlaceMode.svelte
  • src/routes/map/components/PlacementSearchBar.svelte
  • tests/map-placement-search.spec.ts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 PlacementSearchBar UI for explicit-submit forward geocoding and result selection during placement.
  • Adds searchAddress forward-geocoding helper to $lib/geocoding and 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.

Comment thread src/lib/geocoding.ts
Comment thread src/routes/map/components/PlacementSearchBar.svelte Outdated
Comment thread tests/map-placement-search.spec.ts
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
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.

2 participants