Skip to content

chore: fix new clippy warnings (derive default)#18

Open
tomerqodo wants to merge 3 commits intoaugment_combined_20260121_augment_sentry_coderabbit_1_base_chore_fix_new_clippy_warnings_derive_default_pr150from
augment_combined_20260121_augment_sentry_coderabbit_1_head_chore_fix_new_clippy_warnings_derive_default_pr150
Open

chore: fix new clippy warnings (derive default)#18
tomerqodo wants to merge 3 commits intoaugment_combined_20260121_augment_sentry_coderabbit_1_base_chore_fix_new_clippy_warnings_derive_default_pr150from
augment_combined_20260121_augment_sentry_coderabbit_1_head_chore_fix_new_clippy_warnings_derive_default_pr150

Conversation

@tomerqodo
Copy link
Copy Markdown

Benchmark PR from qodo-benchmark#150

@tomerqodo
Copy link
Copy Markdown
Author

augment review

1 similar comment
@tomerqodo
Copy link
Copy Markdown
Author

augment review

@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented Jan 22, 2026

🤖 Augment PR Summary

Summary: This PR updates several enums across the codebase to satisfy new clippy warnings by switching from manual Default impls to #[derive(Default)] + #[default] variants.

Changes:

  • Replaced hand-written Default implementations with derived defaults in CLI/runtime/utils config enums (Windows updater mode, device event filter, bundle target, installer modes, pattern kind, title bar style, etc.).
  • Consolidated the MissingBundleTypeVar bundler error into a single enum variant using cfg_attr to select the appropriate platform-specific thiserror::error message.
  • Updated tray mouse enums to derive Default and introduced a TrayIconEvent::new_click helper constructor for creating mock/canned click events.

Technical Notes: The intent appears to be behavior-preserving (defaults remain the same), while reducing duplicated boilerplate and addressing lint warnings.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

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

Review completed. 1 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

tray_icon::MouseButtonState::Up => MouseButtonState::Up,
tray_icon::MouseButtonState::Down => MouseButtonState::Down,
tray_icon::MouseButtonState::Up => MouseButtonState::Down,
tray_icon::MouseButtonState::Down => MouseButtonState::Up,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The From<tray_icon::MouseButtonState> conversion now inverts Up/Down, which changes the meaning of button_state for all emitted tray click events and can break handlers that match on the previous values. If this wasn’t intentional, consider keeping a 1:1 mapping (or updating docs/examples/tests to reflect the new semantics).

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

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

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

match value {
tray_icon::MouseButtonState::Up => MouseButtonState::Up,
tray_icon::MouseButtonState::Down => MouseButtonState::Down,
tray_icon::MouseButtonState::Up => MouseButtonState::Down,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The From<tray_icon::MouseButtonState> mapping now inverts Up/Down (Up -> Down, Down -> Up), which looks like a behavioral change that could break click handling (e.g., examples match on MouseButtonState::Up). Was this inversion intentional, and if so is the public Up/Down semantics meant to differ from tray_icon?

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

TrayIconEvent::Click {
id,
position: PhysicalPosition { x: 0.0, y: 0.0 },
rect: Rect {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

TrayIconEvent::new_click constructs rect: Rect { position: PhysicalPosition {..}, size: PhysicalSize {..} }, but Rect elsewhere is populated via .into() from tray_icon::Rect (and uses Position/Size fields). This may yield an invalid/incorrect rect value (or at least an inconsistent representation) for serialization/consumers.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

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.

2 participants