perf(window-management): make AeroSpace workspace moves async#487
Closed
JustYannicc wants to merge 1 commit into
Closed
perf(window-management): make AeroSpace workspace moves async#487JustYannicc wants to merge 1 commit into
JustYannicc wants to merge 1 commit into
Conversation
Collaborator
Author
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.
Summary
src/main/aerospace-workspace.ts.execFileSync('aerospace', ...)calls from the launcher show path with asyncexecFile-backed fire-and-forget work.aerospacebinary behavior, and non-blocking slow-command behavior.Why
showWindow()calledmoveWindowToCurrentAerospaceWorkspace()before showing/focusing the launcher and again shortly after show. That helper performed multiple synchronous CLI calls on the Electron main process, so slowaerospacestartup/server responses could directly delay launcher visibility, focus, and menu-bar responsiveness.Performance Evidence
Controlled fake
aerospacecommand delay: 120 ms per invocation.Before:
After:
requestMove()returned after: 0 msValidation
node --test scripts/test-aerospace-workspace.mjs/opt/homebrew/Cellar/node@22/22.22.3/bin/npm test(live Electron crash recovery self-skipped because Electron was not launchable here)/opt/homebrew/Cellar/node@22/22.22.3/bin/npm run check:i18n(exits 0; existing Italian missing keys reported:settings.ai.whisper.vocabulary,settings.extensions.appSearchScope)/opt/homebrew/Cellar/node@22/22.22.3/bin/npm run build:mainsrc/main: 0 errorsRisks
mainWindow.show(). The existing post-show reconciliation remains and coalesces with any in-flight pre-show request to preserve placement as closely as possible without holding the main process.