fix(desktop): route remote media through native network boundary - #32
Merged
Merged
Conversation
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
Fixes a class of desktop-only failures caused by treating the Tauri WebView like a normal browser when downloading generated or historical remote media.
Root cause
Remote media was still materialized with browser
fetch()and some downloads relied directly on<a download href="https://...">.In the packaged desktop app that means:
downloadattribute is not a reliable cross-origin desktop save path.Native media boundary
Adds a bounded Rust command backed by the existing
reqwestdependency:The command:
Raw media bytes return through
tauri::ipc::Response, avoiding JSON/base64 ornumber[]encoding for large files.Product paths fixed
workflowGeneration.tscomponents/workflow/media.ts<video src=https://...>behavior;fetch().StudioMediaBrowser.tsx<a download>;Deliberately not included
This PR does not migrate every Provider API call to Rust.
Provider submit/poll/upload routes remain separate work because they may require provider-specific auth, proxy and BYOK behavior. This PR only establishes the P0 media-download boundary that directly caused packaged EXE media failures.
Tests
Adds JS coverage for:
Adds Rust unit coverage for:
Hosted CI / Rust / Desktop packaging should validate the final integration.