Skip to content

Cleanup, cosmetic tweaks, nullability fixes - #44

Merged
sveinbjornt merged 8 commits into
masterfrom
cleanup
Apr 22, 2026
Merged

sveinbjornt merged 8 commits into
masterfrom
cleanup

Conversation

@sveinbjornt

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 ProcessUtils APIs 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.

Comment thread source/Util/VolumesPopUpButton.m Outdated
Comment thread source/Util/ProcessUtils.m Outdated
Comment thread source/SlothController.m Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment thread source/InfoPanelController.m
Comment thread source/SlothController.m Outdated
@sveinbjornt
sveinbjornt marked this pull request as ready for review April 20, 2026 19:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment thread resources/MainMenu.xib Outdated
Comment thread source/SlothController.m Outdated
Comment thread CHANGES.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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);

Copilot AI Apr 21, 2026

Copy link

Choose a reason for hiding this comment

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

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).

Suggested change
return (err == errAuthorizationSuccess);
if (err != errAuthorizationSuccess) {
return NO;
}
[task waitUntilExit];
return ([task terminationStatus] == 0);

Copilot uses AI. Check for mistakes.
@sveinbjornt
sveinbjornt merged commit 308ccdb into master Apr 22, 2026
6 checks passed
@sveinbjornt
sveinbjornt deleted the cleanup branch April 22, 2026 14:47
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