fix(tauri): resolve macOS-gated clippy -D warnings blocking pre-push (#5018)#5020
Merged
senamakel merged 6 commits intoJul 18, 2026
Merged
Conversation
Contributor
📝 WalkthroughWalkthroughThis PR applies clippy fixes across macOS-gated Rust code, updates native window panel handling, simplifies iMessage marker filtering, and preserves existing platform-specific behavior. ChangesRust lint and native window cleanup
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
This was referenced Jul 17, 2026
senamakel
pushed a commit
to M3gA-Mind/openhuman
that referenced
this pull request
Jul 18, 2026
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.
🥞 Stacked PR — merge order (bottom → top)
main) ← this PR, unblocks all macOS pushesThis is position 1/5 — the base of the stack. Merge first; everything above carries these commits.
Summary
Fixes the 11 clippy
-D warningserrors in the macOS-gated Tauri shell code that blockgit pushon every macOS dev machine since #4872 wiredpnpm rust:clippyinto the pre-push hook. Six mechanical lint fixes, one commit per file.Problem
#4872 (
chore(rust): enforce warning-free clippy, merged 2026-07-16) switched.husky/pre-pushfromrust:checktorust:clippy, linting both crates with-D warnings. Theapp/src-tauri(shell) crate carries 11 pre-existing clippy errors, all inside#[cfg(target_os = "macos")]code.The
Rust QualityCI job runs onubuntu-22.04, where every macOS-gated region is configured out before clippy sees it — so these errors are invisible to CI. Main is green; every macOS contributor is hard-blocked at push. (The CI blind-spot itself is tracked in #5019.)The errors are pre-existing, not introduced here: this branch is cut fresh from
upstream/mainand every fix targets code untouched since #4872.Solution
lib.rs:1198,1261,1280needless_return×3return/;in thecfg(macos)command tails (thecfg(not(macos))sibling is stripped on macOS, so the block is the tail expression)claude_code.rs:46needless_returnnative_notifications/mod.rs:40,54needless_return×2imessage_scanner/mod.rs:375manual_contains!ignored_markers.iter().any(|m| trimmed == *m)→!ignored_markers.contains(&trimmed)mascot_native_window.rs:55dead_code#[allow(dead_code)]+ comment on thewebviewfield — not deletionmascot_native_window.rs:392explicit_auto_deref&*webview→&webview(explicit&AnyObjectannotation kept)notch_window.rs:64dead_codeis_open— zero callersnotch_window.rs:265explicit_auto_deref&*webview→&webviewTwo judgment calls, flagged for review:
MascotPanel.webview— allow, not delete. The struct doc says it "holds the panel + webview together so we keep both alive." The field is an RAII keep-alive; dropping it deallocates theWKWebViewand blanks the mascot panel. Deleting it would be a real behaviour bug, so it gets#[allow(dead_code)]and a comment saying why.notch_window::is_open— delete. Zero callers (onlymascot_native_window::is_openis used, atlib.rs:1226).pub(crate)and trivially re-addable. Keeping dead code "for symmetry" is how it accretes.The vendored
tauri-runtime-cefcrate's 13 warnings are out of scope —-D warningsapplies only to the selected package, not path dependencies, so they do not block the push and are not regressions.Submission Checklist
explicit_auto_derefand onemanual_containsfixes are semantically identical to the originals.returnkeyword, redundant deref, dead fn) or swaps an equivalent idiom.diff-coverhas no new behaviour to measure.Closesin## Related.Impact
pnpm rust:clippyexiting 0 on macOS (was 11 errors) andcargo fmt --checkclean. Theexplicit_auto_dereffixes touch objc2 coercion feeding raw-pointermsg_send!casts — mitigated by keeping the explicit&AnyObjecttype annotation so the coercion target is unchanged, plus a runtime smoke of the mascot/notch windows.Related
-D warningsenforcementAI Authored PR Metadata (required for Codex/Linear PRs)
Linear Issue
Commit & Branch
fix/5018-macos-clippy-warningsValidation Run
pnpm --filter openhuman-app format:check— no frontend files changedpnpm typecheck— no TypeScript changedGGML_NATIVE=OFF pnpm rust:clippy→ exit 0 (was 11 errors onupstream/main)cargo fmt --manifest-path app/src-tauri/Cargo.toml --checkcleangit diff upstream/main..HEAD --name-onlyon the base contains none of the 6 lint files; introducing commitd320c4382(chore(rust): enforce warning-free clippy #4872) predates this branch