Skip to content

fix: keep the editor service responding while the config is resolved - #1347

Merged
dsherret merged 2 commits into
mainfrom
fix-editor-service-unblock-loop
Oct 11, 2026
Merged

dsherret merged 2 commits into
mainfrom
fix-editor-service-unblock-loop

Conversation

@dsherret

Copy link
Copy Markdown
Member

The editor service resolved the configuration for a "can format" request (and for a format request when it had none yet) inside its message loop. Resolving the configuration can take a long time (ex. downloading and compiling plugins), and for that time the service didn't respond to anything: an "is alive" check went unanswered and a "cancel format" wasn't acted on.

Now the messages that need the configuration ("can format" and "format") are handled one at a time on a separate task from the one receiving messages. They're still handled in the order they arrive, so a format request still waits for a config check ahead of it and formats with the latest configuration.

A format request can also be cancelled while it's waiting to be handled, in which case it's skipped.

The test makes the plugin download hang and asserts an "is alive" check gets a response while the "can format" request is still waiting. It also cancels a waiting format request, though it can only observe that the service keeps working afterwards and not that the format was skipped.

@dsherret
dsherret merged commit c710330 into main Oct 11, 2026
23 checks passed
@dsherret
dsherret deleted the fix-editor-service-unblock-loop branch October 11, 2026 19:02
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