Skip to content

Random cleanups and improvements - #482

Merged
3v1n0 merged 4 commits into
mainfrom
55-fixes
Oct 8, 2026
Merged

3v1n0 merged 4 commits into
mainfrom
55-fixes

Conversation

@3v1n0

@3v1n0 3v1n0 commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

See commits for details

3v1n0 added 2 commits October 8, 2026 19:40
_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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Initialization failures are currently mishandled and can leave the extension partially active.

1 open finding
1 resolved since last review

🧠 Review effort: Lite

3v1n0 added 2 commits October 8, 2026 22:24
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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

A critical lifecycle race can leave the manager initialized after the extension is disabled.

1 open finding
1 resolved since last review

🧠 Review effort: Lite

@3v1n0
3v1n0 merged commit 366eff9 into main Oct 8, 2026
5 checks passed
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.

2 participants