DEV Community

Cover image for Electron to Tauri: A 24-Hour Rewrite with Claude ๐Ÿš€
Ankur K
Ankur K

Posted on

Electron to Tauri: A 24-Hour Rewrite with Claude ๐Ÿš€

Google Chat for your desktop โ€” tray icon, desktop notifications, native window, built with Tauri

๐Ÿ†• Updated: the app is now at v0.0.3, with SSO sign-in support, a proper offline screen, a sign-out that no longer strands you, and a few embarrassing bugs squashed. Jump to What's New if you read the original version. ๐Ÿ‘‡

TL;DR ๐Ÿ“Œ

  • ๐Ÿ•ฐ๏ธ Then: I built google-chat-electron by hand, over months, reading tutorial after tutorial.
  • โšก Now: I rebuilt the whole thing as google-chat-tauri in less than 24 hours โ€” and I did not write the code. Claude did.
  • ๐Ÿฆ€ Plot twist: I don't know Rust. Not a little โ€” at all. The AI wrote every line of it.
  • ๐Ÿ“ฆ Result: a 3 MB Linux installer, against 66 MB for the Electron build of the same app. Same features. Real numbers, measured off both repos' release assets.
  • ๐Ÿงช Status: still pre-release, but three releases deep now. Fun project. Stable version coming after real-world testing.

Let's dive in. ๐Ÿ‘‡


The Electron Era: Months of Honest, Manual Labour ๐Ÿ˜…

A few years ago I wanted Google Chat in a real window โ€” with a tray icon, an unread badge and native notifications โ€” instead of a browser tab that disappears among thirty other browser tabs.

So I built it. In Electron. By hand.

And it took months. Not because Electron is bad, but because every single thing was a tutorial:

  • How do I make a tray icon that actually behaves?
  • How do I keep the app alive when the window closes?
  • How do I intercept a link and open it in the real browser?
  • How do I package a .deb? A .dmg? An installer for Windows?
  • Why does this work on my machine and nowhere else? ๐Ÿ™ƒ

Every answer was a blog post, a GitHub issue thread, or a Stack Overflow reply from 2017 that almost applied. It shipped, people used it, and I was genuinely proud of it. It's no longer maintained โ€” this is its replacement.

The Tauri Rewrite: One Evening, One Prompt Loop ๐Ÿค–

Last week I opened Claude Code and asked it to port the app to Tauri v2.

I did not open the Rust book. I did not read the Tauri docs. I described what the app should do, reviewed what came back, ran it on my actual laptop, and reported what broke.

Timeline:

Time What happened
15:42 git init
17:01 Full Electron โ†’ Tauri v2 port committed
17:25 Desktop notifications working
< 24h later v0.0.1 tagged and released ๐ŸŽ‰
+1 day v0.0.2, then v0.0.3 with SSO sign-in and a real offline screen

44 commits. ~4,800 lines of Rust and JavaScript. Zero lines typed by me.

This is what people mean by vibe coding โ€” and honestly, it felt less like programming and more like directing. My job became: describe the behaviour, test it on real hardware, and say "the tray icon doesn't come back on Wayland." The AI handled the rest.

โš ๏ธ The honest caveat: AI wrote it, but a human ran it. Almost every real bug was a platform behaving differently from its own documentation โ€” the kind of thing no model can find by reading docs. That part still needs a person with a laptop and some patience.


Tauri vs Electron: Why the Rewrite Was Worth It โš–๏ธ

Here's the thing โ€” Electron ships an entire Chromium browser with your app. Tauri doesn't. It uses the web engine your operating system already has: WebKitGTK on Linux, WKWebView on macOS, WebView2 on Windows.

โš›๏ธ Electron ๐Ÿฆ€ Tauri v2
Browser engine Ships its own Chromium Uses the OS web engine
Linux installer size 66 MB (my old app) 3 MB (the same app) ๐Ÿคฏ
Backend language Node.js Rust
Memory footprint Heavy โ€” it's a browser Noticeably lighter
Startup Boot a Chromium Boot a native window
Security model Opt-in hardening Capability-based by default

Those two size numbers are the same app, same features, measured off the release assets of both repos. 22ร— smaller. ๐Ÿค

The size difference is the headline, but the one you feel every day is startup and memory. You're not launching a second Chrome just to read messages from your team. The window opens like a native window, because it basically is one.

The trade-off? You inherit the OS web engine's quirks โ€” and they are real. WebKitGTK renders its failed-load page as literally <html><body>%s</body></html> with no styling whatsoever, which on a dark window means black text on a black background. Chromium would never. More on that below. ๐Ÿงช


What the App Actually Does โœจ

This isn't a "hello world in a webview." It's a real desktop client:

  • ๐Ÿ”ด Unread indicator โ€” a dot on the tray icon, the count in the window title, and a badge on the macOS dock or Windows taskbar.
  • ๐Ÿ”” Desktop notifications โ€” with sound. On Linux, clicking one brings the window back.
  • ๐Ÿ—‚๏ธ Lives in the tray โ€” closing the window hides it; the app keeps running and keeps notifying.
  • ๐ŸชŸ Remembers your window โ€” size, position and maximised state come back where you left them.
  • 1๏ธโƒฃ Single instance โ€” launching again just focuses the window you already have.
  • ๐Ÿ“‹ Native menu bar โ€” File, Edit, View, History, Preferences, Help, with zoom that persists between launches.
  • ๐Ÿš€ Starts how you like โ€” launch at login, and/or start hidden in the tray on any launch.
  • โŒจ๏ธ Keyboard shortcuts โ€” Ctrl+F to search, Ctrl +/-/0 to zoom, Alt+โ†/Alt+โ†’ to navigate, Alt+Home to get back to Chat, Ctrl+W to hide to tray.
  • ๐ŸŒ Links open in your real browser โ€” a Docs, Sheets or Calendar link opens where your extensions and logins already live. Only Chat stays in the window.
  • ๐Ÿ“Ž Attachments download through your browser โ€” it saves them the way it saves anything else.
  • ๐Ÿ” Signs in normally โ€” personal Google accounts and paid Workspace accounts, in any country.
  • ๐Ÿข SSO sign-in works too โ€” Okta, Entra ID, Ping and friends. (New โ€” see below.)
  • ๐Ÿ“ก Handles a missing network gracefully โ€” a readable offline page with a Try again button, and it reconnects on its own.
  • ๐Ÿงฏ A way back from a wedged session โ€” Help โ†’ Reset App Data signs you out, resets every preference and restarts clean.

No analytics. No auto-updater installing things behind your back โ€” it just asks GitHub once a day whether a newer release exists and tells you. You can turn that off. ๐Ÿ™Œ

Available for Linux (.deb + .AppImage), macOS (universal .dmg) and Windows (.exe).


What's New Since I Published This Post ๐Ÿ†•

The post went up at v0.0.1. Here's what shipped after โ€” mostly things real usage found, which is exactly the pattern I described above: the AI writes it, reality corrects it.

๐Ÿข SSO / identity-provider sign-in now works

Originally I documented this as flatly unsupported. If your company signs you in through Okta, Entra ID or Ping, the flow redirects to your organisation's host โ€” which the app can't know ahead of time, so it isn't on the short list of hosts allowed to stay in the window. The link would open in your browser and finish the sign-in there, leaving the app still signed out. ๐Ÿคฆ

The fix is pleasingly simple: Preferences โ†’ Temporarily Open Every Link in This Window. It explains what it's doing before it does anything, keeps every link inside the app for five minutes โ€” long enough to get through any SSO flow โ€” and then switches itself off again. No permanent footgun left enabled.

๐Ÿšช Sign Out that doesn't strand you

There were three separate ways the window could get stuck in a state where the only escape was Reset App Data โ€” the nuclear option that wipes everything.

The nastiest: after signing out, Google sometimes answers a session-less visit with workspace.google.com โ€” a marketing page โ€” instead of the login form. And that page's own "Sign in" link did nothing, because the injected script intercepts cross-origin clicks on every page, the IPC permission only covered Google's Chat and Mail domains, and the resulting rejection was silently swallowed. Click โ†’ cancelled โ†’ dropped into the void. ๐Ÿ•ณ๏ธ

Now the window navigates itself when Rust can't be asked, and the app redirects off that marketing page to the real sign-in form (at most twice โ€” a redirect loop is worse than a dead end). You should never have to wipe your data to sign back in.

๐Ÿ“ก An offline screen you can actually read

Remember that WebKitGTK failed-load page? Black text, dark background, one unstyled line. The app now rewrites that document into something readable with a Try again button.

Which, delightfully, could not simply reload โ€” WebKit refuses to navigate its error page to the URL it's standing in for, and the page's opaque origin makes every IPC call fail with Origin header is not a valid URL. So the button aims at Chat's canonical URL instead, and in the background the app keeps probing the network and loads Chat by itself within about half a minute of your connection coming back. Usually before you even reach for the button. โœจ

๐Ÿ› The bug I find funniest

The update checker couldn't see pre-releases. Which is a genuinely hilarious flaw in an app whose only releases are pre-releases. v0.0.1 could never have told you v0.0.2 existed. Fixed in v0.0.2 โ€” so v0.0.1 users had to find it manually, one last time. ๐Ÿ˜ฌ

โŒจ๏ธ Plus the small stuff

  • Alt+Home to jump back to Chat was declared on the History menu and answered by absolutely nothing โ€” GTK accelerators never reach the app while focus is inside the webview. It now routes through the injected script like every other shortcut.
  • Start hidden in the tray on any launch, not just at login.
  • CI stopped spending thirty minutes compiling Rust to prove that a README typo didn't break the build. ๐Ÿ™ƒ

Where Things Stand ๐Ÿšง

Let me be very clear about this part:

  • ๐ŸŽˆ This is a fun project. It scratches an itch. It is not a startup.
  • ๐Ÿฆ€ I don't know Rust. If you open an issue about a borrow checker decision, the AI made it, not me.
  • ๐Ÿงช It's still pre-release. v0.0.3. Linux is where it's been tested most; macOS and Windows builds exist and need real users on real machines.
  • โœ… A stable release is coming once it's been properly tested in the wild.

If you use Google Chat on the desktop and you're feeling brave, try it and tell me what breaks. Every fix in the section above exists because something broke in real life โ€” that's genuinely the most useful thing you can contribute right now. ๐Ÿ›


The Takeaway ๐Ÿ’ญ

Months of manual work, then a full rewrite in a different language, on a different framework, in under a day โ€” by someone who can't write that language.

That's not a flex about me. It's a data point about where tooling is in 2026. And the follow-up releases make the shape of it clearer: the hard part was never typing the code. It was knowing what the app should do and checking it against reality โ€” the WebKit error page, the Google marketing redirect, the GTK accelerator that goes nowhere. AI took the first job, instantly. The second one is still ours. ๐Ÿค


๐Ÿ”— Links


Unofficial app. Not affiliated with, endorsed by, or sponsored by Google. "Google Chat" and the Chat logo are trademarks of Google LLC.

Have you migrated an Electron app to Tauri? Or vibe-coded something bigger than you expected? Drop it in the comments โ€” I'd love to read about it. ๐Ÿ‘‡

Top comments (1)

Collapse
 
devops_descent profile image
DevOps Descent

wow๐Ÿง,need to try it out