Fix indefinite UI hangs on Python crashes#43
Conversation
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
…hon process execution. * In `SomaMCPCoordinator`, detect stream closures to automatically reject dangling continuations if the daemon crashes. * In `SomaMCPCoordinator`, wrap pending requests in a `withThrowingTaskGroup` with a 300-second timeout. * In `SomaViewModel+Execution+Part3.swift`, add a 300-second execution timeout to `executeProcess` using a cancellation handler to terminate rogue scripts.
…els. * Extract components of `executePythonTool` into `executeWithTimeout` and `dispatchRequestTask` to comply with the 50 line function length limit. * Extract `executeProcess` task components into `runProcessTask` to also comply with length limits. * Ensure code formatting passes the Swift linter.
* Execute swift-format manually to fix lines length. * Format code to conform 4-space indention rules. * Move parts of `executePythonTool` into helper methods to ensure that its length drops below the 50 lines threshold. * Move parts of `executeProcess` into helper methods to conform with the 50 lines function length constraint.
b46dee4 to
9ccdc49
Compare
This commit resolves instances where the app UI gets permanently stuck in "Translating" or "Analyzing" states by adding task-level timeouts to Python process communication, as well as detecting and handling daemon stream closures.
PR created automatically by Jules for task 16497790879791692775 started by @Daliys