Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33
[Cleanup] Clean up warnings and unused code#535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
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 fromairQualityDisabled andenvMeasurementDisabled state initialization |
| StoreAndForwardConfigPage.tsx | FixedmoduleDisabled state initialization logic |
| SerialModuleConfigPage.tsx | FixedmoduleDisabled state initialization logic |
| RemoteHardwareConfigPage.tsx | Updated commented-out code to reflect correct boolean logic |
| RangeTestConfigPage.tsx | FixedmoduleDisabled state initialization logic |
| MQTTConfigPage.tsx | FixedmoduleDisabled state initialization logic |
| ExternalNotificationConfigPage.tsx | Fixed three state initializations:moduleDisabled,bellAlertsDisabled, andmessageAlertsDisabled |
| CannedMessageConfigPage.tsx | FixedmoduleDisabled state initialization logic |
| AudioConfigPage.tsx | Removed incorrect negation and extra parentheses fromcodec2Disabled state initialization |
| PositionConfigPage.tsx | FixedgpsDisabled andfixedPositionDisabled state initialization logic |
| NetworkConfigPage.tsx | Removed incorrect negation and extra parentheses fromwifiDisabled andethDisabled |
| LoRaConfigPage.tsx | Changed from negation to double negation for proper boolean coercion and removed unnecessary fallback |
| BluetoothConfigPage.tsx | FixedbluetoothDisabled initialization and removed unnecessary fallback fromfixedPinDisabled |
| packet_api/mod.rs | Added explicit lifetime annotations toget_locked_graph method |
| packet_api/handlers/mod.rs | Removed unusedNotificationDispatchFailure error variant and its Display implementation |
| packet_api/handlers/mesh_packet/handlers.rs | Changed toCopy semantics, updated from deprecatedfrom_i32 totry_from, removed unused notification code |
| lib.rs | Removed unused TypeScript export function and related imports |
| ipc/commands/radio.rs | Removed unused imports (events andtrace) |
| domains/mesh.rs | Removed unused imports |
| device/mod.rs | Updated from deprecatedfrom_i32 totry_from for enum conversions |
| device/helpers.rs | Removed unused helper functionsget_node_user_name andget_channel_name |
| api/primitives/radio.rs | Removed unused imports |
| Cargo.toml | Updatedmeshtastic dependency from Git reference to published version 0.1.7 with reordered features |
| Cargo.lock | Updated dependency tree reflecting the newmeshtastic version and its transitive dependencies including newspecta versions |
💡Add Copilot custom instructions for smarter, more guided reviews.Learn how to get started.
Uh oh!
There was an error while loading.Please reload this page.
e7c6f8c to79c2b55CompareThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM! Fun to see you picking the project back up!
| use tauri::Manager; | ||
| use tauri_plugin_log::{fern::colors::ColoredLevelConfig,Target,TargetKind}; | ||
| fnexport_ts_types(file_path:&str) ->Result<(),TsExportError>{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This PR does the following:
meshtasticcrate from0.1.6to0.1.7pnpm run ui:devpnpm run rust:dev