Repository navigation
feat(download): OS-detected TunaOS Media Writer button on /download - #788
Merged
Merged
Conversation
Detect Windows, macOS, Linux (x86_64/aarch64) and mobile from the user agent and offer the matching Media Writer build from iso.tunaos.org/downloads.json, with the browser builder as the second choice and wootc as a Windows-only secondary link. If downloads.json cannot be fetched, the button points at the latest GitHub release.
hanthor
enabled auto-merge (squash)
November 20, 2026 03:03
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
tunaos-org | e19b932 | Commit Preview URL Branch Preview URL |
Nov 20 2026, 03:04 AM |
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.
What
Top of
/downloadnow has an OS-detected primary action (src/components/MediaWriterDownload):mediaWriter.assets["windows-x64"](.msi)/wootcassets.macos(.dmg)assets["linux-x86_64"]or["linux-aarch64"](from the UA)Version, file type and size come from
downloads.json; for unsigned builds a one-line SmartScreen / Gatekeeper note is shown. The existing chooser banner, factory health, ISO list and USB instructions stay below unchanged (the USB note now also mentions Media Writer).Detection and parsing of
downloads.jsonlive insrc/data/media-writer.ts(pure, unit-tested inmedia-writer.test.ts). Onlyhttps://asset URLs for the four known keys are used.CORS
curl -I -H 'Origin: https://tunaos.org' https://iso.tunaos.org/downloads.json(and GET) currently returns noAccess-Control-Allow-Origin, so in production today the fetch fails and every button falls back to https://github.com/tuna-os/iso-builder/releases/latest. The header is being added in tuna-os/iso-builder; once that ships, the direct per-OS asset links appear with no change here.Tested
npx tsc— cleannpx vitest run src/data/media-writer.test.ts— 5/5 pass (Windows/macOS/Linux x86_64/aarch64, Android, iPhone, iPadOS desktop-UA, ChromeOS, parser filtering)scripts/checks/*.mjs— passnpm run build— success (only pre-existing broken-link/anchor warnings on other pages)docusaurus serve) and loaded/downloadin headless Chromium with Windows, macOS, Linux and Android user agents:downloads.jsonintercepted and served withAccess-Control-Allow-Origin: *: buttons link toTunaOS-Media-Writer-Windows-x64.msi,…-macOS.dmg,…-Linux-x86_64.flatpak(+ aarch64 secondary link), with "Version 0.1.0 · .msi installer · 81 MB" etc.