-
-
Notifications
You must be signed in to change notification settings - Fork 56
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[macos] Improve handling of missing application attributes #105
base: master
Are you sure you want to change the base?
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.
👍 Looks good to me! Reviewed everything up to 58dcb87 in 19 seconds
More details
- Looked at
118
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
4
drafted comments based on config settings.
1. aw_watcher_window/macos.swift:332
- Draft comment:
Avoid force unwrapping withSBApplication.init(bundleIdentifier: bundleIdentifier)!
. Consider using optional binding to safely handle potential nil values. - Reason this comment was not posted:
Comment was on unchanged code.
2. aw_watcher_window/macos.swift:367
- Draft comment:
Avoid force unwrapping withSBApplication.init(bundleIdentifier: bundleIdentifier)!
. Consider using optional binding to safely handle potential nil values. - Reason this comment was not posted:
Marked as duplicate.
3. aw_watcher_window/macos.swift:355
- Draft comment:
Consider usingdebug
orlog
instead oferror
for logging tab title differences, as this might not be an error condition. - Reason this comment was not posted:
Confidence changes required:50%
The error logging for tab title differences is usingerror
level, which might not be appropriate for this kind of information. It could be more suitable to usedebug
orlog
level instead.
4. aw_watcher_window/macos.swift:385
- Draft comment:
Consider usingdebug
orlog
instead oferror
for logging tab title differences, as this might not be an error condition. - Reason this comment was not posted:
Confidence changes required:50%
The error logging for tab title differences is usingerror
level, which might not be appropriate for this kind of information. It could be more suitable to usedebug
orlog
level instead.
Workflow ID: wflow_qHWQnQn7IDXBftuy
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
@ErikBjare any chance of this getting merged? |
@ErikBjare sorry to bother you, are there any changes you'd like me to make before it can be merged? |
This PR tries to fix at least 1 crash in the macOS swift implementation.
As described in ActivityWatch/aw-qt#103, a custom GTK application I wrote was previously ignored since it didn't have a bundle ID. It is now correctly recognized, and a few other possible crash points have been fixed. However, I have been unable to replicate the crashing I used to experience (it may have already been fixed).
Related: #101, #74, #100
Important
Fixes crash in macOS Swift by handling missing bundle identifiers and improving error handling for Chrome and Safari in
macos.swift
.localizedName
orbundleIdentifier
for application name inMainThing.windowTitleChanged()
.bundleIdentifier
in Chrome and Safari sections inMainThing.windowTitleChanged()
.debug()
function condition.This description was created by
for 58dcb87. It will automatically update as commits are pushed.