franciscolourenco / done

A fish-shell package to automatically receive notifications when long processes finish.
MIT License
781 stars 71 forks source link

Is it possible that this could cause Ghostty to hang on long running processes? #148

Open blacktop opened 3 months ago

blacktop commented 3 months ago

Please see https://github.com/ghostty-org/ghostty/issues/1917

franciscolourenco commented 3 months ago

That repository doesn't seem to be available. Maybe it is private?

blacktop commented 3 months ago

Ah yes it is, I apologize. https://mitchellh.com/ghostty @mitchellh might be able to add you if you want. It's his awesome NEW terminal. With done installed fish hangs after running tree .

mitchellh commented 3 months ago

Hello! I'd be happy to add you @franciscolourenco but I consider any functionality that works in other terminals and not mine a bug with my own terminal 😄 So I don't think this is a done bug. I'll invite you anyways though!

franciscolourenco commented 3 months ago

Thank you @mitchellh, that makes sense :)

mitchellh commented 2 months ago

Sorry @franciscolourenco you can't see our issue but I've tracked this down to an upstream issue: https://github.com/julienXX/terminal-notifier/issues/301 Specifically from my thread:

Okay I've installed done with fish and I can reproduce this only with terminal-notifier installed. I can actually reproduce this purely with terminal-notifier:

# This hangs!
$ echo "hello" | terminal-notifier -title "Hello" -sender "com.mitchellh.ghostty"

It looks like terminal-notifier itself is hanging for some reason.

I'm not sure why it hangs with the Ghostty ID. But it appears based on the previous issue this isn't unique. I don't see any smoking guns in logs anywhere.

mitchellh commented 2 months ago

Btw, I was surprised to see that done doesn't use OSC9 or OSC777 (native terminal desktop notifications) supported by Kitty, WezTerm, foot, and iTerm2. Ghostty also supports these. That would make done not require any dependencies and it wouldn't have to shell out either.

Their usage:

OSC 9

OSC 9 ; <body> ST

OSC 777

OSC 777 ; notify ; <title> ; <body> ST

peter-cardenas-ai commented 2 months ago

@mitchellh unfortunately this doesn't work when the process is in a detached tmux session or the shell is otherwise not interactive

mitchellh commented 2 months ago

@mitchellh unfortunately this doesn't work when the process is in a detached tmux session or the shell is otherwise not interactive

True! But if the shell is interactive and it's not tmux, it does work, which I feel would still be pretty common?

blacktop commented 2 months ago

ping

blacktop commented 2 months ago

I'd say if you were thinking about implementing @mitchellh ideas we could keep this open @franciscolourenco otherwise I think we can close it.

franciscolourenco commented 2 months ago

@blacktop will have to follow up on OSC 9 and OSC 777 in a different thread. I'll leave this open for now just for reference. Thanks!