Skip to content

Conversation

@afonsojramos
Copy link
Member

Summary

  • Migrates Gitify from Electron to Tauri v2 for improved performance and smaller bundle size
  • Replaces Webpack with Vite for faster builds and HMR
  • Updates to Tailwind CSS v4 with Vite plugin
  • Switches from Jest to Vitest for testing
  • Flattens source directory structure (removes renderer/main separation)

Test plan

  • Verify app launches and displays notifications
  • Test OAuth and PAT authentication flows
  • Verify system tray functionality works correctly
  • Test native notifications and sound playback
  • Confirm zoom in/out functionality works
  • Run pnpm test to verify all tests pass (635 passing, 6 skipped)

This is a complete migration of Gitify from Electron to Tauri v2.

Changes include:
- Remove Electron main/preload processes and webpack configs
- Add Tauri v2 backend with Rust (src-tauri/)
- Add Vite bundler configuration
- Migrate renderer code from src/renderer/ to src/
- Migrate tests from Jest to Vitest
- Update all dependencies for Tauri compatibility
- Add type-safe context hook (useAppContext)
- Fix strict TypeScript mode issues

BREAKING CHANGE: This replaces the Electron backend with Tauri.
- Update test snapshots for vitest migration
- Fix Tailwind config path from ../../ to ../
- Skip flaky nock replyWithError tests
- Replace @tailwindcss/postcss with @tailwindcss/vite
- Remove postcss.config.js
- Update vite.config.ts with tailwindcss plugin
- Remove @config directive from App.css (Vite plugin reads config automatically)
Add tauri-plugin-http to bypass WebView CORS restrictions when making
API requests to GitHub. This fixes the PAT login network error.

- Add tauri-plugin-http to Cargo dependencies
- Initialize HTTP plugin in lib.rs
- Add HTTP permissions for GitHub API in capabilities
- Update request.ts to use Tauri fetch when in Tauri environment
- Create shared isTauriEnvironment utility in environment.ts
Use convertFileSrc from @tauri-apps/api/core to convert local file
paths to asset:// URLs that work in Tauri's WebView.
Add React state management for zoom percentage in AppearanceSettings
to ensure the UI updates after zoom changes. The zoom functions now
work correctly with Tauri's webview zoom API.
- Add Tauri internals mock to vitest.setup.ts
- Create mock for @tauri-apps/plugin-http
- Add isTauriEnvironment and decryptValue mocks to tests using axios
- Update snapshots for emoji rendering changes
- Update comms.ts to use isTauriEnvironment checks
- Update auth utils for Tauri OAuth callback handling
- Update App context for Tauri environment
- Update index.tsx entry point
- Update SystemSettings for Tauri compatibility
- Update TraySettings for Tauri tray API
- Update native notification handling for Tauri
- Update sound playback for Tauri asset loading
- Update App.css for Tauri WebView
- Add theme.css for CSS custom properties
- Update Tailwind config
- Update index.html for Tauri
Remove platform.ts and platform.test.ts as platform detection is now
handled by the Tauri bridge (window.gitify.platform).
- Fix handler enrich() methods to return null instead of {} for failures
- Update handler return types to Promise<GitifySubject | null>
- Use undefined for optional fields to match GitifySubject type
- Add waitFor in AccountNotifications tests for async emoji loading
- Skip OAuth/timer-dependent tests that can't complete in test environment
- Fix vitest.setup.ts type casts for window properties
- Update test expectations and regenerate snapshots
@github-actions github-actions bot added dependency Dependency updates enhancement New feature or enhancement to existing functionality labels Dec 27, 2025
@setchy
Copy link
Member

setchy commented Dec 27, 2025

Pretty cool, nice work @afonsojramos

I'll need some time to review a PR of this size... I'm on the fence re the amount of Rust code tbh.

Shall we mark this PR as draft in the interim?

{
"$schema": "https://schema.tauri.app/config/2",
"productName": "Gitify",
"version": "6.11.1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Several release behind?

@setchy setchy marked this pull request as draft December 27, 2025 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependency Dependency updates enhancement New feature or enhancement to existing functionality

Development

Successfully merging this pull request may close these issues.

3 participants