v0.9.0: Architecture Deepening (6 Candidates)
What's Changed
Architecture Deepening — 6 Candidates Implemented
Candidate 2 — Collapse Download Type Trinity
- Replace
DownloadConfigwithEngineConfigintypes/engine_config.rs - Add
DownloadItem::to_engine_config()andDownloadState::to_engine_config() - Rename
proxy_name→proxy_urlinEngineConfig(fixes semantic inconsistency) - Remove duplicate
output_pathfield (was always identical tosave_path)
Candidate 3 — Seal Engine Resume-State Seam
- Rename
OnCancelled→OnResumeState(reflects actual purpose) WorkerPool::add_with_idacceptson_resumecallback parameterDownloadManagercreates facade-based callback viamake_resume_callback()- Engine no longer directly calls
gob::save_state(seam is sealed)
Candidate 5 — Extract Platform Utilities from cmd.rs
update.rs:AssetInfo,UpdateInfo,GithubRelease,GithubAsset,compare_versions,current_platform_suffix,check_updatecommandplatform.rs:sync_autostart,deploy_extensions,copy_dir_recursive,resolve_extensions_dircmd.rsshrinks from 434 to ~180 lines (pure Tauri command routing)
Candidate 4 — Unify Event Vocabulary
event_bus.rs:FrontendEventenum (single source of truth for event names)EventBusstruct wrapsAppHandle::emit- Remove
EmittedEventstruct and directapp_handle.emitcalls fromcmd.rs constants/events.ts:EVENTSobject mirrorsFrontendEventvariants
Candidate 6 — Frontend Context Provider
contexts/AppContext.tsx:AppProviderownsdialog,selectedIds,filtertauriClient.ts: plain object export replacingtauriCommands()functionApp.tsx: usesuseAppContext()instead ofuseStatefor stateLayout.tsx: reads from context, 19→11 props (state props removed)
Candidate 1 — Deepen DownloadManager Orchestrator
services/chunk_planner.rs:compute_connection_count,plan_chunks,check_disk_spaceservices/probe_service.rs:probe_with_fallback,build_user_agentsdownload_manager.rs: inline logic replaced with service calls
Files Changed
- Created:
types/engine_config.rs,event_bus.rs,update.rs,platform.rs,services/mod.rs,services/chunk_planner.rs,services/probe_service.rs,contexts/AppContext.tsx,tauriClient.ts,constants/events.ts - Deleted:
hooks/useTauriCommands.ts - Modified: 16 existing files across backend and frontend
Full Changelog: v0.8.1...v0.9.0