Skip to content

major: migrate from Electron to Tauri#258

Open
AdamJ wants to merge 23 commits into
mainfrom
feature/tauri-migration
Open

major: migrate from Electron to Tauri#258
AdamJ wants to merge 23 commits into
mainfrom
feature/tauri-migration

Conversation

@AdamJ

@AdamJ AdamJ commented Jul 23, 2026

Copy link
Copy Markdown
Owner

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.ts bridges window.electronAPI onto Tauri's invoke/listen, so useElectronBackup.ts, useElectronMenuActions.ts, and electron.d.ts needed 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 via tauri-plugin-updater (src/lib/tauriUpdater.ts) instead of electron-updater. New scripts pnpm tauri/pnpm tauri:dev/pnpm tauri:build replace the old electron:* scripts; .github/workflows/tauri-release.yml replaces electron-release.yml. electron/, vite.electron.config.ts, and all Electron npm dependencies are removed

Type of Change

  • New feature
  • Update to existing feature
  • Bug fix
  • Documentation update
  • Other (describe below)

Related Issue

Changes Made

  • 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.

Checklist

Complete all items that apply to your change. Check N/A for items that don't apply.

Documentation

Run sync-docs skill with Claude Code to automatically update relevant files.

  • Any notable changes added to the README.md
  • CHANGELOG.md updated accordingly
  • N/A — no README changes

General

  • Branch is up to date with main
  • No unrelated files included in this PR
  • Tested locally by invoking the pnpm test, pnpm lint, and pnpm build

Notes for Reviewers

@github-actions github-actions Bot added actions For all items related to GitHub, deployment, and release automations and actions. automation For items related to release/documentation/workflow automations dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation frontend desktop labels Jul 23, 2026
@AdamJ AdamJ added this to Timetraked Jul 23, 2026
@AdamJ AdamJ moved this to In review in Timetraked Jul 23, 2026
@AdamJ AdamJ self-assigned this Jul 23, 2026
@AdamJ AdamJ changed the title Feature/tauri migration major: migrate from Electron to Tauri Jul 23, 2026
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)
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 23, 2026

Copy link
Copy Markdown

Deploying timetrackerpro with  Cloudflare Pages  Cloudflare Pages

Latest commit: 308a3ca
Status: ✅  Deploy successful!
Preview URL: https://5a9490bd.timetrackerpro.pages.dev
Branch Preview URL: https://feature-tauri-migration.timetrackerpro.pages.dev

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

actions For all items related to GitHub, deployment, and release automations and actions. automation For items related to release/documentation/workflow automations dependencies Pull requests that update a dependency file desktop documentation Improvements or additions to documentation frontend

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

1 participant