Skip to content

Fix indefinite UI hangs on Python crashes#43

Merged
Daliys merged 3 commits into
mainfrom
fix-indefinite-ui-hangs-16497790879791692775
Jun 4, 2026
Merged

Fix indefinite UI hangs on Python crashes#43
Daliys merged 3 commits into
mainfrom
fix-indefinite-ui-hangs-16497790879791692775

Conversation

@Daliys

@Daliys Daliys commented Jun 3, 2026

Copy link
Copy Markdown
Member

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

@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Daliys added 3 commits June 4, 2026 12:12
…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.
@Daliys Daliys force-pushed the fix-indefinite-ui-hangs-16497790879791692775 branch from b46dee4 to 9ccdc49 Compare June 4, 2026 10:13
@Daliys Daliys merged commit 43443a0 into main Jun 4, 2026
1 of 2 checks passed
@Daliys Daliys deleted the fix-indefinite-ui-hangs-16497790879791692775 branch June 4, 2026 10:13
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