Import dropdown: pull a zone live from a public resolver#11
Merged
Conversation
The Topbar's "Import…" button is now a dropdown that offers the existing file-pick path plus three "From public DNS" entries — one per configured DoH resolver (Cloudflare, Google, DNS.SB). Picking a resolver opens an inline form for the domain. On submit we fan out DoH queries for the apex RR types (SOA, NS, A, AAAA, MX, TXT, CAA) plus a small set of well-known subdomain probes (www, _dmarc, mail, autodiscover) and assemble a Zone from the answers. SOA TTL becomes the zone $TTL; per-record TTLs come straight from the resolver's response. Per-type errors are collected and surfaced through the existing parseErrors panel so a partial import is still usable. The import button shows "Resolving…" and disables while a fan-out is in flight. New module \`src/dns/import.ts\` is the pure logic; \`useZoneFile\` gains \`importFromDns(resolverId, domain)\` and an \`isResolving\` flag. New component \`ImportMenu\` owns the dropdown + the inline domain form and replaces the inline file-input button in Topbar. 9 new tests cover the apex fan-out, MX/TXT/SOA shape, domain normalization, unknown resolver, empty domain, and network failure. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
crhaglun
pushed a commit
that referenced
this pull request
May 8, 2026
The Topbar's "Import…" button is now a dropdown that offers the existing file-pick path plus three "From public DNS" entries — one per configured DoH resolver (Cloudflare, Google, DNS.SB). Picking a resolver opens an inline form for the domain. On submit we fan out DoH queries for the apex RR types (SOA, NS, A, AAAA, MX, TXT, CAA) plus a small set of well-known subdomain probes (www, _dmarc, mail, autodiscover) and assemble a Zone from the answers. SOA TTL becomes the zone $TTL; per-record TTLs come straight from the resolver's response. Per-type errors are collected and surfaced through the existing parseErrors panel so a partial import is still usable. The import button shows "Resolving…" and disables while a fan-out is in flight. New module \`src/dns/import.ts\` is the pure logic; \`useZoneFile\` gains \`importFromDns(resolverId, domain)\` and an \`isResolving\` flag. New component \`ImportMenu\` owns the dropdown + the inline domain form and replaces the inline file-input button in Topbar. 9 new tests cover the apex fan-out, MX/TXT/SOA shape, domain normalization, unknown resolver, empty domain, and network failure. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The "Import…" button is now a dropdown:
Picking a resolver opens a small inline form for a domain. On submit we fan out DoH queries to that single resolver for:
…and assemble a `Zone` from the answers. SOA TTL becomes the zone-level `$TTL`; per-record TTLs come straight from the resolver.
Why
What's new
Test plan
Notes
🤖 Generated with Claude Code