major: migrate from Electron to Tauri#258
Open
AdamJ wants to merge 23 commits into
Open
Conversation
RunEvent::ExitRequested (Cmd+Q, the Quit menu item, any AppHandle::exit()) can fire without a window's CloseRequested ever firing first — confirmed by reading the actual tauri/tauri-runtime-wry/tao/muda source. Worse, the macOS native Quit item was bound to Cocoa's terminate: selector directly, which bypasses the tao/wry event loop entirely since tao never implements applicationShouldTerminate:. - menu.rs: replace PredefinedMenuItem::quit (terminate: selector) with a custom "quit" item that calls AppHandle::exit(), which does route through RunEvent::ExitRequested - quit_flush.rs: extract the flush-and-decide task so handle_run_event spawns it too (guarded by the same flush_pending swap), not just handle_window_event - add unit tests for quit_flush's decision logic, timeout fallback, and swap-guard, and for menu.rs's id dispatch logic (6 -> 17 Rust tests) - backup.rs: BackupInfo now serializes as camelCase to match the TypeScript side's ElectronDiskBackupInfo contract - AGENTS.md: correct the Tauri Desktop Build section (no Window submenu; quit_flush covers both trigger paths; test counts)
Deploying timetrackerpro with
|
| Latest commit: |
308a3ca
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5a9490bd.timetrackerpro.pages.dev |
| Branch Preview URL: | https://feature-tauri-migration.timetrackerpro.pages.dev |
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
Desktop build migrated from Electron to Tauri 2 — the native shell is now a Rust binary (
src-tauri/) instead of a bundled Chromium + Node process, cutting installer size and removing the Node main-process attack surface entirely.src/lib/tauriElectronApiShim.tsbridgeswindow.electronAPIonto Tauri'sinvoke/listen, souseElectronBackup.ts,useElectronMenuActions.ts, andelectron.d.tsneeded no changes and keep their historical names. Disk backups, the native app menu, and the quit-flush handshake are now Rust modules (backup.rs,menu.rs,quit_flush.rs); auto-updates are now frontend-driven and Ed25519-signed viatauri-plugin-updater(src/lib/tauriUpdater.ts) instead ofelectron-updater. New scriptspnpm tauri/pnpm tauri:dev/pnpm tauri:buildreplace the oldelectron:*scripts;.github/workflows/tauri-release.ymlreplaceselectron-release.yml.electron/,vite.electron.config.ts, and all Electron npm dependencies are removedType of Change
Related Issue
Changes Made
src-tauri/) instead of a bundled Chromium + Node process, cutting installer size and removing the Node main-process attack surface entirely.Checklist
Documentation
README.mdCHANGELOG.mdupdated accordinglyGeneral
mainpnpm test,pnpm lint, andpnpm buildNotes for Reviewers