Skip to content

Add confirmed family members and reverse DNS details to relay dialog#451

Closed
center2055 wants to merge 1 commit intoTorMap:masterfrom
center2055:issue-26-relay-details
Closed

Add confirmed family members and reverse DNS details to relay dialog#451
center2055 wants to merge 1 commit intoTorMap:masterfrom
center2055:issue-26-relay-details

Conversation

@center2055
Copy link
Copy Markdown

Fixes #26.

Summary

  • return enriched relay details with confirmed family members and verified/unverified reverse-DNS host names
  • add backend lookup and caching for reverse-DNS results
  • render the new relay dialog sections and add an explicit action to show the confirmed family on the map

Verification

  • ./gradlew.bat test --tests org.tormap.service.ReverseDnsLookupServiceTest --tests org.tormap.service.RelayDetailsQueryServiceTest
  • corepack yarn install --immutable
  • corepack yarn build
  • corepack yarn lint

Notes

  • The full backend Spring test suite still depends on Docker/Testcontainers; it was not runnable in this environment without Docker.

@JuliusHenke
Copy link
Copy Markdown
Member

Hey @center2055 thanks a lot for your PR! I just saw it and will review this week :)

@center2055
Copy link
Copy Markdown
Author

Alright thanks a lot!

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enriches the relay details endpoint and UI by adding confirmed family members and reverse-DNS-derived hostnames (verified vs unverified), with backend caching for DNS lookups.

Changes:

  • Added backend reverse-DNS lookup service with caching and exposed verified/unverified hostnames in relay details responses.
  • Added backend relay-details query service and DTO to include confirmed family members plus reverse-DNS results.
  • Updated relay details dialog UI to render the new sections and provide an explicit “show confirmed family” action on the map.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
frontend/src/dto/relay.ts Extends RelayDetails DTO with familyId, confirmed family members, and verified/unverified hostnames; adjusts ASN typing.
frontend/src/components/dialogs/relay/RelayDetailsTable.tsx Renders confirmed family members, “show family on map” action, and hostname lists; refactors row rendering.
frontend/src/components/dialogs/relay/RelayDetailsDialogSmall.tsx Passes closeDialog into the details table for the new action button behavior.
frontend/src/components/dialogs/relay/RelayDetailsDialogLarge.tsx Passes closeDialog into the details table for the new action button behavior.
frontend/src/components/buttons/SelectFamilyButton.tsx Adds optional labeled button variant and refactors selection handler.
backend/src/test/kotlin/org/tormap/service/ReverseDnsLookupServiceTest.kt Adds unit tests covering verified vs unverified hostname separation and no-PTR behavior.
backend/src/test/kotlin/org/tormap/service/RelayDetailsQueryServiceTest.kt Adds unit tests ensuring relay details are enriched with confirmed family members and DNS results.
backend/src/test/kotlin/org/tormap/config/CacheConfigTest.kt Extends cache config test to include the new reverse-DNS cache.
backend/src/main/kotlin/org/tormap/service/ReverseDnsLookupService.kt Introduces reverse DNS resolver + lookup service with caching and result model.
backend/src/main/kotlin/org/tormap/service/RelayDetailsQueryService.kt Adds query service to assemble enriched RelayDetailsDto (family + reverse DNS).
backend/src/main/kotlin/org/tormap/config/CacheConfig.kt Adds Ehcache cache for reverse-DNS lookup results.
backend/src/main/kotlin/org/tormap/adapter/dto/RelayDetailsDto.kt New DTO that includes confirmed family members and reverse-DNS hostname lists.
backend/src/main/kotlin/org/tormap/adapter/controller/RelayDetailsController.kt Switches relay-details endpoint to return the enriched DTO via query service.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/src/components/buttons/SelectFamilyButton.tsx
Comment on lines +126 to +130
const renderConfirmedFamilyMembers = (confirmedFamilyMembers?: {
id: number
fingerprint: string
nickname: string
}[]) => confirmedFamilyMembers && confirmedFamilyMembers.length > 0 ?
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback

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.

Add more relay details to dialog

3 participants