[Cleanup] Clean up warnings and unused code#535
Open
ajmcquilkin wants to merge 4 commits intomainfrom
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request fixes incorrect logical negation operations in state initialization across multiple configuration pages and updates dependencies. The main issue was that state variables intended to represent "disabled" or "enabled" states were incorrectly negating boolean values, which was further compounded by the nullish coalescing operator precedence.
Key changes:
- Fixed boolean logic in state initialization for 11+ configuration pages by removing incorrect negation operators
- Updated the
meshtasticdependency from a Git reference to published version 0.1.7 - Added explicit lifetime annotations to improve Rust code clarity
- Removed unused code including helper functions, error variants, and imports
Reviewed Changes
Copilot reviewed 23 out of 24 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| TelemetryConfigPage.tsx | Removed incorrect negation operators from airQualityDisabled and envMeasurementDisabled state initialization |
| StoreAndForwardConfigPage.tsx | Fixed moduleDisabled state initialization logic |
| SerialModuleConfigPage.tsx | Fixed moduleDisabled state initialization logic |
| RemoteHardwareConfigPage.tsx | Updated commented-out code to reflect correct boolean logic |
| RangeTestConfigPage.tsx | Fixed moduleDisabled state initialization logic |
| MQTTConfigPage.tsx | Fixed moduleDisabled state initialization logic |
| ExternalNotificationConfigPage.tsx | Fixed three state initializations: moduleDisabled, bellAlertsDisabled, and messageAlertsDisabled |
| CannedMessageConfigPage.tsx | Fixed moduleDisabled state initialization logic |
| AudioConfigPage.tsx | Removed incorrect negation and extra parentheses from codec2Disabled state initialization |
| PositionConfigPage.tsx | Fixed gpsDisabled and fixedPositionDisabled state initialization logic |
| NetworkConfigPage.tsx | Removed incorrect negation and extra parentheses from wifiDisabled and ethDisabled |
| LoRaConfigPage.tsx | Changed from negation to double negation for proper boolean coercion and removed unnecessary fallback |
| BluetoothConfigPage.tsx | Fixed bluetoothDisabled initialization and removed unnecessary fallback from fixedPinDisabled |
| packet_api/mod.rs | Added explicit lifetime annotations to get_locked_graph method |
| packet_api/handlers/mod.rs | Removed unused NotificationDispatchFailure error variant and its Display implementation |
| packet_api/handlers/mesh_packet/handlers.rs | Changed to Copy semantics, updated from deprecated from_i32 to try_from, removed unused notification code |
| lib.rs | Removed unused TypeScript export function and related imports |
| ipc/commands/radio.rs | Removed unused imports (events and trace) |
| domains/mesh.rs | Removed unused imports |
| device/mod.rs | Updated from deprecated from_i32 to try_from for enum conversions |
| device/helpers.rs | Removed unused helper functions get_node_user_name and get_channel_name |
| api/primitives/radio.rs | Removed unused imports |
| Cargo.toml | Updated meshtastic dependency from Git reference to published version 0.1.7 with reordered features |
| Cargo.lock | Updated dependency tree reflecting the new meshtastic version and its transitive dependencies including new specta versions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e7c6f8c to
79c2b55
Compare
matthewCmatt
approved these changes
Nov 3, 2025
Collaborator
matthewCmatt
left a comment
There was a problem hiding this comment.
LGTM! Fun to see you picking the project back up!
| use tauri::Manager; | ||
| use tauri_plugin_log::{fern::colors::ColoredLevelConfig, Target, TargetKind}; | ||
|
|
||
| fn export_ts_types(file_path: &str) -> Result<(), TsExportError> { |
Collaborator
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.
This PR does the following:
meshtasticcrate from0.1.6to0.1.7pnpm run ui:devpnpm run rust:dev