Skip to content

Restore espansion in the welcome screen - #2574

Merged
AucaCoyan merged 1 commit into
espanso:devfrom
n8henrie:fix-welcome-screen-expansion
Nov 14, 2025
Merged

AucaCoyan merged 1 commit into
espanso:devfrom
n8henrie:fix-welcome-screen-expansion

Conversation

@n8henrie

Copy link
Copy Markdown
Collaborator

The addition of the wait in 7bae477 broke expansion in the welcome screen.

Fixes #2571

@n8henrie
n8henrie requested a review from AucaCoyan as a code owner November 13, 2025 13:58
@n8henrie

Copy link
Copy Markdown
Collaborator Author

@AucaCoyan this was the issue -- after 7bae477 espanso waits for the welcome screen to complete in this thread, so nothing else works until the welcome screen is dismissed.

Removing the wait here allows this thread to spawn and everything else to continue in the background.

It might be advisable for us to join the thread somewhere? Although I presume it will just go away once the welcome screen is dismissed.

Before this is merged, we should probably:

  • decide if we need to join this thread somewhere
  • A similar change (wait) was added to espanso-engine/src/process/middleware/open_config.rs in this commit -- did this introduce any undesirable behavior? I usually use immutable configs (via home-manager) and therefore don't use the config editing and would not have noticed. Should investigate.

@AucaCoyan

Copy link
Copy Markdown
Collaborator

Interestingly, clippy warns of the process not being awaited:

error: spawned process is never `wait()`ed on
  --> espanso/src/cli/worker/ui/welcome.rs:26:13
   |
26 |     let _ = command.spawn().expect("unable to show welcome screen");
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- help: try: `.wait()`
   |
   = note: not doing so might leave behind zombie processes
   = note: see https://doc.rust-lang.org/stable/std/process/struct.Child.html#warning
   = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#zombie_processes
   = note: `-D clippy::zombie-processes` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::zombie_processes)]`

error: could not compile `espanso` (bin "espanso") due to 1 previous error
Error: Process completed with exit code 101.

this was the reason that commit had a wait, I apply all the clippy fixes no matter what does it mean the contents.
Usually this means no behaviour change, but you found an interesting bug 🤔

I'll review this later! Thanks for taking hands into the keyboard!

@n8henrie
n8henrie force-pushed the fix-welcome-screen-expansion branch 2 times, most recently from 59f570e to a18b8a6 Compare November 13, 2025 18:03
@n8henrie

Copy link
Copy Markdown
Collaborator Author

@AucaCoyan the latest push adds a wait, just after the worker threads are spawned, and seems to work locally for me.

Let me know what you think -- if we can get this in shape to merge, I'm hoping to get a meaningful espanso update (esp for wayland) merged into nixpkgs for the 25.11 release (cutoff coming up soon).

The addition of the `wait` in 7bae477 broke expansion in the welcome screen.

Fixes espanso#2571
@n8henrie
n8henrie force-pushed the fix-welcome-screen-expansion branch from a18b8a6 to 598dd10 Compare November 13, 2025 20:03
@n8henrie

Copy link
Copy Markdown
Collaborator Author

Had to fix compilation on non-modulo builds but think I got it now.

@AucaCoyan

Copy link
Copy Markdown
Collaborator

oh, non-modulo builds are not in my radar of problems!
It is a nice to have feature, but I think you would broke half of espanso if you try to use it without modulo. It may work for simple triggers, but I don't know what ramifications could happen if you try a form, or open the search bar, does it panics and dies? dunno, and currently not a worry to be honest

@AucaCoyan

Copy link
Copy Markdown
Collaborator

Excellent! I liked the solution very much!

@AucaCoyan
AucaCoyan merged commit 5d5fc84 into espanso:dev Nov 14, 2025
sboldt1978 pushed a commit to sboldt1978/espanso that referenced this pull request Feb 11, 2026
The addition of the `wait` in 7bae477 broke expansion in the welcome screen.

Fixes espanso#2571
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.

Espanso stopped expanding in the "Espanso is running!" welcome screen

2 participants