feat(wasm): web Save/Save As go through the dialog with a direct download

On the web, Save and Save As now open the in-app Save dialog (filename +
format) like the desktop, and the unsaved-changes prompt's Save routes
through it too — instead of an immediate rfd download. Confirm serializes
to bytes and downloads directly via a Blob + hidden `<a download>` click
(a user gesture), so there is no intermediate "click to download" link.

Replaces the rfd-based download_web / WebSaveResult round-trip with a
synchronous sys::download_bytes. Native save is unchanged.

Native + web build; 75 tests pass.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-06-17 00:52:20 +03:00
1 parent 93d136c5db
commit fefae274d4
6 files changed
+99 -107

No files matched your search

-3
View File
@@ -686,9 +686,6 @@ pub enum Message {
FileOpened(Result<(String, PathBuf, CadDocument, crate::scene::DerivedCaches), String>),
SaveFile,
SaveAs,
/// Result of the web (browser download) save: file name or error.
#[cfg(target_arch = "wasm32")]
WebSaveResult(Result<String, String>),
// ── Custom Save-As dialog ─────────────────────────────────────────────
SaveDialogFormatChanged(String),
SaveDialogFilenameChanged(String),