feat(web): Navigator download page with per-platform installer links - #28
Merged
Conversation
Adds `/download` — Windows / macOS / Linux installers for the Navigator edge
app — plus `/download/{windows,macos,linux}`, permanent redirects that always
land on the current build.
The links can't be hard-coded. Tauri stamps the app version into every
filename (`navigator_0.1.0_x64-setup.exe`), and GitHub's `/releases/latest`
excludes pre-releases — which is all the Navigator publishes, so "latest"
currently resolves to the `assets-chm13v2.0` reference-data release, not the
app. So `du-external::github` lists releases newest-first and takes the first
one that actually carries installer assets (drafts skipped, pre-releases kept),
classifies each asset by platform/arch/format, and picks a primary build per
platform: x64 .exe, universal .dmg, x86_64 AppImage.
du-web caches the resolution process-wide (30 min on success, 5 min after a
failure) so the page costs ~2 GitHub calls an hour against an unauthenticated
limit of 60. If GitHub is unreachable the page degrades to the releases
listing rather than erroring. The visitor's own platform is detected from the
User-Agent and offered first; secondary builds (arm64, .deb) and the
SHA256SUMS link stay on the page.
Also links the page from the Tools nav, the home "participate" section and the
FAQ answer that mentions the Navigator, adds it to the sitemap, and corrects
that FAQ answer's claim that the Navigator is built on the JVM (it is Rust).
`DU_NAVIGATOR_REPO` overrides the source repo; `GITHUB_TOKEN`, if set, raises
the API rate limit.
Co-Authored-By: Claude Opus 5 (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.
Adds
/download— Windows / macOS / Linux installers for the Navigator edge app — plus/download/{windows,macos,linux}, permanent redirects that always land on the current build.Why it isn't just three static links
The obvious approach (
…/releases/latest/download/<asset>) fails twice over for this repo:/releases/latestresolves toassets-chm13v2.0— the Ancestry/IBD + STR reference-data release — not the app.navigator_0.1.0_x64-setup.exe), so there is no stable asset name to hard-code.So
du-external::githublists releases newest-first and takes the first one that actually carries installer assets — drafts skipped, pre-releases kept — then classifies each asset by platform / arch / format and marks a primary build per platform (x64.exe, universal.dmg, x86_64 AppImage). Updater artifacts (.sig,.app.tar.gz) and data assets are not downloads and are filtered out.Behaviour
.debs are listed under the primary button, with sizes;SHA256SUMSis linked for verification.Also links the page from the Tools nav, the home "participate" section and the FAQ answer that already mentions the Navigator, and adds
/downloadto the sitemap. That FAQ answer claimed the Navigator is "built on the JVM (Java/Scala)" — corrected to Rust, since it sits directly above the new download button.Config:
DU_NAVIGATOR_REPOoverrides the source repo (defaultJamesKane/decodingus-navigator);GITHUB_TOKEN, if set, raises the API rate limit. Neither is required.Verification
Run against the live repo (
cargo run -p du-web, real GitHub API):macOS UA highlighted the macOS card; Windows UA reordered Windows first.
Tests:
cargo test -p du-external(26 pass — 7 new, covering the pick-the-installer-release rule against a fixture of the real response shape, asset classification, draft/updater filtering, and the empty case) andcargo test -p du-web --bins(71 pass — 6 new for the view model, template, UA detection and size formatting, plus the en/es/fr locale-parity test over the 18 new keys).No migration, no schema or API change.
🤖 Generated with Claude Code