Repository navigation
chore: Linux tray fix (supersedes #15), release version gate, lint CI, pasteboard test flake - #29
Merged
Merged
Conversation
Pure rustfmt output on the existing code, no hand edits, so the follow-up changes (and a new `cargo fmt --check` CI step) start from a formatted tree. Reproduce with `cargo fmt` in swift-shifter/.
… fix - Port draft PR #15 onto current main. The tray from tauri.conf.json's `app.trayIcon` now gets the menu and handlers instead of setup_tray building a second, iconless tray (which fails on Linux). Adds a Preferences tray item, lets the settings window close normally, and spawns every subprocess through `process::{async,sync}_command` so the Windows GUI build doesn't flash a console window per child. - Tags are pushed by hand, so release.yml now starts with a verify-version job (scripts/check-version.sh) and builds the tag it verified; build.yml runs the same check. - clippy is clean with -D warnings on macOS, Linux and Windows, the crate is rustfmt-clean, and build.yml enforces both. - The macOS pasteboard tests hold a shared lock, so plain `cargo test` no longer flakes when they run in parallel.
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.
Bundles four cleanups into one PR. It has two commits:
style: run cargo fmt(pure rustfmt output; reproduce it by runningcargo fmtonmain) and the actual changes. To review just the changes, look at the second commit.1. Port of #15 (supersedes it)
tauri.conf.json'sapp.trayIconalready makes Tauri build a tray (idmain) beforesetup()runs, andsetup_traythen built a second tray with no icon. That second tray is what fails to build on Linux. Instead of giving the duplicate an icon, as fix: fedora user should be able to open the app now #15 did,setup_traynow looks up the config tray (tray_by_id) and attaches the menu and handlers to it. As a side effect,menuOnLeftClick: falsenow applies to the tray that has the menu: left-click toggles the popover and right-click opens the menu.open_or_focus_settingsis shared with the macOS app menu.process::{async_command, sync_command}constructors setCREATE_NO_WINDOW, and every subprocess spawn insrc/goes through them. fix: fedora user should be able to open the app now #15 used ano_window!macro at each call site instead. The only exceptions are the Linux-only xclip/wl-paste calls.2. Release version check
scripts/check-version.sh [vX.Y.Z]checks thatpackage.json,Cargo.tomlandtauri.conf.jsonagree and that the tag, if given, matches them.release.ymlnow starts with averify-versionjob. The build matrix waits for it (needs) and checks out the same tag, so manualworkflow_dispatchruns also build the tag they name rather than the branch they were started from.build.ymlruns the check on every push and PR.bump-version.shno longer mentions the deleted auto-tag workflow.3. Lint in CI
cargo clippy --all-targets -- -D warningsis clean on macOS, Linux and Windows. Linux was checked in an aarch64 Docker container and Windows with thex86_64-pc-windows-gnutarget in Docker; those platforms compilecfg-gated code that macOS never sees.allow(dead_code)where code is per-platform on purpose (each is commented).build.ymlnow runscargo fmt --checkon Ubuntu and clippy on every OS in the matrix. AGENTS.md is updated to match.4. Flaky clipboard tests
The macOS NSPasteboard integration tests share the system pasteboard and used to clobber each other under parallel
cargo test. Each one now holds a poison-tolerantpasteboard_lock(). Plaincargo testpassed 20 of 20 runs; before, most runs failed.Testing
cargo fmt --checkpasses, andcargo clippy --all-targets -- -D warningsis clean on macOS, Linux and Windows-gnu.cargo test: 99 passed / 1 ignored plus 2 end-to-end tests on macOS; 94 passed in the Linux container.check-version.shexercised for matching versions, tag mismatch, file mismatch, and a tag without thevprefix.🤖 Generated with Claude Code