Fix 3 bug standalone: save project lỗi schema, export MIDI/WAV không hỏi nơi lưu

- Bug 1: serializeTracksList bỏ section item không có sectionId (do insertSectionAtPlayhead tạo) — tránh source_data {} làm schema oneOf fail
- Bug 2: export MIDI qua save-dialog + write file, toast kèm đường dẫn
- Bug 3: export mix WAV/MP3/OGG qua save-dialog + write file, toast kèm đường dẫn
- Marker tauri_bridge_ready: xóa khi window destroy + guard SF_PARENT_PID — tránh standalone treo 120s
This commit is contained in:
2026-08-21 17:13:28 +07:00
parent 9b14c99a7a
commit 4e3f2fd08a
6 changed files with 288 additions and 28 deletions
+5
View File
@@ -277,6 +277,11 @@ def _pick_dir_via_tauri_bridge() -> Optional[str]:
ipc = os.path.join(root, "SonicForgeDAW", "ipc")
if not os.path.isdir(ipc):
return None
# Bridge chi dung khi engine do Tauri spawn (co SF_PARENT_PID). Marker co
# the con sot tu lan Tauri chay truoc → chay standalone se cho response
# khong bao gio den (treo 120s). Check nay loai bo truong hop do.
if not os.environ.get("SF_PARENT_PID"):
return None
# Marker do Rust viết lúc setup — bridge chỉ có trong app Tauri desktop
if not os.path.exists(os.path.join(ipc, "tauri_bridge_ready")):
return None