Repository navigation
Conversation
_loadAfterSessionLock() called the synchronous Gio.File.query_exists() before loading the session state asynchronously, which blocks the shell for a check the load already performs. Drop it and treat the NOT_FOUND error from load_contents_async() as "nothing to restore".
Factor out the directory creation from Util.initialize() so it can be reused when creating other files, such as the layouts file.
There was a problem hiding this comment.
🟡 Changes recommended
Fix unsafe native-error handling and prevent partial initialization after cancellation.
1 open finding
What changed in this PR
This pull request improves asynchronous configuration setup, session-restore handling, initialization errors, and Wayland detection.
Changes:
- Adds asynchronous recursive directory creation.
- Handles missing session-restore files through async loading.
- Updates compositor detection and initialization handling.
| File | Summary |
|---|---|
tiling-assistant@leleat-on-github/src/extension/utility.js |
Adds async directory creation and updates Wayland detection. |
tiling-assistant@leleat-on-github/extension.js |
Adjusts initialization and session-restore error handling; cancellation and native parse-error handling still require changes. |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Util.initialize() used make_directory_with_parents(), which is synchronous and blocks the shell. GIO has no asynchronous variant that also creates the parents, so walk up from the target directory to the first existing ancestor and create the missing directories top-down with make_directory_async(). Let the caller handle the errors instead: enable() logs a failed initialization and returns early on cancellation.
Meta.is_wayland_compositor() is not available since GNOME 50 as per the X11 removal, and comparing it against undefined breaks shexli's analysis. Use optional chaining instead, which assumes wayland if it's not defined.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


See commits for details