Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Synchronized Output (Mode 2026) #850

Open
talios opened this issue Nov 1, 2023 · 6 comments
Open

Support for Synchronized Output (Mode 2026) #850

talios opened this issue Nov 1, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@talios
Copy link

talios commented Nov 1, 2023

Is your feature request related to a problem? Please describe.

Recently I've been beta testing the new Ghostty terminal (https://mitchellh.com/ghostty), whose super fast performance has started revealing various refresh/tearing issues in other applications.

When running the Dagger (dagger.io) CI tool locally, and more so using experimental UI, I noticed A LOT of screen flicker, after discussing this on both the Ghostty and Dagger discords, I was pointed here.

Ghostty supports the Synchronized Output spec (https://gist.github.com/christianparpart/d8a62cc1ab659194337d73e399004036, inspired from iTerm) which aims to provide a contract between terminals and applications to reduce screen tearing and apparent UI flickering.

Describe the solution you'd like

I'm not a bubbletea user myself, but a user of tools using bubbletea, but I'd love to see the library adopt support for Synchronised Output and makes many users a lot less... tearful.

@talios talios added the enhancement New feature or request label Nov 1, 2023
@meowgorithm meowgorithm changed the title Support for Synchronized Output Support for Synchronized Output (Mode 2026) Nov 1, 2023
@meowgorithm
Copy link
Member

Hi! Thanks for filing; this makes sense to me. No ETA on when we can commit to it, though at first read it looks like implementation would be pretty straightforward.

We're actually also Ghostty users, though I personally haven't seen much jank yet. I will say that traditionally you'll see some lag when redrawing very large TUIs on very large windows, and we do plan to address that in other ways as well.

Few more questions, which will help us measure results a bit:

  1. Are you using very large terminal?
  2. Any chance you upload a screencast of the behavior?
  3. Which OS are you using?
  4. Are you seeing this with any other tools built on Bubble Tea? Asking mostly because at first glance Dagger looks like it may take a degree of setup before we can actually see some UI from it (I could be wrong through).

@talios
Copy link
Author

talios commented Nov 1, 2023

Hi, just a quick response and its 3:30am (I couldn't sleep).

This is a link to my ghostty discord message/video: https://discord.com/channels/1005603569187160125/1005603569711452192/1168783411968745482 - I can post that elsewhere in the morning if not accessible.

The terminal window isn’t that large even even small term sizes produce the effect.

This is on macOS Sonoma (Intel).

@meowgorithm
Copy link
Member

Got it, thank you. Attaching the video here for reference. It looks like the top and bottom are both different builds of Ghostty. Is that correct?

Hope you get some sleep!

Ghostty_-__I_s_s_smx3-integration.mp4

@muesli
Copy link
Member

muesli commented Nov 1, 2023

I do have a patch implementing synchronized output. I've never followed up on it, as so far I had not seen a terminal where it would make a difference, but if ghostty benefits from this, I'll happily open a PR.

@talios
Copy link
Author

talios commented Nov 1, 2023

@meowgorithm the bottom version was WezTerm, with Ghostty at the top - which as Mitchel pointed out, still shows some tearing but not as much as Ghostty - mostly cause Ghostty is much more responsive.

@ctrox
Copy link

ctrox commented Jan 19, 2024

@muesli Would you mind posting that patch or is it already pushed somewhere? I observed similar issues in Alacritty on Linux, which apparently should support synchronized output and I would be very interested to see if this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants