Cleanup, cosmetic tweaks, nullability fixes - #44
Conversation
There was a problem hiding this comment.
Pull request overview
This PR focuses on small cleanup/cosmetic tweaks and improved Objective-C nullability annotations across utility/process-related code and UI helpers.
Changes:
- Add nullability annotations to several
ProcessUtilsAPIs and minor cleanup in their implementations. - Improve type clarity by using
Item *in filtering logic and adding a few explicit casts for dictionary-backed values. - Fix minor UI/logging string typos and bump the app bundle version.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| source/Util/VolumesPopUpButton.m | Adds mountpoint nil guard and explicit cast when building volume menu entries. |
| source/Util/ProcessUtils.m | Updates several process helper APIs to return nullable strings; minor cleanup. |
| source/Util/ProcessUtils.h | Aligns header declarations with nullable return values. |
| source/SlothController.m | Uses Item * types in filtering loops and fixes a log string typo. |
| source/Item.m | Adds an explicit cast when passing path into ProcessUtils. |
| source/InfoPanelController.m | Fixes access mode description logic when access mode is missing. |
| resources/Info.plist | Bumps CFBundleVersion from 383 to 384. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| AuthorizationFree(authRef, kAuthorizationFlagDestroyRights); | ||
|
|
||
| return YES; | ||
| return (err == errAuthorizationSuccess); |
There was a problem hiding this comment.
In killProcess:asRoot:usingSIGKILL:, the return value for the privileged path only reflects whether AuthorizationExecuteWithPrivileges was invoked successfully (i.e., launchWithAuthorization returned errAuthorizationSuccess), not whether /bin/kill actually succeeded. This can report success even when kill exits non-zero (e.g., PID already gone, EPERM). Consider waiting for the task to exit and basing the return value on its terminationStatus (and/or capturing stderr/output for diagnostics).
| return (err == errAuthorizationSuccess); | |
| if (err != errAuthorizationSuccess) { | |
| return NO; | |
| } | |
| [task waitUntilExit]; | |
| return ([task terminationStatus] == 0); |
No description provided.