You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] weird encoding issues on (ghostty) terminals #286
When running local uc commands I get weird artifacts on my screen
% ./uncloud machine ls
^[[?2026;2$y^[[?2027;1$yNAME STATE ADDRESS PUBLIC IP WIREGUARD ENDPOINTS MACHINE ID
machine-1 Up 10.210.0.1/24 - 172.19.0.2:51820, 131.174.139.88:51820 656c506c2da5e6012a3f20a157d709fe
Expected behavior
Don't print any escapes
Environment:
asahalinux fedora32/ghostty 1.3.1
Uncloud versions: main from github
I've seen the color and palette stuff in other PRs, my hunch is, this is not compatible. An option to disable all these colorization would also be nice (i'm colorblind, so I also want different colors)
This seems to be a "This type of sequence is commonly referred to as a CSI (Control Sequence Introducer)"... wat
Bubbletea/lipgloss should support NO_COLOR=1 (https://no-color.org/) to disable colours in the output out of the box.
But this is only about colours, other control characters could still be used, e.g. for printing an interactive progress when connecting to the cluster.
fixes it, but that is not the official fix (and not the official repo!)
% ./uncloud machine list
NAME STATE ADDRESS PUBLIC IP WIREGUARD ENDPOINTS MACHINE ID
machine-1 Up 10.210.0.1/24 - 172.19.0.2:51820, 131.174.139.88:51820 58de29fd9f276a1cc05d95504e2ff5aa
./uc machine rm machine-9jfd ~miekg/uncloud/cmd/uncloud main
^[[?2026;2$y^[[?2027;2$yNo service containers found on machine 'machine-9jfd'.
This will remove the machine from the cluster and reset it to the uninitialised state.
Do you want to continue? [y/N] y
invalid input. please try again
Do you want to continue? [y/N] y
Machine 'machine-9jfd' removed from the cluster.
Machine reset initiated and will complete in the background.
I have terrible trouble with Ghostty and random characters appearing while SSH'd in. I've done the infocmp -x xterm-ghostty | ssh YOUR-SERVER -- tic -x - incantation and that at least stops ls from being llss
But I noticed that when I did a do-release-upgrade every time I switched away and back to ghostty there were random characters inserted.
Don't know if that helps ease the pain, thought I'd throw it in the mix.
I'm probably going back to Warp or iTerm2...
Look ok. But at $WORK cluster access is slightly slower which may not trigger it. Note I tested this in my fork and there it did work beautifully, so this should work as well.
looks like those charm folks are working on a AI tui instead of maintaining their stuff. As the docker tui stuff is also brittle it might make sense to move everything over to something more stable (don't know what though)
Activity
miekg commentedon Mar 24, 2026
tried different terminals, term infos, shells and shell prompts, but doesn't seem to be that.
miekg commentedon Mar 24, 2026
% ./uncloud machine ls | catfixes it. It's the connectClusterWithProgress which usesteawhich breaks on fedora for some reasonmiekg commentedon Mar 24, 2026
it's this charmbracelet/bubbletea#1590
[-][BUG] weird encoding issues on ghostty terminal[/-][+][BUG] weird encoding issues on (ghostty) terminals[/+]psviderski commentedon Mar 25, 2026
Bubbletea/lipgloss should support
NO_COLOR=1(https://no-color.org/) to disable colours in the output out of the box.But this is only about colours, other control characters could still be used, e.g. for printing an interactive progress when connecting to the cluster.
It would be helpful if you can try some of the fixes linked in charmbracelet/bubbletea#1590.
I was not able to reproduce this in iterm2/ghostty/Terminal using fish/bash/zsh on macOS.
miekg commentedon Mar 25, 2026
i think I just have to sit it out and wait for it to be fixed upstream
miekg commentedon Mar 25, 2026
fixes it, but that is not the official fix (and not the official repo!)
miekg commentedon Apr 16, 2026
with the control master stuff, this is now happening all the time and it's driving me nuts. I'll ping (sigh) the bug
miekg commentedon Apr 16, 2026
another symptom:
miekg commentedon Apr 21, 2026
bubbletea is in no rush to fix this... as an intermediate fix (I tried some source level fixes, but these all failed), I'm now using this function:
which may help someone else too.
rscorer commentedon Apr 23, 2026
I have terrible trouble with Ghostty and random characters appearing while SSH'd in. I've done the
infocmp -x xterm-ghostty | ssh YOUR-SERVER -- tic -x -incantation and that at least stopslsfrom beingllssBut I noticed that when I did a
do-release-upgradeevery time I switched away and back to ghostty there were random characters inserted.Don't know if that helps ease the pain, thought I'd throw it in the mix.
I'm probably going back to Warp or iTerm2...
miekg commentedon Apr 23, 2026
shell-integration-features = no-cursor,no-title,ssh-env,ssh-terminfotakes care of that nowadays
rscorer commentedon Apr 23, 2026
Amazing, thanks. I will stay with ghostty a little longer 😁
miekg commentedon May 17, 2026
got a fix fork here https://github.com/miekg/bubbletea
go mod edit -replace charm.land/bubbletea/v2=github.com/miekg/bubbletea/[email protected]to build uncloud should do the right thingcli: use forked bubbletea with a fix to drain pending TTY input on sh…
psviderski commentedon Jun 17, 2026
@miekg I create a bubbletea fork with a modified fix to drain pending TTY input without the 200ms overhead: https://github.com/unlabs-dev/bubbletea/commits/v2.0.8-uncloud.1/
It's used in
mainalready: 247154eCan you please test this works for you as well as I can't reproduce this issue in my terminals.
miekg commentedon Jun 17, 2026
Look ok. But at $WORK cluster access is slightly slower which may not trigger it. Note I tested this in my fork and there it did work beautifully, so this should work as well.
psviderski commentedon Jun 18, 2026
I'll close this for now. Feel free to reopen if the issue persists.
miekg commentedon Jul 27, 2026
this is still present :(
tonyo commentedon Sep 5, 2026
Still an issue on the (currently) latest 0.20.0 for me; can reproduce on Macos with Ghostty 1.3.1 or iTerm2 3.6.11.
miekg commentedon Sep 7, 2026
looks like those charm folks are working on a AI tui instead of maintaining their stuff. As the docker tui stuff is also brittle it might make sense to move everything over to something more stable (don't know what though)
tonyo commentedon Sep 27, 2026
@miekg This fixes the issue for me, feel free to test: #435
fix(cli): stop leaking terminal capability replies into the shell (#435)
miekg commentedon Sep 28, 2026
Saw it! Thanks!
It's looking good, thanks for tackling this.