Skip to content

chore(rust/gui-client): migrate to Tauri v2#6996

Merged
ReactorScram merged 62 commits into
mainfrom
chore/tauri-v2-migration
Oct 24, 2024
Merged

chore(rust/gui-client): migrate to Tauri v2#6996
ReactorScram merged 62 commits into
mainfrom
chore/tauri-v2-migration

Conversation

@ReactorScram
Copy link
Copy Markdown
Contributor

@ReactorScram ReactorScram commented Oct 9, 2024

Closes #4883

Refs #7005

Adds support for Ubuntu 24.04, drops support for Ubuntu 20.04

Known issues:

  • On Ubuntu 22.04, sometimes GNOME shows the wrong tray icon
  • On Ubuntu 24.04, the first time you open the tray menu, GNOME takes a long time to open the menu.

@ReactorScram ReactorScram self-assigned this Oct 9, 2024
@vercel
Copy link
Copy Markdown

vercel Bot commented Oct 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
firezone ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 24, 2024 4:01pm

@ReactorScram ReactorScram changed the base branch from chore/fix-tauri-v1 to main October 11, 2024 16:05
})
.await
.context("Failed to join zip export task")??;
tracing::debug!(elapsed_s = start.elapsed().as_secs(), "Exported logs");
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

about 7 seconds in debug, about 0 in release, had to check

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Duration has a nicely formatted debug output actually.

@ReactorScram
Copy link
Copy Markdown
Contributor Author

This is ready for early reviews.
There's still some unwraps I want to clean up, but I want to make sure I'm headed in the right direction. I can split off more little PRs from this if needed

Copy link
Copy Markdown
Member

@thomaseizinger thomaseizinger left a comment

Choose a reason for hiding this comment

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

Great work! What a journey :)

})
.await
.context("Failed to join zip export task")??;
tracing::debug!(elapsed_s = start.elapsed().as_secs(), "Exported logs");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Duration has a nicely formatted debug output actually.

Comment thread .github/workflows/_rust.yml
Comment thread rust/gui-client/src-tauri/src/client/gui.rs
Comment thread rust/gui-client/src-tauri/src/client/gui.rs Outdated

if Some(&menu) == self.last_menu_set.as_ref() {
tracing::debug!("Skipping redundant menu update");
} else {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

An early return would avoid the else.

Comment thread rust/gui-client/src-tauri/src/client/gui/system_tray.rs Outdated
Comment thread rust/gui-client/src-tauri/src/main.rs Outdated
@ReactorScram
Copy link
Copy Markdown
Contributor Author

@thomaseizinger Oh yeah should this go after the 1.4.0 Client is cut, so that we have one last Ubuntu 20.04 Client that supports the new protocol?

@thomaseizinger
Copy link
Copy Markdown
Member

@thomaseizinger Oh yeah should this go after the 1.4.0 Client is cut, so that we have one last Ubuntu 20.04 Client that supports the new protocol?

That would delay it by at least another 2 weeks. Do we want to hold it for that long? If we decide to do that, we can always backport the new control protocol stuff in a separate release branch for a point release. It is only connlib changes so should be easy :)

@ksparakis
Copy link
Copy Markdown

Thank you for the good work!

Did the team decide to release this before the new 1.4.0 client? would be really useful to my team right now, we have a few devs on the new ubuntu.

@ReactorScram
Copy link
Copy Markdown
Contributor Author

@ksparakis Yes I think 2 weeks is too long to wait, we're trying to get this merged soon

@ReactorScram
Copy link
Copy Markdown
Contributor Author

ReactorScram commented Oct 22, 2024

@thomaseizinger oh this is probably failing to merge because I deleted Ubuntu 20.04 from the test matrix. Should we force it and then we can update the required tests later?

This will affect the Headless Client too, I think we're okay dropping 20.04 support for that too

Edit: In standup we agreed on this and Jamil reminded me where the branch protection rules are so I'll update those

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Copy link
Copy Markdown
Member

@thomaseizinger thomaseizinger left a comment

Choose a reason for hiding this comment

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

LGTM, left a few more comments but we can tackle those in follow-ups! :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not sure if we need to rename it when we don't actually going to have two versions of it? Up to you.

Comment thread .github/workflows/_tauri.yml
Comment thread rust/gui-client/build.bat
call pnpm tailwindcss -i src\input.css -o src\output.css

REM bundle JS
call pnpm vite build
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am surprised vite doesn't do the tailwind stuff for you?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It might. I don't remember exactly why I added vite other than that I want to match the sample Tauri code. So it probably has lots of features I'm not familiar with yet.

Comment thread rust/gui-client/build.sh Outdated
Comment thread rust/gui-client/src-tauri/Cargo.toml Outdated
Comment thread rust/gui-client/src-tauri/src/client/gui/os_linux.rs Outdated
Comment thread rust/gui-client/src-tauri/src/client/gui/system_tray.rs Outdated
Comment thread rust/gui-client/src-tauri/src/client/gui/system_tray.rs Outdated
Comment thread rust/gui-client/src/about.ts Outdated
Comment thread rust/gui-client/src/about.ts Outdated
@thomaseizinger
Copy link
Copy Markdown
Member

Great effort on getting this migration done 🚀

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(gui-client/linux): The Tauri GUI Client doesn't work on Ubuntu 24.04

3 participants