Skip to content

feat(frontend): show relay search results on the map - #580

Merged
JuliusHenke merged 1 commit into
masterfrom
feat/search-results-on-map
Oct 10, 2026
Merged

JuliusHenke merged 1 commit into
masterfrom
feat/search-results-on-map

Conversation

@JuliusHenke

Copy link
Copy Markdown
Member

Closes #264 (see the Hacker News comment: users expected their searched relays to be shown on the map).

Changes

  • The relay search dialog shows a "Show N results on map" button once a search term is entered and something matches (large and small screens, both for the global "Search N relays" button and for crowded markers).
  • Clicking it closes the dialog, restricts the map (and stats / "Search N relays" count) to the matching relays and zooms to them (max zoom 6, no animation).
  • The settings overlay shows Map only shows relays matching "…" with a Show all button to remove the filter.
  • The filter is kept while changing days within a month. Since relay details IDs are per month, it is dropped automatically once the selected day contains none of the searched relays.

State lives in a new jotai atom relaySearchOnMapAtom (ResponsiveRelayDetailsDialog.tsx); filtering and zooming happen in LeafletLayers.tsx.

Tests

  • New tests: button appears only with a non-empty search with matches and sets the filter; map draws only the searched relays and zooms to them; filter is dropped when nothing matches; Show all clears it.
  • yarn lint, yarn build and yarn test:run (184 tests, 3 runs) pass. Locally the browser tests were run against the preinstalled Chromium via a temporary executablePath override (not committed).

No dependency changes, so no dependency vetting or SCA was needed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HMEgyHeoN5Nqy5qw7TtLqm


Generated by Claude Code

The relay search dialog now offers "Show N results on map" once a search
term is entered. The map is then restricted to the matching relays and
zooms to them. A notice in the settings overlay tells which search is
applied and lets users show all relays again. The search is forgotten
when the selected day contains none of the searched relays (e.g. after
switching to another month, since relay details IDs are per month).

Closes #264

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HMEgyHeoN5Nqy5qw7TtLqm
@JuliusHenke JuliusHenke added enhancement New feature or request frontend labels Oct 10, 2026 — with Claude
@github-actions

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 63ae5e0):

https://tormap-36f44--pr580-feat-search-results-menhsemw.web.app

(expires Mon, 09 Nov 2026 23:23:40 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 0c1f71965de18e60b0e686b0d0356977fec090dc

@JuliusHenke
JuliusHenke merged commit 8b5b5a3 into master Oct 10, 2026
13 checks passed
@JuliusHenke
JuliusHenke deleted the feat/search-results-on-map branch October 10, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Action to display search results back onto map

2 participants