Skip to content

Comments

Sync desktop/ from omi-desktop (474e1e1f)#4953

Closed
m13v wants to merge 1 commit intomainfrom
sync/desktop-20260222-171344
Closed

Sync desktop/ from omi-desktop (474e1e1f)#4953
m13v wants to merge 1 commit intomainfrom
sync/desktop-20260222-171344

Conversation

@m13v
Copy link
Collaborator

@m13v m13v commented Feb 22, 2026

Automated sync from omi-desktop at 474e1e1f.

This PR was created by the sync pipeline.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request introduces significant improvements to the desktop application, including a unified AI bridge (ACP), local-first task management, and enhanced stability measures like memory monitoring and ffmpeg watchdog. The transition to the ACP bridge for all chat functionalities and the implementation of OAuth for Claude accounts are major highlights. Feedback focuses on correcting API usage for process management, avoiding blocking calls on the main thread, and improving safety by avoiding force unwraps.

Comment on lines +216 to +220
let task = Process()
task.launchPath = "/usr/bin/open"
task.arguments = ["-n", Bundle.main.bundleURL.path]
try? task.run()
NSApp.terminate(nil)
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The Process.run() method requires the executableURL property to be set. Setting launchPath (which is deprecated) does not satisfy this requirement, and task.run() will likely fail or throw an error. Additionally, launchPath is deprecated in favor of executableURL since macOS 10.13.

Suggested change
let task = Process()
task.launchPath = "/usr/bin/open"
task.arguments = ["-n", Bundle.main.bundleURL.path]
try? task.run()
NSApp.terminate(nil)
let task = Process()
task.executableURL = URL(fileURLWithPath: "/usr/bin/open")
task.arguments = ["-n", Bundle.main.bundleURL.path]
try? task.run()
NSApp.terminate(nil)

Comment on lines +268 to +272
killUsernoted.waitUntilExit()
log("Restarted usernoted to force notification re-discovery")

// Wait for usernoted to restart before retrying
Thread.sleep(forTimeInterval: 1.5)
Copy link
Contributor

Choose a reason for hiding this comment

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

high

Calling waitUntilExit() and Thread.sleep() on the main thread blocks the UI run loop, causing the application to become unresponsive for several seconds. Since startMonitoring uses a completion handler and is typically invoked from the UI layer, this logic should be dispatched to a background queue to avoid freezing the interface.

try await ActionItemStorage.shared.syncTaskActionItems([created])
let inserted = try await ActionItemStorage.shared.insertLocalActionItem(record)
let localTask = inserted.toTaskActionItem()
let localId = inserted.id!
Copy link
Contributor

Choose a reason for hiding this comment

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

high

Force unwrapping inserted.id! is risky. While the database is expected to return an ID for a new record, any unexpected failure or misconfiguration in the persistence layer will cause a runtime crash. It is safer to use optional binding.

Suggested change
let localId = inserted.id!
guard let localId = inserted.id else { return nil }

@m13v m13v closed this Feb 23, 2026
@m13v m13v deleted the sync/desktop-20260222-171344 branch February 23, 2026 03:32
@github-actions
Copy link
Contributor

Hey @m13v 👋

Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request.

After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:

  • Project standards — Ensuring consistency across the codebase
  • User needs — Making sure changes align with what our users need
  • Code best practices — Maintaining code quality and maintainability
  • Project direction — Keeping aligned with our roadmap and vision

Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out.

Thank you for being part of the Omi community! 💜

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.

1 participant